LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
loos::MultiTrajectory Class Reference

Combine multiple trajectories (pTraj's) into one large virtual trajectory. More...

#include <MultiTraj.hpp>

Inheritance diagram for loos::MultiTrajectory:
Inheritance graph
[legend]
Collaboration diagram for loos::MultiTrajectory:
Collaboration graph
[legend]

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< GCoordcoords () 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< GCoordvelocities (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
 

Detailed Description

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.

Member Function Documentation

◆ coords()

virtual std::vector< GCoord > loos::MultiTrajectory::coords ( void ) const
inlinevirtual

Coordinates from the most recently read frame.

Implements loos::Trajectory.

◆ description()

virtual std::string loos::MultiTrajectory::description ( ) const
inlinevirtual

Return a string describing trajectory format.

Reimplemented from loos::Trajectory.

◆ hasPeriodicBox()

virtual bool loos::MultiTrajectory::hasPeriodicBox ( void ) const
inlinevirtual

Whether or not the current sub-trajectory has a periodic box.

Implements loos::Trajectory.

◆ hasVelocities()

virtual bool loos::MultiTrajectory::hasVelocities ( void ) const
inlinevirtual

Whether or not the current sub-trajectory has a periodic box.

Reimplemented from loos::Trajectory.

◆ natoms()

virtual uint loos::MultiTrajectory::natoms ( ) const
inlinevirtual

of atoms per frame

Implements loos::Trajectory.

◆ nframes()

virtual uint loos::MultiTrajectory::nframes ( void ) const
inlinevirtual

Total number of frames in composite trajectory.

Implements loos::Trajectory.

◆ periodicBox()

virtual GCoord loos::MultiTrajectory::periodicBox ( void ) const
inlinevirtual

The periodic box of the current sub-trajectory.

Implements loos::Trajectory.

◆ timestep()

virtual float loos::MultiTrajectory::timestep ( void ) const
inlinevirtual

Ignore timesteps (for now)

Implements loos::Trajectory.


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