Simpatico  v1.10
List of all members | Public Member Functions | Protected Member Functions
McMd::ConfigIo Class Referenceabstract

Detailed Description

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>

Inheritance diagram for McMd::ConfigIo:
McMd::DdMdConfigIo McMd::LammpsConfigIo McMd::McMdConfigIo McMd::SmpConfigIo McMd::McConfigIo McMd::MdConfigIo

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

Systemsystem () const
 Get a reference to the parent System. More...
 
Simulationsimulation () const
 Get a reference to the parent Simulation. More...
 
Boundaryboundary () const
 Get the Boundary. More...
 

Constructor & Destructor Documentation

McMd::ConfigIo::ConfigIo ( System system)

Constructor.

Definition at line 19 of file mcMd/configIos/ConfigIo.cpp.

McMd::ConfigIo::~ConfigIo ( )
virtual

Destructor.

Definition at line 28 of file mcMd/configIos/ConfigIo.cpp.

Member Function Documentation

virtual void McMd::ConfigIo::read ( std::istream &  in)
pure virtual

Read configuration (particle positions) from file.

Parameters
ininput file stream.

Implemented in McMd::LammpsConfigIo, McMd::DdMdConfigIo, McMd::McMdConfigIo, and McMd::SmpConfigIo.

Referenced by McMd::System::readConfig().

virtual void McMd::ConfigIo::write ( std::ostream &  out)
pure virtual

Write configuration (particle positions) to file.

Parameters
outoutput file stream.

Implemented in McMd::LammpsConfigIo, McMd::DdMdConfigIo, McMd::McMdConfigIo, and McMd::SmpConfigIo.

Referenced by McMd::System::writeConfig().

System & McMd::ConfigIo::system ( ) const
inlineprotected
Simulation & McMd::ConfigIo::simulation ( ) const
inlineprotected
Boundary & McMd::ConfigIo::boundary ( ) const
inlineprotected

The documentation for this class was generated from the following files: