8 #include "LammpsDumpWriter.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/format/Dbl.h> 14 #include <util/space/Vector.h> 47 file <<
"ITEM: TIMESTEP" <<
"\n";
48 file << iStep <<
"\n";
50 file <<
"ITEM: NUMBER OF ATOMS" <<
"\n";
51 file << nAtom_ <<
"\n";
53 file <<
"ITEM: BOX BOUNDS pp pp pp" <<
"\n";
55 file <<
Dbl(0.0) <<
Dbl(lengths[0]) <<
"\n";
56 file <<
Dbl(0.0) <<
Dbl(lengths[1]) <<
"\n";
57 file <<
Dbl(0.0) <<
Dbl(lengths[2]) <<
"\n";
66 file <<
"ITEM: ATOMS id type mol x y z" <<
"\n";
71 typeId = atomPtr->
typeId();
78 file << typeId + 1 <<
" ";
Base class to write a trajectory to a single file.
int typeId() const
Get atom type index.
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.
const Vector & lengths() const
Get Vector of unit cell lengths by const reference.
Vector & position()
Get position Vector by reference.
void send()
Send all atoms to the master.
LammpsDumpWriter(Simulation &simulation)
Constructor.
Wrapper for a double precision number, for formatted ostream output.
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)
Read a single frame.
Utility classes for scientific computation.
Atom * nextPtr()
Return a pointer to the next available atom, or null.
virtual ~LammpsDumpWriter()
Destructor.
void transformGenToCart(const Vector &Rg, Vector &Rc) const
Transform Vector of generalized coordinates to Cartesian Vector.
void computeNAtomTotal(MPI::Intracomm &communicator)
Compute the total number of local atoms on all processors.
AtomCollector & atomCollector()
Get the AtomCollector by reference.
bool isCartesian() const
Are atom coordinates Cartesian (true) or generalized (false)?
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.