In the previous version of the Chemical Identifier Resolver, only full length Standard InChIKeys were accepted as identifier part of the requested URL. Any successful request always returned the representation of a single structure record. However, the latter neglects some characteristics of Standard InChIKeys which specifically also were implemented for interlinking highly related (but not always exactly identical) chemical compounds.
For instance, the full-length Standard InChIKey ADVPTQAUNPRNPO-UHFFFAOYSA-N
represents 3-sulfino-alanine as well as its zwitterionic form (or in other words: both are regarded as the same chemical compound by Standard InChIKey):
Starting with the Beta 2 version of the Resolver we have changed the behavior of how a Standard InChIKey is looked up in the database. A request by Standard InChIKey returns now all structure records that have this key as their Standard InChIKey (previously only the first structure record for a Standard InChIKey was returned). For the request
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/smiles
the Resolver returns now the SMILES string for 3-sulfino-alanine and for its zwitterion:
NC(C[S](O)=O)C(O)=O
[NH3+]C(C[S]([O-])=O)C(O)=O
To access a specific structure record use the URL option structure_index:
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/smiles?structure_index=0
NC(C[S](O)=O)C(O)=O
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/smiles?structure_index=1
[NH3+]C(C[S]([O-])=O)C(O)=O
Likewise, this works for any other structure representation available from the Resolver, i.e. if the option structure_index is not being used
- a request for an SD file returns a multi-record SD file:
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/file?format=sdf
- a request for an image returns a multi-record image (I will post later about how to control the generation of these images):
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/image
- a request for (non-standard) InChIs returns both InChIs:
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/inchi
- if more than one structure record returns the same representation, only a single representation is returned: for instance, both forms of 3-sulfino-alanine have the same molecular weight and the following request returns only a single value for the weight:
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/weight
Note: be careful with the request for names. Both forms of 3-sulfino-alanine return more than one name and the request for names therefore returns a join list of both name lists:
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/names
If you want to separate both, please use the structure_index option again. For TwirlyMol always use the structure_index option (otherwise only the first structure is returned):
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/twirl?structure_index=0&div_id=NAME0
http://cactus.nci.nih.gov/chemical/structure/InChIKey=ADVPTQAUNPRNPO-UHFFFAOYSA-N/twirl?structure_index=1&div_id=NAME1