LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
Combine multiple trajectories (pTraj's) into one large virtual trajectory. More...
#include <MultiTraj.hpp>
Public Types | |
typedef std::pair< uint, uint > | Location |
Public Types inherited from loos::Trajectory | |
typedef boost::shared_ptr< std::istream > | pStream |
Public Member Functions | |
MultiTrajectory (const AtomicGroup &model) | |
instantiate a new empty MultiTrajectory | |
MultiTrajectory (const AtomicGroup &model, const uint skip, const uint stride) | |
MultiTrajectory (const std::vector< std::string > &filenames, const AtomicGroup &model) | |
Instantiate a new MultiTrajectory using the passed filenames. | |
MultiTrajectory (const std::vector< std::string > &filenames, const AtomicGroup &model, const uint skip, const uint stride) | |
void | addTrajectory (const std::string &filename) |
Add a trajectory (by filename) | |
virtual std::string | description () const |
Return a string describing trajectory format. | |
virtual uint | natoms () const |
virtual uint | nframes () const |
Total number of frames in composite trajectory. | |
uint | nframes (const uint i) const |
Number of frames in the ith trajectory. | |
uint | size () const |
Number of trajectories contained. | |
pTraj | operator[] (const uint i) const |
Access the individual trajectories. | |
virtual float | timestep () const |
Ignore timesteps (for now) | |
virtual bool | hasPeriodicBox () const |
Whether or not the current sub-trajectory has a periodic box. | |
virtual GCoord | periodicBox () const |
The periodic box of the current sub-trajectory. | |
virtual bool | hasVelocities () const |
Whether or not the current sub-trajectory has a periodic box. | |
virtual std::vector< GCoord > | coords () const |
Coordinates from the most recently read frame. | |
uint | currentTrajectoryIndex () const |
Index into the trajectory list for the trajectory currently used. | |
uint | currentFrameIndex () const |
Raw index into the current trajectory for the current frame (i.e. with skip & stride applied) | |
Location | frameIndexToLocation (const uint i) |
bool | eof () const |
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. | |
virtual double | velocityConversionFactor () const |
Conversion applied to velocities to get to \AA/ps. | |
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 |
Additional Inherited Members | |
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 |
Combine multiple trajectories (pTraj's) into one large virtual trajectory.
This class can be used just about anywhere a regular Trajectory/pTraj can be used. Note that the skip and stride settings are applied to each sub-trajectory (as opposed to the composite trajectory). They are also set ONLY at instantiation.
|
inlinevirtual |
Coordinates from the most recently read frame.
Implements loos::Trajectory.
|
inlinevirtual |
Return a string describing trajectory format.
Reimplemented from loos::Trajectory.
|
inlinevirtual |
Whether or not the current sub-trajectory has a periodic box.
Implements loos::Trajectory.
|
inlinevirtual |
Whether or not the current sub-trajectory has a periodic box.
Reimplemented from loos::Trajectory.
|
inlinevirtual |
Implements loos::Trajectory.
|
inlinevirtual |
Total number of frames in composite trajectory.
Implements loos::Trajectory.
|
inlinevirtual |
The periodic box of the current sub-trajectory.
Implements loos::Trajectory.
|
inlinevirtual |
Ignore timesteps (for now)
Implements loos::Trajectory.