Chemical Data Processing Library Python API - Version 1.1.1
|
A common interface for data-structures that support a random access to stored Chem.Atom instances. More...
Public Member Functions | |
None | __init__ () |
Initializes the AtomContainer instance. | |
Atom | getAtom (int idx) |
Returns a reference to the atom at index idx. More... | |
bool | containsAtom (Atom atom) |
Tells whether the specified Chem.Atom instance is stored in this container. More... | |
int | getAtomIndex (Atom atom) |
Returns the index of the specified Chem.Atom instance in this container. More... | |
int | getNumAtoms () |
Returns the number of stored Chem.Atom objects. More... | |
None | orderAtoms (ForceField.InteractionFilterFunction2 func) |
Orders the stored atoms according to criteria implemented by the provided atom comparison function. More... | |
Entity3D | getEntity (int idx) |
Returns a reference to the entity at index idx. More... | |
int | getNumEntities () |
Returns the number of stored Chem.Entity3D objects. More... | |
bool | __contains__ (Atom atom) |
Returns the result of the membership test operation atom in self . More... | |
Atom | __getitem__ (int idx) |
int | __len__ () |
Public Member Functions inherited from CDPL.Chem.Entity3DContainer | |
int | getObjectID () |
Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
Properties | |
numAtoms = property(getNumAtoms) | |
Properties inherited from CDPL.Chem.Entity3DContainer | |
objectID = property(getObjectID) | |
numEntities = property(getNumEntities) | |
A common interface for data-structures that support a random access to stored Chem.Atom instances.
Implementations have to guarantee that a given Chem.Atom object is stored only once and its index is unique amongst all contained Chem.Atom instances. Otherwise algorithms that rely on this behaviour may not work correctly!
Atom CDPL.Chem.AtomContainer.getAtom | ( | int | idx | ) |
Returns a reference to the atom at index idx.
idx | The zero-based index of the Chem.Atom instance to return. |
Base.IndexError | if the number of atoms is zero or idx is not in the range [0, getNumAtoms() - 1]. |
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Bond, and CDPL.Chem.Atom.
bool CDPL.Chem.AtomContainer.containsAtom | ( | Atom | atom | ) |
Tells whether the specified Chem.Atom instance is stored in this container.
atom | The Chem.Atom instance to look for. |
True
if atom is stored in the container, and False
otherwise. Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Bond, and CDPL.Chem.Atom.
int CDPL.Chem.AtomContainer.getAtomIndex | ( | Atom | atom | ) |
Returns the index of the specified Chem.Atom instance in this container.
atom | The Chem.Atom instance for which to return the index. |
Base.ItemNotFound | if the specified Chem.Atom instance could not be found. |
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Bond, and CDPL.Chem.Atom.
int CDPL.Chem.AtomContainer.getNumAtoms | ( | ) |
Returns the number of stored Chem.Atom objects.
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Bond, and CDPL.Chem.Atom.
None CDPL.Chem.AtomContainer.orderAtoms | ( | ForceField.InteractionFilterFunction2 | func | ) |
Orders the stored atoms according to criteria implemented by the provided atom comparison function.
func | The atom comparison function implementing the applied ordering criteria. |
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Bond, and CDPL.Chem.Atom.
Entity3D CDPL.Chem.AtomContainer.getEntity | ( | int | idx | ) |
Returns a reference to the entity at index idx.
idx | The zero-based index of the Chem.Entity3D instance to return. |
Base.IndexError | if the number of entities is zero or idx is not in the range [0, getNumEntities() - 1]. |
Reimplemented from CDPL.Chem.Entity3DContainer.
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Bond, and CDPL.Chem.Atom.
int CDPL.Chem.AtomContainer.getNumEntities | ( | ) |
Returns the number of stored Chem.Entity3D objects.
Reimplemented from CDPL.Chem.Entity3DContainer.
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Bond, and CDPL.Chem.Atom.
bool CDPL.Chem.AtomContainer.__contains__ | ( | Atom | atom | ) |
Returns the result of the membership test operation atom in self
.
atom | The value to test for membership. |
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Fragment, CDPL.Chem.ElectronSystem, CDPL.Chem.Bond, and CDPL.Chem.Atom.
Atom CDPL.Chem.AtomContainer.__getitem__ | ( | int | idx | ) |
idx |
Reimplemented from CDPL.Chem.Entity3DContainer.
Reimplemented in CDPL.Chem.ElectronSystem, CDPL.Biomol.HierarchyViewModel, and CDPL.Biomol.HierarchyViewChain.
int CDPL.Chem.AtomContainer.__len__ | ( | ) |
Reimplemented from CDPL.Chem.Entity3DContainer.
Reimplemented in CDPL.Chem.Molecule, CDPL.Chem.MolecularGraph, CDPL.Chem.Fragment, CDPL.Chem.ElectronSystem, CDPL.Chem.Bond, CDPL.Chem.Atom, CDPL.Biomol.HierarchyViewModel, and CDPL.Biomol.HierarchyViewChain.