The OPSIN web interface can be utilised in three ways:
Directly:
Simply enter a chemical name into the web form and chemical representations will be returned
By requesting a particular output using file extensions:
The web service resides at https://opsin.ch.cam.ac.uk/opsin/ . A request to that URL concatenated with the URL encoded chemical name will give a structure where the representation chosen is decided by the extension:
- .cml gives CML with 2d coordinates
- .no2d.cml gives CML without 2d coordinates
- .inchi gives InChI (NOTE: This is tautomer-specific, use StdInChI for a tautomer-independent representation)
- .stdinchi gives StdInChI
- .stdinchikey gives StdInChIKey
- .png gives a depiction
- .smi gives SMILES
- .svg gives a vector graphic depiction
- .json gives JSON (keys: cml, inchi, stdinchi, stdinchikey, smiles, message, status, warnings (when applicable))
For example https://opsin.ch.cam.ac.uk/opsin/cyclopropane.png yields a depiction of cyclopropane.
By content negotiation:
The web service will respond appropriately to requests with the appropriate MIME type. For your convenience the MIME types expected are:
- chemical/x-cml for CML with 2d coordinates
- chemical/x-no2d-cml for CML without 2d coordinates
- chemical/x-inchi for InChI (NOTE: This is tautomer-specific, use StdInChI for a tautomer-independent representation)
- chemical/x-stdinchi for StdInChI
- chemical/x-stdinchikey for StdInChIKey
- image/png for PNG depiction
- image/svg+xml for SVG depiction
- chemical/x-daylight-smiles for SMILES
- application/json for JSON (keys: cml, inchi, stdinchi, stdinchikey, smiles, message, status, warnings (when applicable))
The web service resides at https://opsin.ch.cam.ac.uk/opsin/
Specification of non ASCII characters:
Greek Characters
Greek characters may be specified by:
- The appropriate Unicode character e.g. λ
- The romanised name for the letter e.g. lambda
- The romanised name for the letter surrounded by dots e.g. .lambda.
- The corresponding modern letter prefixed with a dollar e.g. $l
Super scripts
Super scripts may be specified by:
- A carat with bracketing e.g. N^(2)
- A carat e.g. N^2
- Bracketing e.g. N(2)
- Using tildes e.g. N~2~
- Using stars e.g. N*2*
- Using angle brackets e.g. N<2>
Note that for locants OPSIN will be able to disambiguate that N2 means N^2 and for von Baeyer systems OPSIN will intelligently guess what should have been superscripted. For spiro systems indication of superscripts is required.