RMF
RMF::TraverseHelper Class Reference

Track common data that one needs to keep as one traverses the hierarchy. More...

#include <RMF/TraverseHelper.h>

Inheritance diagram for RMF::TraverseHelper:

Public Member Functions

 TraverseHelper (NodeConstHandle root, std::string molecule_name, double resolution=10000, int state_filter=-1)
Nullable< String > get_chain_id () const
 Get the current chain id or None.
TraverseHelpers get_children () const
 Return other nodes to traverse.
Nullable< Int > get_copy_index () const
 Get the current copy index or None.
Vector3 get_global_coordinates (const Vector3 &v)
unsigned int get_index (NodeID n) const
 Return a unique id for the current particle.
bool get_is_displayed (NodeID n)
std::string get_molecule_name () const
 Get the current molecule name or None.
Nullable< Int > get_residue_index () const
 Get the current residue index or None.
Nullable< String > get_residue_type () const
 Get the current residue type or None.
Nullable< Vector3 > get_rgb_color () const
 Get the current color or None.
unsigned int get_state_index () const
 Get the current state or 0.
unsigned int set_is_displayed ()
 Set that the current node is displayed and return its index.
Public Member Functions inherited from RMF::NodeConstHandle
template<class T>
T get_association () const
 Return the associated pointer for this node.
NodeConstHandles get_children () const
FileConstHandle get_file () const
bool get_has_association () const
NodeID get_id () const
std::string get_name () const
NodeType get_type () const
 get the type of this node
 operator NodeID () const
template<class T>
void set_association (const T &v, bool overwrite=false) const
template<class Tag>
Nullable< typename Tag::Type > get_value (ID< Tag > k) const
template<class Tag>
bool get_has_value (ID< Tag > k) const
template<class Tag>
Nullable< typename Tag::Type > get_frame_value (ID< Tag > k) const
template<class Tag>
Nullable< typename Tag::Type > get_static_value (ID< Tag > k) const

Additional Inherited Members

Protected Member Functions inherited from RMF::NodeConstHandle
FrameID get_current_frame_id () const
std::string get_file_name () const
Protected Attributes inherited from RMF::NodeConstHandle
NodeID node_
std::shared_ptr< internal::SharedData > shared_

Detailed Description

Things like residue index, chain id, and the local reference frame are all properties of the path taken to reach a given node when traversing. This class helps keep track of them.

Feel free to request that other data types be added.

Note
In the case of non-default resolution with alternatives nodes, the node this inherits from may not be the one you visited. So you should just pass this object when you need to access the node.

Definition at line 39 of file TraverseHelper.h.

Constructor & Destructor Documentation

◆ TraverseHelper()

RMF::TraverseHelper::TraverseHelper ( )

Definition at line 71 of file TraverseHelper.h.

Member Function Documentation

◆ get_chain_id()

Nullable< String > RMF::TraverseHelper::get_chain_id ( ) const

Definition at line 76 of file TraverseHelper.h.

◆ get_copy_index()

Nullable< Int > RMF::TraverseHelper::get_copy_index ( ) const

Definition at line 102 of file TraverseHelper.h.

◆ get_global_coordinates()

Vector3 RMF::TraverseHelper::get_global_coordinates ( const Vector3 & v)

Definition at line 106 of file TraverseHelper.h.

◆ get_is_displayed()

bool RMF::TraverseHelper::get_is_displayed ( NodeID n)

Definition at line 113 of file TraverseHelper.h.

◆ get_molecule_name()

std::string RMF::TraverseHelper::get_molecule_name ( ) const

Definition at line 91 of file TraverseHelper.h.

◆ get_residue_index()

Nullable< Int > RMF::TraverseHelper::get_residue_index ( ) const

Definition at line 81 of file TraverseHelper.h.

◆ get_residue_type()

Nullable< String > RMF::TraverseHelper::get_residue_type ( ) const

Definition at line 86 of file TraverseHelper.h.

◆ get_rgb_color()

Nullable< Vector3 > RMF::TraverseHelper::get_rgb_color ( ) const

Definition at line 94 of file TraverseHelper.h.

◆ get_state_index()

unsigned int RMF::TraverseHelper::get_state_index ( ) const

Definition at line 99 of file TraverseHelper.h.


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