4.39 OEDetermineComponents

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

This function 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.