bool OESubsetMol(OEMolBase &dst, const OEMolBase &src, const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn, const OESystem::OEUnaryPredicate<OEBondBase> &bondfcn, bool adjustHCount=false) bool OESubsetMol(OEMolBase &dst, const OEMatchBase *match, bool adjustHCount=false) bool OESubsetMol(OEMCMolBase &dst, const OEMCMolBase &src, const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn, bool adjustHCount=false) bool OESubsetMol(OEMCMolBase &dst, const OEMCMolBase &src, const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn, const OESystem::OEUnaryPredicate<OEBondBase> &bondfcn, bool adjustHCount=false) bool OESubsetMol(OEMCMolBase &dst, const OEMCMolBase &src, const OEMatchBase *match, bool adjustHCount=false) bool OESubsetMol(OEMolBase &dst, const OEMolBase &src, const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn, bool adjustHCount=false)
These functions allows the user to make a fully-functional molecule from
a subset of another molecule. The original molecule may be a
multi-conformer molecule, in which case a multi-conformational copy
is produced. The basis for selection of atoms and bonds
is a predicate function, i.e. a function that will return
true or false for any atom or bond. By default bonds are carried along with
the selected atoms, i.e. all bonds between such. If a bond predicate is
also provided then this transfer is controlled by the user. As some atoms
in the copy will now have 'dangling' bonds, i.e. 'edge' atoms,
the user can also specify that the hydrogen count be altered to preserve
the original hybridization. An alternate mechanism of selection is to provide
an OEMatchBase
, which itself contains a subset of atoms.