OEDetermineRingSystems

unsigned int OEDetermineRingSystems(const OEMolBase &mol, unsigned int *rings)
OEDetermineRingSystems(const OEMolBase mol) -> number_of_rings, ring_idx_per_atom

Determines the ring systems of a molecule. The return value is the number of ring systems found in the molecule. If the molecule is acyclic, the return value is zero. The ‘rings’ array must contain at least OEMolBase.GetMaxAtomIdx elements, and upon return it contains a mapping indexed by OEAtomBase.GetIdx of which ring system each atom is in. The ring systems are numbered from one, up to an including the return value of the function. Atoms that aren’t contained in a ring, i.e. for which OEAtomBase.IsInRing returns false, are mapped to the value zero.

In Python, OEDetermineRingSystems returns a two item tuple. The first item in the tuple is the number of independent ring systems found. The second item in the tuple is a list of the atom ring membership as described as the ‘rings’ parameter above.

Warning

It is necessary to perform ring perception by calling OEFindRingAtomsAndBonds function prior to calling OEDetermineRingSystems function.

See also