OEDetermineRingSystems

unsigned int OEDetermineRingSystems(const OEMolBase &mol, unsigned int *rings)

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.

Warning

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

See also