8 #include "DdMdTrajectoryWriter.h" 9 #include <ddMd/simulation/Simulation.h> 10 #include <ddMd/communicate/AtomCollector.h> 11 #include <ddMd/chemistry/Atom.h> 12 #include <util/archives/BinaryFileOArchive.h> 13 #include <util/space/Vector.h> 73 if (r[j] >= 1.0) r[j] -= 1.0;
74 if (r[j] < 0.0) r[j] += 1.0;
75 ir = floor( UINT_MAX*r[j] + r[j] + 0.5 );
Base class to write a trajectory to a single file.
const int Dimension
Dimensionality of space.
Domain & domain()
Get the Domain by reference.
A Vector is a Cartesian vector.
int nAtomTotal() const
Get total number of atoms on all processors.
Vector & position()
Get position Vector by reference.
void send()
Send all atoms to the master.
A point particle in an MD simulation.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
int id() const
Get unique global index for this atom.
void writeFrame(std::ofstream &file, long iStep)
Write a single frame.
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Atom * nextPtr()
Return a pointer to the next available atom, or null.
void computeNAtomTotal(MPI::Intracomm &communicator)
Compute the total number of local atoms on all processors.
AtomCollector & atomCollector()
Get the AtomCollector by reference.
virtual ~DdMdTrajectoryWriter()
Destructor.
bool isCartesian() const
Are atom coordinates Cartesian (true) or generalized (false)?
void writeHeader(std::ofstream &file)
Write trajectory file header.
void setClassName(const char *className)
Set class name string.
void setup()
Setup master processor for receiving.
Boundary & boundary()
Get Boundary by reference.
AtomStorage & atomStorage()
Get AtomStorage by reference.
DdMdTrajectoryWriter(Simulation &simulation)
Constructor.
void transformCartToGen(const Vector &Rc, Vector &Rg) const
Transform Cartesian Vector to scaled / generalized coordinates.