LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
Class for reading DCD files. More...
#include <dcd.hpp>
Classes | |
class | EndOfFile |
Public Member Functions | |
DCD (const std::string s) | |
Begin reading from the file named s. | |
DCD (const char *s) | |
Begin reading from the file named s. | |
DCD (std::istream &fs) | |
Begin reading from the stream ifs. | |
std::string | description () const |
Return a string describing trajectory format. | |
virtual uint | natoms (void) const |
virtual bool | hasPeriodicBox (void) const |
virtual GCoord | periodicBox (void) const |
Returns the periodic box for the current frame/trajectory. | |
virtual bool | hasVelocities () const |
Whether or not the trajectory format supports velocities. | |
virtual double | velocityConversionFactor () const |
Conversion applied to velocities to get to \AA/ps. | |
std::vector< std::string > | titles (void) const |
int | icntrl (const int) const |
void | icntrl (const int, const int) |
std::vector< double > | crystalParams (void) const |
bool | hasCrystalParams (void) const |
virtual float | timestep (void) const |
Timestep per frame. | |
virtual uint | nframes (void) const |
Number of frames in the trajectory. | |
std::vector< dcd_real > | xcoords (void) const |
Return the raw coords... | |
std::vector< dcd_real > | ycoords (void) const |
Return the raw coords... | |
std::vector< dcd_real > | zcoords (void) const |
Return the raw coords... | |
unsigned int | nsteps (void) const |
float | delta (void) const |
int | nsavc (void) const |
int | nfile (void) const |
int | nfixed (void) const |
bool | nativeFormat (void) const |
Returns true if the DCD file being read is in the native endian format. | |
virtual std::vector< GCoord > | coords (void) const |
Auto-interleave the coords into a vector of GCoord()'s. | |
std::vector< GCoord > | mappedCoords (const std::vector< int > &map) |
Interleave coords, selecting entries indexed by map. | |
virtual bool | parseFrame (void) |
Parse a frame of the DCD. | |
Public Member Functions inherited from loos::Trajectory | |
Trajectory (const std::string &s) | |
Automatically open the file named s. | |
Trajectory (std::istream &fs) | |
Open using the given stream... | |
Trajectory (const Trajectory &t) | |
virtual std::string | filename () const |
Return the stored filename. | |
bool | rewind (void) |
Rewinds the readFrame() iterator. | |
void | updateGroupCoords (AtomicGroup &g) |
Update the coordinates in an AtomicGroup with the current frame. | |
virtual std::vector< GCoord > | velocities (void) const |
Returns the current frame's velocities as a vector of GCoords. | |
void | updateGroupVelocities (AtomicGroup &g) |
void | seekNextFrame (void) |
void | seekFrame (const uint i) |
bool | readFrame (void) |
Reads the next frame in a trajectory, returning false if at the end. | |
bool | readFrame (const int i) |
Reads a specific frame in a trajectory. | |
bool | atEnd () const |
uint | currentFrame () const |
Static Public Member Functions | |
static pTraj | create (const std::string &fname, const AtomicGroup &model) |
static void | setSuppression (const bool b) |
Additional Inherited Members | |
Public Types inherited from loos::Trajectory | |
typedef boost::shared_ptr< std::istream > | pStream |
Protected Member Functions inherited from loos::Trajectory | |
void | setInputStream (const std::string &fname) |
void | setInputStream (std::istream &fs) |
Protected Attributes inherited from loos::Trajectory | |
pStream | ifs |
bool | cached_first |
std::string | _filename |
uint | _current_frame |
Class for reading DCD files.
Instantiating a DCD object with either a filename or an fstream only reads the header from the file, not any frames. When a frame is read, the x,y,z coordinates are stored internally in a vector. This must be copied out to the caller or used to update the coordinates for an AtomicGroup.
Notes:
|
virtual |
Auto-interleave the coords into a vector of GCoord()'s.
This can be a pretty slow operation, so be careful.
Implements loos::Trajectory.
|
inlinevirtual |
Return a string describing trajectory format.
Reimplemented from loos::Trajectory.
|
virtual |
Tests whether or not the given frame/trajectory has periodic boundary information. The presence of periodic box information does not necessarily indicate that said information has been read in yet. For example, the presence of crystal data is in the header so this can be detected before any frame is read, but the crystal data itself is only read when a frame is read in.
Implements loos::Trajectory.
|
inlinevirtual |
Whether or not the trajectory format supports velocities.
Reimplemented from loos::Trajectory.
|
virtual |
Implements loos::Trajectory.
|
virtual |
Number of frames in the trajectory.
Implements loos::Trajectory.
|
virtual |
Parse a frame of the DCD.
Implements loos::Trajectory.
|
virtual |
Returns the periodic box for the current frame/trajectory.
Implements loos::Trajectory.
|
virtual |
Timestep per frame.
Implements loos::Trajectory.
|
inlinevirtual |
Conversion applied to velocities to get to \AA/ps.
Reimplemented from loos::Trajectory.