How to get the largest ring system of a molecule

ChemAxon d76e6e95eb

19-09-2006 08:49:41

A customer's question:





I would like to extract a SMILES sting (or something similar) of the largest ring. So for C1(CCN2CCOCC2)=CNC3=C1C=CC=C3 I would want to return C12=C(NC=C2)C=CC=C1. At this stage, I would just want a command line entry.

ChemAxon d76e6e95eb

19-09-2006 09:09:07

There is a quite elegant solution with Standardizer, see a command line example:





1. getting the ring systems by using a transform action deleting chain atoms (atoms not being members of rings):


Code:
standardize 'C1(CCN2CCOCC2)=CNC3=C1C=CC=C3' -c '[*R0:1]>>'


C1COCCN1.N2C=CC3=C2C=CC=C3






2. Cleaving biphenil type rings as well (though not relevant to our current example):





Code:
standardize 'C1(CCN2CCOCC2)=CNC3=C1C=CC=C3' -c '[*R0:1]>>..[*:1]!@[*:2]>>[*:2].[*:1]'


C1COCCN1.N2C=CC3=C2C=CC=C3






Please note, that .. is a separator of the standardizer action in command line.





3. Find the largest ring system using the keepone action. The keepone action keeps the fragment having the highest number of atoms, which is just good for our purpose now:





Code:
$ standardize 'C1(CCN2CCOCC2)=CNC3=C1C=CC=C3' -c '[*R0:1]>>..[*:1]!@[*:2]>>[*:2


].[*:1]..keepone'


N1C=CC2=C1C=CC=C2






Voila, the largest ring system is retrieved just as you wished. You can use this standardization example in batch mode!





I attached the configuration in XML version and a screenshot of running that standardization from the new Standardizer application.