Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Biomol.HierarchyView Class Reference

A datastructure allowing 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 molecular graph molgraph. More...
 
ResidueList getResidues ()
 
int getNumModels ()
 
HierarchyViewModel getModel (int idx)
 
bool hasModelWithNumber (int num)
 
HierarchyViewModel getModelByNumber (int num)
 
int __len__ ()
 
HierarchyViewModel __getitem__ (int idx)
 

Properties

 objectID = property(getObjectID)
 
 numModels = property(getNumModels)
 
 residues = property(getResidues)
 

Detailed Description

A datastructure allowing a hierarchical view on biological macromolecules.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Biomol.HierarchyView.__init__ ( Chem.MolecularGraph  molgraph)

Constructs a HierarchyView instance for the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to build the hierarchy view.

Member Function Documentation

◆ getObjectID()

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().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ build()

None CDPL.Biomol.HierarchyView.build ( Chem.MolecularGraph  molgraph)

Build the hierarchy view for the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to build the hierarchy view.

◆ getResidues()

ResidueList CDPL.Biomol.HierarchyView.getResidues ( )
Returns

◆ getNumModels()

int CDPL.Biomol.HierarchyView.getNumModels ( )
Returns

◆ getModel()

HierarchyViewModel CDPL.Biomol.HierarchyView.getModel ( int  idx)
Parameters
idx
Returns

◆ hasModelWithNumber()

bool CDPL.Biomol.HierarchyView.hasModelWithNumber ( int  num)
Parameters
num
Returns

◆ getModelByNumber()

HierarchyViewModel CDPL.Biomol.HierarchyView.getModelByNumber ( int  num)
Parameters
num
Returns

◆ __len__()

int CDPL.Biomol.HierarchyView.__len__ ( )
Returns

◆ __getitem__()

HierarchyViewModel CDPL.Biomol.HierarchyView.__getitem__ ( int  idx)
Parameters
idx
Returns