OEGroupBase¶
class OEGroupBase : public OESystem::OEBase
The OEGroupBase class is the abstract interface for representing a ‘group’ container that can store atom and bond pointers of a molecule.
The following methods are publicly inherited from OEBase:
AddAtom¶
bool AddAtom(OEAtomBase *atom)=0
Adds an atom to the group. A group can hold only atoms that belong to the same molecule on which the group is created.
See also
OEGroupBase.GetParent
method
AddBond¶
bool AddBond(OEBondBase *bond)=0
Adds a bond to the group. A group can hold only bonds that belong to the same molecule on which the group is created.
See also
OEGroupBase.GetParent
method
Clear¶
void Clear()=0
This method removes all atoms (OEAtomBase) and bonds (OEBondBase) that are stored in the group.
DeleteAtom¶
bool DeleteAtom(OEAtomBase *atom)=0
Deletes an atom from a group.
Returns true
if the atom was successfully removed.
DeleteBond¶
bool DeleteBond(OEBondBase *bond)=0
Deletes a bond from a group.
Returns true
if the bond was successfully removed.
GetAtoms¶
OESystem::OEIterBase<OEAtomBase> *GetAtoms() const =0
Returns an iterator over all the atoms in the group.
OESystem::OEIterBase<OEAtomBase> *
GetAtoms(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> &) const =0
Returns an iterator over all of the atoms in the group that match the specified atom predicate (OEUnaryPredicate).
GetBonds¶
OESystem::OEIterBase<OEBondBase> *GetBonds() const =0
Returns an iterator over all the bonds in the group.
OESystem::OEIterBase<OEBondBase> *
GetBonds(const OESystem::OEUnaryPredicate<OEChem::OEBondBase> &) const =0
Returns an iterator over all bonds in the group that match the specified bond predicate (OEUnaryPredicate).
GetGroupDefinition¶
bool GetGroupDefinition(OEChem::OEAtomBondSet &) const =0
Returns the entire group definition as an OEAtomBondSet.
GetParent¶
const OEMolBase *GetParent() const =0
Returns the parent molecule of a group.
All OEGroupBases
are created
as a container of an OEMolBase.
This method can be used to determine the molecule of which atoms
and bonds the group stores.
The ‘parent molecule’ property of a group cannot be altered, as its
determined at the point the group is created.
GetGroupType¶
unsigned int GetGroupType() const =0
Returns the type of the group.
See also
OEGroupBase.SetGroupType
methodsOEGroupType
namespace for the built-in group types
HasAtom¶
bool HasAtom(const OEAtomBase *atom) const =0
Returns true
if the given atom belongs to the group.
HasBond¶
bool HasBond(const OEBondBase *bond) const =0
Returns true
if the given bond belongs to the group.
IsDeleted¶
bool IsDeleted() const =0
Returns true
if the group has been deleted or if all atom and bonds
have been removed from the group i.e. if the group is empty.
IsEmpty¶
bool IsEmpty() const =0
Returns true
if all atom and bonds
have been removed from the group, i.e. if the group is empty.
SetGroupType¶
void SetGroupType(unsigned int)=0
Sets the type of the group.
See also
OEGroupBase.GetGroupType
methodOEGroupType
namespace for the built-in group types
Sweep¶
bool Sweep()=0
Removes atoms and bonds from the group for which the
OEAtomBase.IsDeleted
method and the
OEBondBase.IsDeleted
method returns true
,
respectively.