OEGetSmallestSubtreeΒΆ

OESystem::OEIterBase<OEAtomBase> *
    OEGetSmallestSubtree(const OEBondBase * bond)

OESystem::OEIterBase<OEAtomBase> *
    OEGetSmallestSubtree(const OEBondBase *bond,
                         const OESystem::OEUnaryPredicate<OEAtomBase> &excludeAtoms)

This function traverses the subgraph of all connected atoms on one end of a bond passed as the argument without crossing the bond itself. If the number of contiguous atoms connected to the beginning atom of the bond exceeds half of the atoms in the molecule, that subtree is discarded and a new traversal begins starting with the end atom of the bond. The bond itself may not be crossed in the second traversal. An iterator over the atoms that are members of the smallest subgraph is returned. The root atom of the bond from which the smallest subtree originates is included in the atom iterator returned.