OEAtomBondSet
class OEAtomBondSet : public OESystem::OERoleSet
This class represents OEAtomBondSet that is a container that holds atom and bond pointers.
The following methods are publicly inherited from OERoleSet:
Constructors
OEAtomBondSet() -> OEAtomBondSet
Default constructor that generates an empty container.
OEAtomBondSet(rhs: OEAtomBondSet, amap: OEAtomBase = (OEAtomBase, bmap: OEBondBase = (OEBondBase) -> OEAtomBondSet
Copy constructor.
OEAtomBondSet(atoms: OEAtomIter) -> OEAtomBondSet
OEAtomBondSet(bonds: OEBondIter) -> OEAtomBondSet
OEAtomBondSet(atoms: OEAtomIter, bonds: OEBondIter) -> OEAtomBondSet
Constructors that generate an OEAtomBondSet container with the given atoms and bonds.
Add
Add(mol: Union[OEGraphMol,OEMol,OEQMol], atompred: OEUnaryAtomPred) -> bool
Add(mol: Union[OEGraphMol,OEMol,OEQMol], bondpred: OEUnaryBondPred) -> bool
Add(mol: Union[OEGraphMol,OEMol,OEQMol], atompred: OEUnaryAtomPred,
bondpred: OEUnaryBondPred) -> bool
Add(abset: OEAtomBondSet) -> bool
Adds the atom and bond objects to the container. Returns false if given a null
pointer or if the atoms or bonds being added do not belong to the same
molecule previous objects in the set belong to.
See also
OEAtomBondSet.GetParentmethod
AddAtom
AddAtom(atom: OEAtomBase) -> bool
Adds an atom to the container. Returns false if given a null
pointer or if the atom being added does not belong to the same
molecule previous atoms and bonds in the set belong to.
See also
OEAtomBondSet.GetParentmethod
AddAtoms
AddAtoms(atoms: OEAtomVector) -> bool
Adds all the atoms to the container. Returns false if given a null
pointer or if any atom being added does not belong to the same
molecule previous atoms and bonds in the set belong to.
See also
OEAtomBondSet.GetParentmethod
AddBond
AddBond(bond: OEBondBase) -> bool
Adds a bond to the container. Returns false if given a null
pointer or if the bond being added does not belong to the same
molecule previous atoms and bonds in the set belong to.
See also
OEAtomBondSet.GetParentmethod
AddBonds
AddBonds(bonds: OEBondVector) -> bool
Adds all the bonds to the container. Returns false if given a null
pointer or if any bond being added does not belong to the same
molecule previous atoms and bonds in the set belong to.
See also
OEAtomBondSet.GetParentmethod
Clear
Clear() -> None
Removes all atoms and bonds from the
OEAtomBondSet
and clears the OERoleSet.
ClearAtoms
ClearAtoms() -> None
Removes all atoms from the
OEAtomBondSet.
ClearAtomsAndBonds
ClearAtomsAndBonds() -> None
Removes all atoms and bonds from the
OEAtomBondSet but retains
the existing OERoleSet.
ClearBonds
ClearBonds() -> None
Removes all bonds from the
OEAtomBondSet.
CreateCopy
CreateCopy() -> OEAtomBondSet
Deep copy constructor that returns a copy of the object.
The memory for the returned object derived from
OEAtomBondSet
is dynamically allocated and owned by the caller.
HasAtom
HasAtom(atom: OEAtomBase) -> bool
Returns whether atom already belongs to the set.
HasBond
HasBond(bond: OEBondBase) -> bool
Returns whether bond already belongs to the set.
IsEmpty
IsEmpty() -> bool
Returns whether the set contains any atoms or bonds.
GetAtoms
GetAtoms() -> OEAtomIter
Returns an iterator over the atoms that are stored in the OEAtomBondSet object.
GetAtoms(atompred: OEUnaryAtomPred) -> OEAtomIter
Returns an iterator over all of the atoms in the container that match the specified atom predicate (OEUnaryPredicate).
GetBonds
GetBonds() -> OEBondIter
Returns an iterator over the bonds that are stored in the OEAtomBondSet object.
GetBonds(bondpred: OEUnaryBondPred) -> OEBondIter
Returns an iterator over all of the bonds in the container that match the specified bond predicate (OEUnaryPredicate).
GetParent
GetParent() -> OEGraphMol
Returns the parent molecule of a OEAtomBondSet
object.
This method can be used to determine the molecule of which atoms
and bonds the container stores.
The ‘parent molecule’ property of a OEAtomBondSet
object cannot be altered, as it is determined at the point the
container is created.
The OEAtomBondSet.GetParent method returns a
null pointer if the container is empty.
NumAtoms
NumAtoms() -> int
Returns the number of atoms stored in the OEAtomBondSet object.
NumAtoms(atompred: OEUnaryAtomPred) -> int
Returns the number of atoms stored in the OEAtomBondSet object matching the provided predicate.
NumBonds
NumBonds() -> int
Returns the number of bonds stored in the OEAtomBondSet object.
NumBonds(bondpred: OEUnaryBondPred) -> int
Returns the number of bonds stored in the OEAtomBondSet object matching the provided predicate.
Remove
Remove(mol: Union[OEGraphMol,OEMol,OEQMol],
atompred: OEUnaryAtomPred) -> bool
Remove(mol: Union[OEGraphMol,OEMol,OEQMol],
bondpred: OEUnaryBondPred) -> bool
Remove(mol: Union[OEGraphMol,OEMol,OEQMol],
atompred: OEUnaryAtomPred, bondpred: OEUnaryBondPred) -> bool
Remove(abset: OEAtomBondSet) -> bool
Removes the objects from the container. Returns false if given a null
pointer or if any of the objects being removed do not belong to the same
molecule previous objects in the set belong to.
RemoveAtom
RemoveAtom(atom: OEAtomBase) -> bool
Removes an atom from the container. Returns false if given a null
pointer or if the atom being removed does not belong to the same
molecule previous atoms in the set belong to.
RemoveAtoms
RemoveAtoms(atoms: OEAtomVector) -> bool
Removes atoms from the container. Returns false if given a null
pointer or if any atoms being removed do not belong to the same
molecule previous atoms in the set belong to.
RemoveBond
RemoveBond(bond: OEBondBase) -> bool
Removes a bond from the container. Returns false if given a null
pointer or if the bond being removed does not belong to the same
molecule previous bonds in the set belong to.
RemoveBonds
RemoveBonds(bonds: OEBondVector) -> bool
Removes bonds from the container. Returns false if given a null
pointer or if any bonds being removed do not belong to the same
molecule previous bonds in the set belong to.
Sweep
Sweep() -> bool
Removes deleted atoms and bonds from the container.
Translate
Translate(amap: OEAtomBase, bmap: OEBondBase) -> bool
Translates the pointers in the container based on the provided mapping between the atoms or bonds in the array arguments. This can be used to convert an existing OEAtomBondSet container to refer to a copy of the molecule made from a subset operations.
See also