Simpatico
v1.10
|
This class reads and writes the data file format that is read by the LAMMPS read_data command. Because the DdMd data model is very different than that used in Simpatico, there are signficant restrictions on the use of such files:
1) When reading a LAMMPS data file, the maximum total number of atoms defined by the Simpatico parameter file must exactly match the number of atoms in the data file.
2) The atom ids (or tags) in the DdMd data file must appear in order, numbered from 1. This is checked.
3) The ordering of atoms in the lammps file and the topology are assumed to be consistent with that used in Simpatico. The topology information in the DdMd data file is discarded. This requires that atoms within each molecule be listed sequentially, with molecules with the same species listed sequentially, and that ordered of atoms within each molecule be consistent with the numbering scheme used in Simpatico. Thus far, none of this is checked.
Definition at line 49 of file mcMd/configIos/DdMdConfigIo.h.
#include <DdMdConfigIo.h>
Public Member Functions | |
DdMdConfigIo (System &system, bool hasMolecules=false) | |
Constructor. More... | |
virtual | ~DdMdConfigIo () |
Destructor. More... | |
void | read (std::istream &in) |
Read configuration (particle positions) from file. More... | |
void | write (std::ostream &out) |
Write configuration (particle positions) to file. More... | |
![]() | |
ConfigIo (System &system) | |
Constructor. More... | |
virtual | ~ConfigIo () |
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... | |
McMd::DdMdConfigIo::DdMdConfigIo | ( | System & | system, |
bool | hasMolecules = false |
||
) |
Constructor.
Definition at line 33 of file mcMd/configIos/DdMdConfigIo.cpp.
|
virtual |
Destructor.
Definition at line 41 of file mcMd/configIos/DdMdConfigIo.cpp.
|
virtual |
Read configuration (particle positions) from file.
in | input file stream. |
Implements McMd::ConfigIo.
Definition at line 44 of file mcMd/configIos/DdMdConfigIo.cpp.
References McMd::System::addMolecule(), McMd::Molecule::begin(), McMd::System::boundary(), Simp::Species::capacity(), McMd::Simulation::getMolecule(), Simp::Species::nAtom(), Simp::Species::nBond(), Util::ArrayIterator< Data >::notEnd(), McMd::Simulation::nSpecies(), McMd::ConfigIo::simulation(), McMd::Simulation::species(), McMd::ConfigIo::system(), UTIL_CHECK, and UTIL_THROW.
|
virtual |
Write configuration (particle positions) to file.
out | output file stream. |
Implements McMd::ConfigIo.
Definition at line 120 of file mcMd/configIos/DdMdConfigIo.cpp.
References McMd::System::begin(), McMd::System::boundary(), Util::Format::initStatic(), Simp::Species::nAngle(), Simp::Species::nAtom(), Simp::Species::nBond(), Simp::Species::nDihedral(), McMd::System::nMolecule(), Util::ArrayIterator< Data >::notEnd(), Util::PArrayIterator< Data >::notEnd(), McMd::Simulation::nSpecies(), McMd::ConfigIo::simulation(), McMd::System::simulation(), McMd::Simulation::species(), and McMd::ConfigIo::system().