The following functions generate fully-functional molecule from a subset of another molecule. The following subset methods are available:

OESubsetMol

Match-based selection

bool OESubsetMol(OEMolBase &dst, const OEMatchBase *match,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)

bool OESubsetMol(OEMCMolBase &dst, const OEMCMolBase &src,
                 const OEMatchBase *match,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
dst

The destination subset molecule generated from the source molecule. The source molecule may be multi-conformer, in which case a multi-conformational subset molecule is produced.

src

The source molecule.

match

The container that stores the selected atoms that will be in the generated subset molecule. By default, bonds between the selected atoms are carried along. If no source molecule is specified then the target molecule of the OEMatchBase defines the source molecule.

RGroup

Flag that indicates whether “R groups” are to be added when covalent bonds are broken by the selection.

adjustHCount

Flag that indicates whether the implicit hydrogen count is to be adjusted when covalent bonds are broken by the selection in order to preserve the original hybridization.

atomMap, bondMap

A mapping between the atoms or / and bonds of the source and destination molecule can be obtained by passing in the atomMap and bondMap arrays respectively. These arrays should be large enough to hold all the atoms / bonds for the source molecule, i.e., the size of OEMolBase.GetMaxAtomIdx and OEMolBase.GetMaxBondIdx, respectively. The atoms or bonds in the array are those from the destination molecule placed at the source molecule’s atom / bond index location in the array.

Atom predicate-based selection

bool OESubsetMol(OEMolBase &dst, const OEMolBase &src,
                 const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
bool OESubsetMol(OEMCMolBase &dst, const OEMCMolBase &src,
                 const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
bool OESubsetMol(OEQMolBase &dst, const OEQMolBase &src,
                 const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
dst

The destination subset molecule generated from the source molecule. The source molecule may be multi-conformer, in which case a multi-conformational subset molecule is produced.

src

The source molecule.

atomfcn

The atom predicate that defines the subset of atoms that are carried over to the destination molecule. By default, bonds between the selected atoms are carried along.

RGroup

Flag that indicates whether “R groups” are to be added when covalent bonds are broken by the selection.

adjustHCount

Flag that indicates whether the implicit hydrogen count is to be adjusted when covalent bonds are broken by the selection in order to preserve the original hybridization.

atomMap, bondMap

A mapping between the atoms or / and bonds of the source and destination molecule can be obtained by passing in the atomMap and bondMap arrays respectively. These arrays should be large enough to hold all the atoms / bonds for the source molecule, i.e., the size of OEMolBase.GetMaxAtomIdx and OEMolBase.GetMaxBondIdx, respectively. The atoms or bonds in the array are those from the destination molecule placed at the source molecule’s atom / bond index location in the array.

Atom and bond predicate-based selection

bool OESubsetMol(OEMolBase &dst, const OEMolBase &src,
                 const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn,
                 const OESystem::OEUnaryPredicate<OEBondBase> &bondfcn,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)

bool OESubsetMol(OEMCMolBase &dst, const OEMCMolBase &src,
                 const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn,
                 const OESystem::OEUnaryPredicate<OEBondBase> &bondfcn,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)

bool OESubsetMol(OEQMolBase &dst, const OEQMolBase &src,
                 const OESystem::OEUnaryPredicate<OEAtomBase> &atomfcn,
                 const OESystem::OEUnaryPredicate<OEBondBase> &bondfcn,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
dst

The destination subset molecule generated from the source molecule. The source molecule may be multi-conformer, in which case a multi-conformational subset molecule is produced.

src

The source molecule.

atomfcn

The atom predicate that defines the subset of atoms that are carried over to the destination molecule.

bondfcn

The atom predicate that defines the subset of bonds that are carried over to the destination molecule.

RGroup

Flag that indicates whether “R groups” are to be added when covalent bonds are broken by the selection.

adjustHCount

Flag that indicates whether the implicit hydrogen count is to be adjusted when covalent bonds are broken by the selection in order to preserve the original hybridization.

atomMap, bondMap

A mapping between the atoms or / and bonds of the source and destination molecule can be obtained by passing in the atomMap and bondMap arrays respectively. These arrays should be large enough to hold all the atoms / bonds for the source molecule, i.e., the size of OEMolBase.GetMaxAtomIdx and OEMolBase.GetMaxBondIdx, respectively. The atoms or bonds in the array are those from the destination molecule placed at the source molecule’s atom / bond index location in the array.

Atom and bond set-based selection

bool OESubsetMol(OEMolBase &dst,
                 const OEAtomBondSet &abset,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
bool OESubsetMol(OEMolBase &dst, const OEMolBase &src,
                 const OEAtomBondSet &abset,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
bool OESubsetMol(OEMCMolBase &dst, const OEMCMolBase &src,
                 const OEAtomBondSet &abset,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
bool OESubsetMol(OEQMolBase &dst, const OEQMolBase &src,
                 const OEAtomBondSet &abset,
                 bool adjustHCount=false, bool RGroup=false,
                 OEAtomBase **atomMap=0, OEBondBase **bondMap=0)
dst

The destination subset molecule generated from the source molecule. The source molecule may be multi-conformer, in which case a multi-conformational subset molecule is produced.

src

The source molecule.

abset

The container that stores the selected atoms that will be in the generated subset molecule. By default, bonds between the selected atoms are carried along. If no source molecule is specified then OEAtomBondSet defines the source molecule.

RGroup

Flag that indicates whether “R groups” are to be added when covalent bonds are broken by the selection.

adjustHCount

Flag that indicates whether the implicit hydrogen count is to be adjusted when covalent bonds are broken by the selection in order to preserve the original hybridization.

atomMap, bondMap

A mapping between the atoms or / and bonds of the source and destination molecule can be obtained by passing in the atomMap and bondMap arrays respectively. These arrays should be large enough to hold all the atoms / bonds for the source molecule, i.e., the size of OEMolBase.GetMaxAtomIdx and OEMolBase.GetMaxBondIdx, respectively. The atoms or bonds in the array are those from the destination molecule placed at the source molecule’s atom / bond index location in the array.

See also