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

Class for reading Amber Trajectories in NetCDF format. More...

#include <amber_netcdf.hpp>

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

Public Member Functions

 AmberNetcdf (const std::string &s, const uint na)
 
std::string description () const
 Return a string describing trajectory format.
 
uint natoms () const
 
uint nframes () const
 Number of frames in the trajectory.
 
float timestep () const
 Timestep per frame.
 
bool hasPeriodicBox () const
 
GCoord periodicBox () 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< GCoordcoords () const
 Returns the current frames coordinates as a vector of GCoords.
 
- 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< 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
 

Static Public Member Functions

static pTraj create (const std::string &fname, const AtomicGroup &model)
 

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
 

Detailed Description

Class for reading Amber Trajectories in NetCDF format.

Member Function Documentation

◆ coords()

std::vector< GCoord > loos::AmberNetcdf::coords ( ) const
inlinevirtual

Returns the current frames coordinates as a vector of GCoords.

Some formats, notably DCDs, do not interleave their coordinates. This means that this could be a potentially expensive operation.

Implements loos::Trajectory.

◆ description()

std::string loos::AmberNetcdf::description ( ) const
inlinevirtual

Return a string describing trajectory format.

Reimplemented from loos::Trajectory.

◆ hasPeriodicBox()

bool loos::AmberNetcdf::hasPeriodicBox ( ) const
inlinevirtual

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.

◆ hasVelocities()

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

Whether or not the trajectory format supports velocities.

Reimplemented from loos::Trajectory.

◆ natoms()

uint loos::AmberNetcdf::natoms ( ) const
inlinevirtual

of atoms per frame

Implements loos::Trajectory.

◆ nframes()

uint loos::AmberNetcdf::nframes ( ) const
inlinevirtual

Number of frames in the trajectory.

Implements loos::Trajectory.

◆ periodicBox()

GCoord loos::AmberNetcdf::periodicBox ( ) const
inlinevirtual

Returns the periodic box for the current frame/trajectory.

Implements loos::Trajectory.

◆ timestep()

float loos::AmberNetcdf::timestep ( ) const
inlinevirtual

Timestep per frame.

Implements loos::Trajectory.

◆ velocityConversionFactor()

virtual double loos::AmberNetcdf::velocityConversionFactor ( ) const
inlinevirtual

Conversion applied to velocities to get to \AA/ps.

Reimplemented from loos::Trajectory.


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