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:

operator=

GetData

IsDataType

operator+=

GetDataIter

SetBaseData

AddBaseData

GetDataType

SetBoolData

AddData

GetDoubleData

SetData

Clear

GetFloatData

SetDoubleData

CreateCopy

GetIntData

SetFloatData

DeleteData

GetStringData

SetIntData

GetBoolData

HasData

SetStringData

AddAtom

AddAtom(atom: OEAtomBase) -> bool

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

AddBond

AddBond(bond: OEBondBase) -> bool

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

Clear

Clear() -> None

This method removes all atoms (OEAtomBase) and bonds (OEBondBase) that are stored in the group.

DeleteAtom

DeleteAtom(atom: OEAtomBase) -> bool

Deletes an atom from a group. Returns true if the atom was successfully removed.

DeleteBond

DeleteBond(bond: OEBondBase) -> bool

Deletes a bond from a group. Returns true if the bond was successfully removed.

GetAtoms

GetAtoms() -> OEAtomIter

Returns an iterator over all the atoms in the group.

GetAtoms(atompred: OEUnaryAtomPred) -> OEAtomIter

Returns an iterator over all of the atoms in the group that match the specified atom predicate (OEUnaryPredicate).

GetBonds

GetBonds() -> OEBondIter

Returns an iterator over all the bonds in the group.

GetBonds(bondpred: OEUnaryBondPred) -> OEBondIter

Returns an iterator over all bonds in the group that match the specified bond predicate (OEUnaryPredicate).

GetGroupDefinition

GetGroupDefinition(abset: OEAtomBondSet) -> bool

Returns the entire group definition as an OEAtomBondSet.

GetParent

GetParent() -> OEGraphMol

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

GetGroupType() -> int

Returns the type of the group.

See also

HasAtom

HasAtom(atom: OEAtomBase) -> bool

Returns true if the given atom belongs to the group.

HasBond

HasBond(bond: OEBondBase) -> bool

Returns true if the given bond belongs to the group.

IsDeleted

IsDeleted() -> bool

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

IsEmpty() -> bool

Returns true if all atom and bonds have been removed from the group, i.e. if the group is empty.

NumAtoms

NumAtoms() -> int

Returns the number of atoms in the group.

NumBonds

NumBonds() -> int

Returns the number of bonds in the group.

SetGroupType

SetGroupType(arg2: int) -> None

Sets the type of the group.

See also

Sweep

Sweep() -> bool

Removes atoms and bonds from the group for which the OEAtomBase.IsDeleted method and the OEBondBase.IsDeleted method returns true, respectively.