Simpatico
v1.10
|
System configuration file reader and writer.
A ConfigIo object is used by a System to read and write the configuration file for the System. The configuration file contains the Boundary dimensions, the number of molecules of each Species, and the atomic positions for every Atom in that System.
The ConfigIo class defines default implementations of the virtual read() and write() methods. These define the default config file format for Simpatico. Other formats may be read and written by using an instance of a subclass of ConfigIo, for which the overridden read() and write() methods must define the desired file format.
A System holds a pointer to a ConfigIo, which may be set by the System::setConfigIo() method. By default, if no ConfigIo is set explicitly, the System will create and use an instance of ConfigIo when needed.
Definition at line 46 of file mcMd/configIos/ConfigIo.h.
#include <ConfigIo.h>
Public Member Functions | |
ConfigIo (System &system) | |
Constructor. More... | |
virtual | ~ConfigIo () |
Destructor. More... | |
virtual void | read (std::istream &in)=0 |
Read configuration (particle positions) from file. More... | |
virtual void | write (std::ostream &out)=0 |
Write configuration (particle positions) to file. More... | |
Protected Member Functions | |
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::ConfigIo::ConfigIo | ( | System & | system | ) |
Constructor.
Definition at line 19 of file mcMd/configIos/ConfigIo.cpp.
|
virtual |
Destructor.
Definition at line 28 of file mcMd/configIos/ConfigIo.cpp.
|
pure virtual |
Read configuration (particle positions) from file.
in | input file stream. |
Implemented in McMd::LammpsConfigIo, McMd::DdMdConfigIo, McMd::McMdConfigIo, and McMd::SmpConfigIo.
Referenced by McMd::System::readConfig().
|
pure virtual |
Write configuration (particle positions) to file.
out | output file stream. |
Implemented in McMd::LammpsConfigIo, McMd::DdMdConfigIo, McMd::McMdConfigIo, and McMd::SmpConfigIo.
Referenced by McMd::System::writeConfig().
|
inlineprotected |
Get a reference to the parent System.
Definition at line 101 of file mcMd/configIos/ConfigIo.h.
Referenced by McMd::McMdConfigIo::read(), McMd::SmpConfigIo::read(), McMd::DdMdConfigIo::read(), McMd::LammpsConfigIo::read(), McMd::SmpConfigIo::write(), McMd::McMdConfigIo::write(), McMd::DdMdConfigIo::write(), and McMd::LammpsConfigIo::write().
|
inlineprotected |
Get a reference to the parent Simulation.
Definition at line 110 of file mcMd/configIos/ConfigIo.h.
Referenced by McMd::McMdConfigIo::read(), McMd::SmpConfigIo::read(), McMd::DdMdConfigIo::read(), McMd::LammpsConfigIo::read(), McMd::SmpConfigIo::write(), McMd::McMdConfigIo::write(), McMd::DdMdConfigIo::write(), and McMd::LammpsConfigIo::write().
|
inlineprotected |
Get the Boundary.
Definition at line 119 of file mcMd/configIos/ConfigIo.h.
Referenced by McMd::McMdConfigIo::read(), McMd::SmpConfigIo::read(), McMd::LammpsConfigIo::read(), McMd::McConfigIo::readAtom(), McMd::MdConfigIo::readAtom(), McMd::SmpConfigIo::write(), McMd::McMdConfigIo::write(), and McMd::LammpsConfigIo::write().