Retrieve chemical structure for a chemical name

This simple script allows you to copy a chemical name to the clipboard and then use the Chemical Identifier Resolver service to get the corresponding SMILES and then paste it into ChemDraw.

This service works as a resolver for different chemical structure identifiers and allows one to convert a given structure identifier into another representation or structure identifier. It can help you identify and find the chemical structure if you have an identifier such as an InChIKey. You can either use the resolver web form above or use the following simple URL API scheme:

The format for the query is very simple

https://cactus.nci.nih.gov/chemical/structure/”structure identifier”/”representation”

Example: Chemical name to Standard InChIKey:

https://cactus.nci.nih.gov/chemical/structure/aspirin/stdinchikey

Chemical names are resolved by a database lookup into a full structure representation. The service has currently approx. 68 million chemical names available linked to approx. 16 million unique structure records. The set of available names includes trivial names, synonyms, systematic names, registry numbers, etc.

The AppleScript is shown below, the first part creates a dialog box populated by the clipboard contents, you can also type in the query string. The next part url encodes the query string to make sure it does not contain characters the would not be allowed in a URL.

Then we use curl to retrieve the data, and finally ChemDraw to display the results.

The script can be downloaded from here

Last updated 29 October 2023

Related Posts