OEDetermineComponents

unsigned int OEDetermineComponents(const OEMolBase &mol, unsigned int *parts)

Determines the connected components of a molecule. The return value is the number of connected components found in the molecule. If the molecule contains a single discrete molecule, the return value is one. The ‘parts’ array must contain at least OEMolBase::GetMaxAtomIdx elements, and upon return it contains a mapping indexed by OEAtomBase::GetIdx of which part or connected component each atom is in. The parts are numbered from one, up to and including the return value of the function.

See also