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:
AddRole | GetRoles | |
ClearRoles | HasRole | |
DeleteRole | NumRoles |
OEAtomBondSet()
Default constructor that generates an empty container.
OEAtomBondSet(const OEAtomBondSet &rhs)
Copy constructor.
OEAtomBondSet(OESystem::OEIter<OEChem::OEAtomBase> &atoms)
OEAtomBondSet(OESystem::OEIter<OEChem::OEBondBase> &bonds)
OEAtomBondSet(OESystem::OEIterBase<OEChem::OEAtomBase> *atoms)
OEAtomBondSet(OESystem::OEIterBase<OEChem::OEBondBase> *bonds)
OEAtomBondSet(OESystem::OEIter<OEChem::OEAtomBase> &atoms,
OESystem::OEIter<OEChem::OEBondBase> &bonds)
OEAtomBondSet(OESystem::OEIterBase<OEChem::OEAtomBase> *atoms,
OESystem::OEIterBase<OEChem::OEBondBase> *bonds)
Constructors that generate an OEAtomBondSet container with the given atoms and bonds.
bool Add(const OEMolBase& mol,
const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& atompred)
bool Add(const OEMolBase& mol,
const OESystem::OEUnaryPredicate<OEChem::OEBondBase>& bondpred)
bool Add(const OEMolBase& mol,
const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& atompred,
const OESystem::OEUnaryPredicate<OEChem::OEBondBase>& bondpred)
bool Add(const OEAtomBondSet& abset)
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.
bool AddAtom(OEChem::OEAtomBase *atom)
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 in the set belong to.
bool AddAtoms(const std::vector<OEChem::OEAtomBase *> &atoms)
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 in the set belong to.
bool AddBond(OEChem::OEBondBase *bond)
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 in the set belong to.
bool AddBonds(const std::vector<OEChem::OEBondBase *> &bonds)
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 bonds in the set belong to.
void ClearAtomsAndBonds()
Removes all atoms and bonds from the OEAtomBondSet but retains the existing OERoleSet.
OESystem::OEAtomBondSet *CreateCopy() const
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.
bool HasAtom(OEChem::OEAtomBase *atom) const
Returns whether atom already belongs to the set.
bool HasBond(OEChem::OEBondBase *bond) const
Returns whether bond already belongs to the set.
OESystem::OEIterBase<OEChem::OEAtomBase> *GetAtoms() const
Returns an iterator over the atoms that are stored in the OEAtomBondSet object.
OESystem::OEIterBase<OEAtomBase> *
GetAtoms(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> &) const =0
Returns an iterator over all of the atoms in the container that match the specified atom predicate (OEUnaryPredicate).
OESystem::OEIterBase<OEChem::OEBondBase> *GetBonds() const
Returns an iterator over the bonds that are stored in the OEAtomBondSet object.
OESystem::OEIterBase<OEBondBase> *
GetBonds(const OESystem::OEUnaryPredicate<OEChem::OEBondBase> &) const =0
Returns an iterator over all of the bonds in the container that match the specified bond predicate (OEUnaryPredicate).
unsigned int NumAtoms() const
Returns the number of atoms stored in the OEAtomBondSet object.
unsigned int NumAtoms(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& atompred) const
Returns the number of atoms stored in the OEAtomBondSet object matching the provided predicate.
unsigned int NumBonds() const
Returns the number of bonds stored in the OEAtomBondSet object.
unsigned int NumBonds(const OESystem::OEUnaryPredicate<OEChem::OEBondBase>& bondpred) const
Returns the number of bonds stored in the OEAtomBondSet object matching the provided predicate.
bool Remove(const OEMolBase& mol,
const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& atompred)
bool Remove(const OEMolBase& mol,
const OESystem::OEUnaryPredicate<OEChem::OEBondBase>& bondpred)
bool Remove(const OEMolBase& mol,
const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& atompred,
const OESystem::OEUnaryPredicate<OEChem::OEBondBase>& bondpred)
bool Remove(const OEAtomBondSet& abset)
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.
bool RemoveAtom(OEChem::OEAtomBase *atom)
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.
bool RemoveAtoms(const std::vector<OEChem::OEAtomBase *> &atoms)
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.
bool RemoveBond(OEChem::OEBondBase *bond)
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.
bool RemoveBonds(const std::vector<OEChem::OEBondBase *> &bonds)
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.
bool Translate(OEAtomBase **amap, OEBondBase **bmap)
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