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

OESubsetMol

Match-based selection

OESubsetMol(dst: OEMol, src: OEMol, match: OEMatchBase,
            adjustHCount: bool = False, RGroup: bool = False,
            atomMap: OEAtomBase = None, bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: Union[OEGraphMol,OEMol,OEQMol], match: OEMatchBase,
            adjustHCount: bool = False, RGroup: bool = False,
            atomMap: OEAtomBase = None, bondMap: OEBondBase = None) -> bool
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

OESubsetMol(dst: OEMol, src: OEMol, atomfcn: OEUnaryAtomPred,
            adjustHCount: bool = False, RGroup: bool = False,
            atomMap: OEAtomBase = None, bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: OEQMol, src: OEQMol, atomfcn: OEUnaryAtomPred,
            adjustHCount: bool = False, RGroup: bool = False,
            atomMap: OEAtomBase = None, bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: Union[OEGraphMol,OEMol,OEQMol],
            src: Union[OEGraphMol,OEMol,OEQMol],
            atomfcn: OEUnaryAtomPred, adjustHCount: bool = False,
            RGroup: bool = False, atomMap: OEAtomBase = None,
            bondMap: OEBondBase = None) -> bool
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

OESubsetMol(dst: OEMol, src: OEMol, atomfcn: OEUnaryAtomPred,
            bondfcn: OEUnaryBondPred, adjustHCount: bool = False,
            RGroup: bool = False, atomMap: OEAtomBase = None,
            bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: OEQMol, src: OEQMol, atomfcn: OEUnaryAtomPred,
            bondfcn: OEUnaryBondPred, adjustHCount: bool = False,
            RGroup: bool = False, atomMap: OEAtomBase = None,
            bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: Union[OEGraphMol,OEMol,OEQMol],
            src: Union[OEGraphMol,OEMol,OEQMol],
            atomfcn: OEUnaryAtomPred, bondfcn: OEUnaryBondPred,
            adjustHCount: bool = False, RGroup: bool = False,
            atomMap: OEAtomBase = None, bondMap: OEBondBase = None) -> bool
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

OESubsetMol(dst: OEMol, src: OEMol, submol: OEAtomBondSet,
            adjustHCount: bool = False, RGroup: bool = False,
            atomMap: OEAtomBase = None, bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: OEQMol, src: OEQMol, submol: OEAtomBondSet,
            adjustHCount: bool = False, RGroup: bool = False,
            atomMap: OEAtomBase = None, bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: Union[OEGraphMol,OEMol,OEQMol],
            submol: OEAtomBondSet, adjustHCount: bool = False,
            RGroup: bool = False, atomMap: OEAtomBase = None,
            bondMap: OEBondBase = None) -> bool
OESubsetMol(dst: Union[OEGraphMol,OEMol,OEQMol],
            src: Union[OEGraphMol,OEMol,OEQMol],
            submol: OEAtomBondSet, adjustHCount: bool = False,
            RGroup: bool = False, atomMap: OEAtomBase = None,
            bondMap: OEBondBase = None) -> bool
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 and bonds that will be in the generated subset molecule. 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