Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
System_updater_from_xdrfile< System > Class Template Reference

#include <system_updater_from_xdrfile.h>

Public Member Functions

template<class System_iterator >
 System_updater_from_xdrfile (System_iterator begin, System_iterator end, unsigned model_selected_, const std::string &xtc_fname, unsigned max_atoms, unsigned read_from=1, unsigned read_to=std::numeric_limits< unsigned >::max())
 
boost::tuple< bool, double, int > next_frame (bool is_init=false)
 
bool has_more_frames ()
 

Detailed Description

template<class System>
class ESBTL::System_updater_from_xdrfile< System >

Helper class responsible for updating the coordinates of a system according to a trajectory read from an xtc file. The system must already have been constructed (from a PDB file for example).

Note that using this class requires that the xdrfile library and header to be installed on your system (available as a package for your distribution or at ftp://ftp.gromacs.org/pub/contrib/xdrfile-1.1.tar.gz).

Refer to http://www.gromacs.org for more information.

Template Parameters
Systemis the type of the system used.

Constructor & Destructor Documentation

◆ System_updater_from_xdrfile()

System_updater_from_xdrfile ( System_iterator  begin,
System_iterator  end,
unsigned  model_selected_,
const std::string &  xtc_fname,
unsigned  max_atoms,
unsigned  read_from = 1,
unsigned  read_to = std::numeric_limits<unsigned>::max() 
)
inline

Constructor. It requires an already build model (from a PDB file for example.)

Template Parameters
System_iteratoris an iterator over systems used.
Parameters
beginis an iterator over the first system that need to be updated.
endis a past iterator over the last system that need to be updated.
model_selected_indicates the number of the model to be updated.
xtc_fnameis the path to the xtc file used to update the system coordinates.
max_atomsis an upper bound on the number of atoms contains in a frame.
read_fromis the index of the first frame to be loaded.
read_tois the index of the last frame to be loaded.

Member Function Documentation

◆ has_more_frames()

bool has_more_frames ( )
inline

Indicates whether a frame is available to update the system.

◆ next_frame()

boost::tuple<bool,double,int> next_frame ( bool  is_init = false)
inline

Loads the next frame into the system (update coordinates).

Returns
the tuple returned contains a boolean (indicating whether the next frame could be loaded), a double (indicating the time of the frame in the simulation) and an integer (indicating the simulation step).