I was recently asked if I could generate IUPAC names for a series of molecules for a patent filing. There are many chemical drawing packages that will generate the IUPAC for a single compound and whilst I could have spent several hours cutting and pasting I decided to write a simple Vortex script to do the task.

The command line tool cxcalc from ChemAxon is the command line version of ChemAxon’s Calculator Plugins, and can be used to calculate a wide variety of properties including the IUPAC name.

The command has the following syntax:

And so to calculate the name the command would be (where sdfFile is the path to the sdf file containing the structures.

As shown below

We can use subprocess to run the command and capture the output.

The Vortex Script

The result is shown below

To get the names to wrap with the cell you need to open the “Look and Feel” dialog by clicking on the icon at the top right corner of the table view..

Then edit the Text wrapping options.

Last updated 21 Oct 2021

Related Posts