|
LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
A very lightweight class for writing simple DCDs. More...
#include <dcdwriter.hpp>


Public Member Functions | |
| DCDWriter (const std::string &s, const bool append=false) | |
| Setup for writing to a file named by s. | |
| DCDWriter (std::iostream &fs, const bool append=false) | |
| Setup for writing to a stream. | |
| DCDWriter (const std::string &s, const std::vector< AtomicGroup > &grps, const bool append=false) | |
| Writes the coordinates of grps to file s as a DCD. | |
| DCDWriter (const std::string &s, const std::vector< AtomicGroup > &grps, const std::string &comment, const bool append=false) | |
| Writes coordinates of grps adding comment as a TITLE record. | |
| DCDWriter (const std::string &s, const std::vector< AtomicGroup > &grps, const std::vector< std::string > &comments, const bool append=false) | |
| Writes coordinates of grps adding comments as TITLE records. | |
| void | setHeader (const int na, const int ns, const greal ts, const bool bf) |
| Sets header parameters. | |
| void | setTitles (const std::vector< std::string > &titles) |
| void | setTitle (const std::string &s) |
| void | addTitle (const std::string &s) |
| void | setComments (const std::vector< std::string > &comments) |
| Set comments in metadata (not all formats support) | |
| bool | hasComments () const |
| Does format support comments in metadata? | |
| void | writeFrame (const AtomicGroup &grp) |
| Writes a frame to a growing DCD. | |
| void | writeFrames (const std::vector< AtomicGroup > &grps) |
| Same as writeFrame(), but writes out the vector of frames... | |
| void | writeHeader (void) |
| uint | framesWritten (void) const |
| Total frames in output file. | |
Public Member Functions inherited from loos::TrajectoryWriter | |
| TrajectoryWriter (const std::string &fname, const bool append=false) | |
| Write a trajectory to a file, optionally appending. | |
| TrajectoryWriter (std::iostream *s, const bool append=false) | |
| Write a trajectory to a stream. | |
| virtual void | setComments (const std::string &s) |
| Set comment in metadata (not all formats support) | |
| virtual void | writeFrame (const AtomicGroup &model, const uint step, const double time) |
| Write a single frame specifying the step and timepoint. | |
| virtual bool | hasFrameStep () const |
| Can format write step on a per-frame basis? | |
| virtual bool | hasFrameTime () const |
| Can format write time on a per-frame basis? | |
| bool | isAppending () const |
| Returns true if appending to an existing trajectory. | |
Static Public Member Functions | |
| static pTrajectoryWriter | create (const std::string &s, const bool append=false) |
Additional Inherited Members | |
Protected Attributes inherited from loos::TrajectoryWriter | |
| std::iostream * | stream_ |
| std::string | _filename |
| bool | appending_ |
| bool | delete_ |
A very lightweight class for writing simple DCDs.
Setup for writing to a file named by s.
You can opt to write the header explicitly, i.e.
Or you can let dcdwriter create the header from the first frame written...
|
inlinevirtual |
Total frames in output file.
For files being appended too, this includes the frames already written...
Implements loos::TrajectoryWriter.
|
inlinevirtual |
Does format support comments in metadata?
Reimplemented from loos::TrajectoryWriter.
|
inlinevirtual |
Set comments in metadata (not all formats support)
Reimplemented from loos::TrajectoryWriter.
|
inline |
Sets header parameters.
These must be set prior to writing a header or frame, but it is not an error to not do so... Arguments:
na Number of atoms ns Number of steps (total frames) ts Timestep of each frame bf Flag for whether or not each frame will include periodic box info as Xtal data
|
virtual |
Writes a frame to a growing DCD.
writeFrame() will automatically extend the DCD for you if you write past the initially specified number of frames. Alternatively, you can just begin writing frames without explicitly writing a header and let writeFrame() handle it for you. As the DCD grows, writeFrame() will automatically update the header information for you.
Implements loos::TrajectoryWriter.