8 #include "TrajectoryWriter.h" 9 #include <ddMd/simulation/Simulation.h> 10 #include <util/mpi/MpiLoader.h> 25 isInitialized_(false),
37 , dihedralStoragePtr_(0)
41 domainPtr_ = &simulation.
domain();
42 boundaryPtr_ = &simulation.
boundary();
63 isInitialized_ =
true;
73 isInitialized_ =
true;
94 std::ios::out | std::ios::binary);
117 if (outputFile_.is_open()) {
Abstract base for periodic output and/or analysis actions.
Simulation & simulation()
Get the parent Simulation by reference.
void readOutputFileName(std::istream &in)
Read outputFileName from file.
void saveInterval(Serializable::OArchive &ar)
Save interval parameter to an archive.
virtual void clear()
Clear nSample counter.
AtomStorage & atomStorage()
Get the AtomStorage by reference.
DihedralStorage & dihedralStorage()
Get the DihedralStorage by reference.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
void openOutputFile(const std::string &filename, std::ofstream &out, std::ios_base::openmode mode=std::ios_base::out) const
Open an output file.
virtual void readParameters(std::istream &in)
Read parameters and initialize.
void readInterval(std::istream &in)
Read parameter interval from file.
virtual void setup()
Open the trajectory file.
virtual void output()
Close ouput file.
BondStorage & bondStorage()
Get the BondStorage by reference.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
virtual void writeFrame(std::ofstream &out, long iStep)=0
Write data that should appear in every frame.
Saving / output archive for binary ostream.
void loadOutputFileName(Serializable::IArchive &ar)
Load output file name to an archive.
bool isBinary() const
Is the file format binary (true) or text (false)?
FileMaster & fileMaster()
Get the associated FileMaster by reference.
virtual void sample(long iStep)
Dump configuration to file.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
Utility classes for scientific computation.
bool isIoProcessor() const
Can this processor do file I/O ?
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
const std::string & outputFileName() const
Return outputFileName string.
A FileMaster manages input and output files for a simulation.
TrajectoryWriter(Simulation &simulation, bool isBinary=false)
Constructor.
Saving archive for binary istream.
void setClassName(const char *className)
Set class name string.
void loadInterval(Serializable::IArchive &ar)
Load parameter interval from input archive.
virtual void writeHeader(std::ofstream &out)
Write data that should appear once, at beginning of the file.
Boundary & boundary()
Get the Boundary by reference.
void saveOutputFileName(Serializable::OArchive &ar)
Save output file name to an archive.
Domain & domain()
Get the Domain by reference.
AngleStorage & angleStorage()
Get the AngleStorage by reference.