22#if !defined(LOOS_PDBTRAJ_HPP)
23#define LOOS_PDBTRAJ_HPP
33#include <loos_defs.hpp>
34#include <AtomicGroup.hpp>
35#include <Trajectory.hpp>
70 explicit PDBTraj(
const std::string& s, uint st, uint en, uint str=1) :
Trajectory(), pattern(s), start(st), end(en),
71 stride(str), _natoms(0), _nframes(0), current_index(0),
72 at_end(false) { init();
readFrame(0); cached_first =
true; }
74 explicit PDBTraj(
const char *p, uint st, uint en, uint str=1) :
Trajectory(), pattern(std::string(p)),
75 start(st), end(en), stride(str), _natoms(0),
76 _nframes(0), current_index(0), at_end(false) { init();
readFrame(0); cached_first =
true; }
79 std::string
description()
const {
return(
"Trajectory from set of PDB files"); }
81 virtual uint
nframes(
void)
const;
82 virtual uint
natoms(
void)
const;
83 virtual std::vector<GCoord>
coords(
void)
const;
109 virtual void rewindImpl(
void);
110 virtual void seekNextFrameImpl(
void);
111 virtual void seekFrameImpl(
const uint);
117 uint start, end, stride;
118 uint _natoms, _nframes;
121 std::string current_name;
Class for handling groups of Atoms (pAtoms, actually)
Definition AtomicGroup.hpp:108
PDB reading/writing class.
Definition pdb.hpp:69
Class for intepreting separate PDB files as a single trajectory.
Definition pdbtraj.hpp:55
PDBTraj(const std::string &s, uint st, uint en, uint str=1)
Definition pdbtraj.hpp:70
virtual GCoord periodicBox(void) const
Returns the periodic box for the current frame/trajectory.
Definition pdbtraj.cpp:41
std::string description() const
Return a string describing trajectory format.
Definition pdbtraj.hpp:79
virtual uint nframes(void) const
Number of frames in the trajectory.
Definition pdbtraj.cpp:28
virtual void updateGroupCoords(AtomicGroup &g)
Definition pdbtraj.cpp:32
virtual float timestep(void) const
Timestep per frame.
Definition pdbtraj.cpp:42
PDB currentFrame(void) const
See CCPDB::currentFrame() for important notes.
Definition pdbtraj.cpp:44
virtual bool hasPeriodicBox(void) const
Definition pdbtraj.cpp:40
virtual std::vector< GCoord > coords(void) const
Returns the current frames coordinates as a vector of GCoords.
Definition pdbtraj.cpp:101
virtual bool parseFrame(void)
Parse an actual frame.
Definition pdbtraj.cpp:83
std::string currentName(void) const
Returns the auto-generated name for the file containing the current frame.
Definition pdbtraj.cpp:43
virtual uint natoms(void) const
Definition pdbtraj.cpp:29
Base-class for polymorphic trajectories.
Definition Trajectory.hpp:65
bool readFrame(void)
Reads the next frame in a trajectory, returning false if at the end.
Definition Trajectory.hpp:241
Namespace for most things not already encapsulated within a class.
Definition version.cpp:3