Simpatico
v1.10
|
TrajectoryReader for Lammps dump trajectory files.
This class assumes that atom ids are ordered by molecule and species, with consecutive ids for atoms in the same molecule and consecutive blocks for molecules in the same species. It does not require that the atoms be ordered consecutively by id within the dump file.
Definition at line 30 of file mcMd/trajectory/LammpsDumpReader.h.
#include <LammpsDumpReader.h>
Public Member Functions | |
LammpsDumpReader (System &system) | |
Constructor. More... | |
virtual | ~LammpsDumpReader () |
Destructor. More... | |
void | open (std::string filename) |
Open file. More... | |
bool | readFrame () |
Read a single frame. More... | |
void | close () |
Close file. More... | |
![]() | |
TrajectoryReader (System &system) | |
Constructor. More... | |
virtual | ~TrajectoryReader () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
System & | system () const |
Get a reference to the parent System. More... | |
Simulation & | simulation () const |
Get a reference to the parent Simulation. More... | |
Boundary & | boundary () const |
Get the Boundary. More... | |
virtual void | addMolecules () |
Add all molecules to system. More... | |
![]() | |
int | nAtomTotal_ |
Total number of atoms (all species) More... | |
McMd::LammpsDumpReader::LammpsDumpReader | ( | System & | system | ) |
Constructor.
Definition at line 28 of file mcMd/trajectory/LammpsDumpReader.cpp.
|
virtual |
Destructor.
Definition at line 35 of file mcMd/trajectory/LammpsDumpReader.cpp.
|
virtual |
Open file.
filename | input file name. |
Implements McMd::TrajectoryReader.
Definition at line 41 of file mcMd/trajectory/LammpsDumpReader.cpp.
References McMd::TrajectoryReader::addMolecules(), McMd::Simulation::fileMaster(), McMd::TrajectoryReader::nAtomTotal_, Util::FileMaster::openInputFile(), McMd::TrajectoryReader::simulation(), and UTIL_THROW.
|
virtual |
Read a single frame.
Frames are assumed to be read consecutively.
Implements McMd::TrajectoryReader.
Definition at line 62 of file mcMd/trajectory/LammpsDumpReader.cpp.
References McMd::Molecule::begin(), McMd::TrajectoryReader::boundary(), Simp::Species::capacity(), Util::checkString(), Util::Dimension, Util::getNextLine(), McMd::System::molecule(), McMd::TrajectoryReader::nAtomTotal_, Util::ArrayIterator< Data >::notEnd(), McMd::Simulation::nSpecies(), Simp::OrthorhombicBoundary::setOrthorhombic(), Simp::OrthorhombicBoundary::shift(), McMd::TrajectoryReader::simulation(), McMd::Simulation::species(), McMd::TrajectoryReader::system(), and UTIL_THROW.
|
virtual |
Close file.
Implements McMd::TrajectoryReader.
Definition at line 164 of file mcMd/trajectory/LammpsDumpReader.cpp.