Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the molecular complexity of a given molecule
ResourceFunction["MolecularComplexity"][mol] returns the molecular complexity Cm for Molecule mol. | |
ResourceFunction["MolecularComplexity"][str] returns the molecular complexity for the input molecule identifier str. |
A molecule identifier readable by Molecule or a Molecule object itself can be taken as input. By default, it returns a numerical output corresponding to the Cm of the molecule:
| In[1]:= |
| Out[1]= |
Use a Molecule as input:
| In[2]:= |
| Out[2]= |
| In[3]:= |
| Out[3]= |
MolecularComplexity accepts a SMILES or InChI string argument:
| In[4]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
MolecularComplexity threads over lists:
| In[6]:= |
| Out[6]= |
Zero complexity inputs return an error:
| In[10]:= |
| Out[10]= |
| In[11]:= |
| Out[11]= |
MolecularComplexity utilizes Molecule options, so it can only take identifiers that Molecule can parse:
| In[12]:= |
| Out[12]= |
Show that the trend in molecular complexity of alkanes with increasing (CH2) groups from 1 to 10 is linear:
| In[13]:= | ![]() |
| In[14]:= | ![]() |
| Out[14]= | ![]() |
Calculate the change in complexity for a Diels–Alder reaction:
| In[15]:= | ![]() |
| In[16]:= | ![]() |
| In[17]:= |
| In[18]:= | ![]() |
| Out[18]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License