Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Generate Isomers from Chemical Formulas
Contributed by: Jason Biggs, Wolfram Research
Starting from a chemical formula, generate all possible molecular structures with correct valence. Quickly create millions of isomers or more and read them in as "SMILES" strings or Molecule objects using a stream-like interface. Customize the structure generation by filtering out predefined substructure patterns, e.g. triple bonds in small rings or molecules with bridging double bonds, or define new valence rules for atoms outside the common organic set. This package uses the external application surge, based on the canonical generation path method.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["WolframChemistry/IsomerGeneration"]
To load the code after installation, evaluate this code:
Needs["WolframChemistry`IsomerGeneration`"]
List and plot all the isomers of dichlorobutane:
In[1]:= |
Out[1]= |
In[2]:= |
Out[2]= |
Count the number of isomers of C10H16O without listing them:
In[3]:= |
Out[3]= |
Substitute fluorine for two of they hydrogens and count the isomers:
In[4]:= |
Out[4]= |
Generate all the isomers for C10H16OF2 asynchronously:
In[5]:= |
Out[5]= |
Check the status of the isomer generation:
In[6]:= |
Out[6]= |
Find information about the isomers:
In[7]:= |
Out[7]= |
Read the first SMILES string from the result:
In[8]:= |
Out[8]= |
Read the next entry as a Molecule:
In[9]:= |
Out[9]= |
Search through all 3.5 million isomers, lazily selecting only the first 100 that have both fluorine atoms on the same carbon atom:
In[10]:= |
Out[10]= |
In[11]:= |
Out[11]= |
This is just a drop in the bucket compared to the seventy-five million possible isomers:
In[12]:= |
Out[12]= |
Filtering out unphysical substructures and you still have fifty-six million isomers:
In[13]:= |
Out[13]= |
Note however there is a limitation with respect to stereochemistry. The cis- and trans- isomers of this simple alkene are not returned by ListIsomers:
In[14]:= |
Out[14]= |
When searching PubChem with FindIsomers, you will find both stereoisomers but will also find many hypervalent species:
In[15]:= |
Out[15]= |
Wolfram Language Version 12.3