Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Biomol::HierarchyView Class Reference

Data structure providing a hierarchical view on biological macromolecules. More...

#include <HierarchyView.hpp>

Public Types

typedef std::shared_ptr< HierarchyViewSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated HierarchyView instances. More...
 
typedef boost::indirect_iterator< ModelList::const_iterator, const HierarchyViewModelConstModelIterator
 A constant iterator over the biological macromolecule models. More...
 

Public Member Functions

 HierarchyView ()
 Constructs an empty HierarchyView instance. More...
 
 HierarchyView (const Chem::MolecularGraph &molgraph)
 Constructs a HierarchyView instance for the molecular graph molgraph. More...
 
const ResidueListgetResidues () const
 Returns the flat list of all residues across all models of the biological macromolecule. More...
 
std::size_t getNumModels () const
 Returns the number of stored models. More...
 
const HierarchyViewModelgetModel (std::size_t idx) const
 Returns the model at index idx. More...
 
bool hasModelWithNumber (std::size_t num) const
 Tells whether a model with number num exists. More...
 
const HierarchyViewModelgetModelByNumber (std::size_t num) const
 Returns the model identified by model number num. More...
 
ConstModelIterator getModelsBegin () const
 Returns a constant iterator pointing to the first model. More...
 
ConstModelIterator getModelsEnd () const
 Returns a constant iterator pointing one past the last model. More...
 
ConstModelIterator begin () const
 Returns a constant iterator pointing to the first model (range-based for support). More...
 
ConstModelIterator end () const
 Returns a constant iterator pointing one past the last model (range-based for support). More...
 
void build (const Chem::MolecularGraph &molgraph)
 Build the hierarchy view for the biological macromolecule represented by molgraph. More...
 

Detailed Description

Data structure providing a hierarchical view on biological macromolecules.

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated HierarchyView instances.

◆ ConstModelIterator

typedef boost::indirect_iterator<ModelList::const_iterator, const HierarchyViewModel> CDPL::Biomol::HierarchyView::ConstModelIterator

A constant iterator over the biological macromolecule models.

Constructor & Destructor Documentation

◆ HierarchyView() [1/2]

CDPL::Biomol::HierarchyView::HierarchyView ( )

Constructs an empty HierarchyView instance.

◆ HierarchyView() [2/2]

CDPL::Biomol::HierarchyView::HierarchyView ( const 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

◆ getResidues()

const ResidueList& CDPL::Biomol::HierarchyView::getResidues ( ) const

Returns the flat list of all residues across all models of the biological macromolecule.

Returns
A const reference to the residue list.

◆ getNumModels()

std::size_t CDPL::Biomol::HierarchyView::getNumModels ( ) const

Returns the number of stored models.

Returns
The number of models.

◆ getModel()

const HierarchyViewModel& CDPL::Biomol::HierarchyView::getModel ( std::size_t  idx) const

Returns the model at index idx.

Parameters
idxThe zero-based model index.
Returns
A const reference to the model.
Exceptions
Base::IndexErrorif the number of models is zero or idx is not in the range [0, getNumModels() - 1].

◆ hasModelWithNumber()

bool CDPL::Biomol::HierarchyView::hasModelWithNumber ( std::size_t  num) const

Tells whether a model with number num exists.

Parameters
numThe PDB model number.
Returns
true if such a model exists, and false otherwise.

◆ getModelByNumber()

const HierarchyViewModel& CDPL::Biomol::HierarchyView::getModelByNumber ( std::size_t  num) const

Returns the model identified by model number num.

Parameters
numThe PDB model number.
Returns
A const reference to the model.
Exceptions
Base::ItemNotFoundif no model with the requested number exists.

◆ getModelsBegin()

ConstModelIterator CDPL::Biomol::HierarchyView::getModelsBegin ( ) const

Returns a constant iterator pointing to the first model.

Returns
A constant iterator pointing to the first model.

◆ getModelsEnd()

ConstModelIterator CDPL::Biomol::HierarchyView::getModelsEnd ( ) const

Returns a constant iterator pointing one past the last model.

Returns
A constant iterator pointing one past the last model.

◆ begin()

ConstModelIterator CDPL::Biomol::HierarchyView::begin ( ) const

Returns a constant iterator pointing to the first model (range-based for support).

Returns
A constant iterator pointing to the first model.

◆ end()

ConstModelIterator CDPL::Biomol::HierarchyView::end ( ) const

Returns a constant iterator pointing one past the last model (range-based for support).

Returns
A constant iterator pointing one past the last model.

◆ build()

void CDPL::Biomol::HierarchyView::build ( const Chem::MolecularGraph molgraph)

Build the hierarchy view for the biological macromolecule represented by molgraph.

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

The documentation for this class was generated from the following file: