In chemistry and cheminformatics, counting rings in a molecule helps describe its structure, stability, and reactivity. Ring counts are used in predicting properties like aromaticity, classifying compounds, and generating molecular descriptors for drug design and materials science. Chemists use the smallest set of smallest rings (SSSR) as a consistent measure for the number of rings in a molecule.
Start with biphenyl, a small molecule with two benzene rings joined by a single bond:
In[1]:=
(m=Molecule["biphenyl"])//MoleculePlot
Out[1]=
Biphenyl clearly has two rings, which can be found by querying the "RingCount" molecule property:
In[2]:=
m["RingCount"]
Out[2]=
2
Naphthalene has two rings that are fused together by a shared bond:
In[3]:=
(m=Molecule["naphthalene"])//MoleculePlot
Out[3]=
The "RingCount" property also returns 2 for naphthalene:
In[4]:=
m["RingCount"]
Out[4]=
2
The "RingCount" property actually returns the number of rings in the smallest set of smallest rings (SSSR):
In[5]:=
m["SmallestSetOfSmallestRings"]
Out[5]=
{{1,10,9,4,3,2},{5,6,7,8,9,4}}
In[6]:=
MoleculePlot[m,%]
Out[6]=
Note that the SSSR does not include the outer envelope ring containing all 10 carbon atoms, because mathematically it can be formed by combining the smaller rings. To count all cycles, convert the molecule to a
Why do chemists use the SSSR instead of enumerating all cycles in the graph? There is both a chemical and a practical answer. Consider a larger structure like this cycloamylose:
In[9]:=
m=
cyclooctaamylose
CHEMICAL
//MoleculePlot3D
Out[9]=
The SSSR for this molecule has eight rings with 6 atoms and twenty four rings with forty atoms:
By looking at only the SSSR a greater emphasis is placed on the smaller rings, which are much more relevant to the overall chemistry of this molecule. This alone makes the SSSR count a more useful topological descriptor for property prediction models. Another reason to prefer the SSSR is practical, namely that it can be computed much more efficiently. For example finding the SSSR for buckminsterfullerene is found very quickly:
In[12]:=
m=Molecule
buckminsterfullerene
CHEMICAL
//MoleculePlot3D
Out[12]=
In[13]:=
MoleculeValue[m,"RingCount"]//AbsoluteTiming
Out[13]=
{0.000404,32}
All of the five and six-membered rings are contained in the SSSR: