![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Data structure providing a hierarchical view on biological macromolecules. More...
Inheritance diagram for CDPL.Biomol.HierarchyView:Public Member Functions | |
| None | __init__ () |
Constructs an empty HierarchyView instance. | |
| None | __init__ (Chem.MolecularGraph molgraph) |
Constructs a HierarchyView instance for the molecular graph molgraph. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| None | build (Chem.MolecularGraph molgraph) |
| Build the hierarchy view for the biological macromolecule represented by molgraph. More... | |
| ResidueList | getResidues () |
| Returns the flat list of all residues across all models of the biological macromolecule. More... | |
| int | getNumModels () |
| Returns the number of stored models. More... | |
| HierarchyViewModel | getModel (int idx) |
| Returns the model at index idx. More... | |
| bool | hasModelWithNumber (int num) |
| Tells whether a model with number num exists. More... | |
| HierarchyViewModel | getModelByNumber (int num) |
| Returns the model identified by model number num. More... | |
| int | __len__ () |
| HierarchyViewModel | __getitem__ (int idx) |
Properties | |
| objectID = property(getObjectID) | |
| numModels = property(getNumModels) | |
| residues = property(getResidues) | |
Data structure providing a hierarchical view on biological macromolecules.
| None CDPL.Biomol.HierarchyView.__init__ | ( | Chem.MolecularGraph | molgraph | ) |
Constructs a HierarchyView instance for the molecular graph molgraph.
| molgraph | The molecular graph for which to build the hierarchy view. |
| int CDPL.Biomol.HierarchyView.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python HierarchyView instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two HierarchyView instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| None CDPL.Biomol.HierarchyView.build | ( | Chem.MolecularGraph | molgraph | ) |
Build the hierarchy view for the biological macromolecule represented by molgraph.
| molgraph | The molecular graph of the biological macromolecule for which to build the hierarchy view. |
| ResidueList CDPL.Biomol.HierarchyView.getResidues | ( | ) |
Returns the flat list of all residues across all models of the biological macromolecule.
| int CDPL.Biomol.HierarchyView.getNumModels | ( | ) |
Returns the number of stored models.
| HierarchyViewModel CDPL.Biomol.HierarchyView.getModel | ( | int | idx | ) |
Returns the model at index idx.
| idx | The zero-based model index. |
| Base.IndexError | if the number of models is zero or idx is not in the range [0, getNumModels() - 1]. |
| bool CDPL.Biomol.HierarchyView.hasModelWithNumber | ( | int | num | ) |
Tells whether a model with number num exists.
| num | The model number. |
True if such a model exists, and False otherwise. | HierarchyViewModel CDPL.Biomol.HierarchyView.getModelByNumber | ( | int | num | ) |
Returns the model identified by model number num.
| num | The model number. |
| Base.ItemNotFound | if no model with the requested number exists. |
| int CDPL.Biomol.HierarchyView.__len__ | ( | ) |
| HierarchyViewModel CDPL.Biomol.HierarchyView.__getitem__ | ( | int | idx | ) |
| idx |