4.41 OEDetermineRingSystems

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

This function determines the ring systems of a molecule. The return value is the number of connected components 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.