Simpatico  v1.10
List of all members | Public Types | Public Member Functions | Protected Member Functions
McMd::System Class Reference

Detailed Description

A set of interacting Molecules enclosed by a Boundary.

A System has:

A System must be associated with a parent Simulation, which owns many of the data structures used by a System.

The MdSystem and McSystem subclasses of System are designed for use in MD and MC simulations, respectively, and provide methods to evaluate energies and forces.

Definition at line 115 of file System.h.

#include <System.h>

Inheritance diagram for McMd::System:
Util::ParamComposite Util::ParamComponent Util::Serializable Util::MpiFileIo McMd::McSystem McMd::MdSystem

Public Types

typedef ArraySet< MoleculeMoleculeSet
 A set of molecules of one Species in a System. More...
 
typedef PArrayIterator< MoleculeMoleculeIterator
 Iterator for a MoleculeSet. More...
 
typedef ConstPArrayIterator< MoleculeConstMoleculeIterator
 Const Iterator for a MoleculeSet. More...
 
- Public Types inherited from Util::Serializable
typedef BinaryFileOArchive OArchive
 Type of output archive used by save method. More...
 
typedef BinaryFileIArchive IArchive
 Type of input archive used by load method. More...
 

Public Member Functions

 System ()
 Default constructor. More...
 
 System (const System &other)
 Copy constructor. More...
 
virtual ~System ()
 Destructor. More...
 
Initialization
void setId (int Id)
 Set the integer Id for this System. More...
 
void setSimulation (Simulation &simulation)
 Set the parent Simulation. More...
 
void setFileMaster (FileMaster &filemaster)
 Set the FileMaster. More...
 
virtual void readParameters (std::istream &in)
 Read parameter file. More...
 
virtual void loadParameters (Serializable::IArchive &ar)
 Load internal state from an archive. More...
 
void saveParameters (Serializable::OArchive &ar)
 Save internal state from an archive. More...
 
Config File IO
Factory< ConfigIo > & configIoFactory ()
 Get the configuration file reader/writer factory by reference. More...
 
void setConfigIo (std::string &classname)
 Create a new configuration file reader/writer. More...
 
virtual void readConfig (std::istream &in)
 Read system configuration from file. More...
 
void readConfig (std::string filename)
 Open, read and close configuration file. More...
 
void writeConfig (std::ostream &out)
 Write system configuration to a specified ostream. More...
 
void writeConfig (std::string filename)
 Open, write and close a configuration file. More...
 
virtual void loadConfig (Serializable::IArchive &ar)
 Load configuration. More...
 
void saveConfig (Serializable::OArchive &ar)
 Save configuration. More...
 
Trajectory File IO
Factory< TrajectoryReader > & trajectoryReaderFactory ()
 Get the trajectory reader/writer factory by reference. More...
 
Molecule Set Mutators
void addMolecule (Molecule &molecule)
 Add a Molecule to this System. More...
 
void removeMolecule (Molecule &molecule)
 Remove a specific molecule from this System. More...
 
void removeAllMolecules ()
 Remove all molecules from this System. More...
 
void subscribeMoleculeSetChange (MoleculeSetObserver &observer)
 Subscribe to moleculeSet change signal. More...
 
void unsubscribeMoleculeSetChange (MoleculeSetObserver &observer)
 Unsubscribe from moleculeSet change signal. More...
 
Molecule Set Accessors
int nMolecule (int speciesId) const
 Get the number of molecules of one Species in this System. More...
 
int nAtom () const
 Return the total number of atoms in this System. More...
 
bool isEmpty () const
 Is this an empty System (i.e., one with no molecules) ? More...
 
int moleculeId (const Molecule &molecule) const
 Get the index of a Molecule within its Species in this System. More...
 
Moleculemolecule (int speciesId, int moleculeId)
 Get a specific Molecule in this System, by integer index. More...
 
MoleculerandomMolecule (int speciesId)
 Get a random Molecule of a specified species in this System. More...
 
void begin (int speciesId, MoleculeIterator &iterator)
 Initialize an iterator for molecules of one species in this System. More...
 
void begin (int speciesId, ConstMoleculeIterator &iterator) const
 Initialize a const iterator for molecules of one species in this System. More...
 
Potential Energy Factories and Styles
PairFactorypairFactory ()
 Get the PairFactory by reference. More...
 
std::string pairStyle () const
 Return nonbonded pair style string. More...
 
Factory< BondPotential > & bondFactory ()
 Get the associated Factory<BondPotential> by reference. More...
 
std::string bondStyle () const
 Return covalent bond style string. More...
 
Factory< AnglePotential > & angleFactory ()
 Get the associated AngleFactory by reference. More...
 
std::string angleStyle () const
 Return angle potential style string. More...
 
Factory< DihedralPotential > & dihedralFactory ()
 Get the associated Dihedral Factory by reference. More...
 
std::string dihedralStyle () const
 Return dihedral potential style string. More...
 
CoulombFactorycoulombFactory ()
 Get the associated Coulomb Factory by reference. More...
 
std::string coulombStyle () const
 Return coulomb potential style string. More...
 
Factory< ExternalPotential > & externalFactory ()
 Get the associated ExternalPotential factory by reference. More...
 
std::string externalStyle () const
 Return external potential style string. More...
 
Factory< BondPotential > & linkFactory ()
 Get the associated Link factory by reference. More...
 
std::string linkStyle () const
 Return link potential style string. More...
 
LinkMasterlinkMaster () const
 Get the LinkMaster by reference. More...
 
Free Energy Perturbation Theory
Factory< Perturbation > & perturbationFactory ()
 Get the perturbation factory by reference. More...
 
void setExpectPerturbation ()
 Set to expect a Perturbation in the parameter file. More...
 
bool expectPerturbation () const
 Return true if we expect a perturbation. More...
 
bool hasPerturbation () const
 Does this system have an associated Perturbation? More...
 
Perturbationperturbation () const
 Get the associated Perturbation by reference. More...
 
bool hasReplicaMove () const
 Does this system have an associated ReplicaMove? More...
 
ReplicaMovereplicaMove () const
 Get the associated ReplicaMove by reference. More...
 
Accessors (Miscellaneous)
int id () const
 Get integer index for this System. More...
 
Simulationsimulation () const
 Get the parent Simulation by reference. More...
 
Boundaryboundary () const
 Get the Boundary by reference. More...
 
EnergyEnsembleenergyEnsemble () const
 Get the EnergyEnsemble by reference. More...
 
BoundaryEnsembleboundaryEnsemble () const
 Get the BoundaryEnsemble by reference. More...
 
FileMasterfileMaster () const
 Get the associated FileMaster by reference. More...
 
bool isCopy () const
 Was this System instantiated with the copy constructor? More...
 
virtual bool isValid () const
 Return true if valid, or throw Exception. More...
 
- Public Member Functions inherited from Util::ParamComposite
 ParamComposite ()
 Constructor. More...
 
 ParamComposite (const ParamComposite &other)
 Copy constructor. More...
 
 ParamComposite (int capacity)
 Constructor. More...
 
virtual ~ParamComposite ()
 Virtual destructor. More...
 
void resetParam ()
 Resets ParamComposite to its empty state. More...
 
virtual void readParam (std::istream &in)
 Read the parameter file block. More...
 
virtual void readParamOptional (std::istream &in)
 Read optional parameter file block. More...
 
virtual void writeParam (std::ostream &out)
 Write all parameters to an output stream. More...
 
virtual void load (Serializable::IArchive &ar)
 Load all parameters from an input archive. More...
 
virtual void loadOptional (Serializable::IArchive &ar)
 Load an optional ParamComposite. More...
 
virtual void save (Serializable::OArchive &ar)
 Saves all parameters to an archive. More...
 
void saveOptional (Serializable::OArchive &ar)
 Saves isActive flag, and then calls save() iff isActive is true. More...
 
void readParamComposite (std::istream &in, ParamComposite &child, bool next=true)
 Add and read a required child ParamComposite. More...
 
void readParamCompositeOptional (std::istream &in, ParamComposite &child, bool next=true)
 Add and attempt to read an optional child ParamComposite. More...
 
template<typename Type >
ScalarParam< Type > & read (std::istream &in, const char *label, Type &value)
 Add and read a new required ScalarParam < Type > object. More...
 
template<typename Type >
ScalarParam< Type > & readOptional (std::istream &in, const char *label, Type &value)
 Add and read a new optional ScalarParam < Type > object. More...
 
template<typename Type >
CArrayParam< Type > & readCArray (std::istream &in, const char *label, Type *value, int n)
 Add and read a required C array parameter. More...
 
template<typename Type >
CArrayParam< Type > & readOptionalCArray (std::istream &in, const char *label, Type *value, int n)
 Add and read an optional C array parameter. More...
 
template<typename Type >
DArrayParam< Type > & readDArray (std::istream &in, const char *label, DArray< Type > &array, int n)
 Add and read a required DArray < Type > parameter. More...
 
template<typename Type >
DArrayParam< Type > & readOptionalDArray (std::istream &in, const char *label, DArray< Type > &array, int n)
 Add and read an optional DArray < Type > parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & readFArray (std::istream &in, const char *label, FArray< Type, N > &array)
 Add and read a required FArray < Type, N > array parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & readOptionalFArray (std::istream &in, const char *label, FArray< Type, N > &array)
 Add and read an optional FArray < Type, N > array parameter. More...
 
template<typename Type >
CArray2DParam< Type > & readCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np)
 Add and read a required CArray2DParam < Type > 2D C-array. More...
 
template<typename Type >
CArray2DParam< Type > & readOptionalCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np)
 Add and read an optional CArray2DParam < Type > 2D C-array parameter. More...
 
template<typename Type >
DMatrixParam< Type > & readDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and read a required DMatrix < Type > matrix parameter. More...
 
template<typename Type >
DMatrixParam< Type > & readOptionalDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and read an optional DMatrix < Type > matrix parameter. More...
 
template<typename Type >
DSymmMatrixParam< Type > & readDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n)
 Add and read a required symmetrix DMatrix. More...
 
template<typename Type >
DSymmMatrixParam< Type > & readOptionalDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n)
 Add and read an optional DMatrix matrix parameter. More...
 
BeginreadBegin (std::istream &in, const char *label, bool isRequired=true)
 Add and read a class label and opening bracket. More...
 
EndreadEnd (std::istream &in)
 Add and read the closing bracket. More...
 
BlankreadBlank (std::istream &in)
 Add and read a new Blank object, representing a blank line. More...
 
void loadParamComposite (Serializable::IArchive &ar, ParamComposite &child, bool next=true)
 Add and load a required child ParamComposite. More...
 
void loadParamCompositeOptional (Serializable::IArchive &ar, ParamComposite &child, bool next=true)
 Add and load an optional child ParamComposite if isActive. More...
 
template<typename Type >
ScalarParam< Type > & loadParameter (Serializable::IArchive &ar, const char *label, Type &value, bool isRequired)
 Add and load a new ScalarParam < Type > object. More...
 
template<typename Type >
ScalarParam< Type > & loadParameter (Serializable::IArchive &ar, const char *label, Type &value)
 Add and load new required ScalarParam < Type > object. More...
 
template<typename Type >
CArrayParam< Type > & loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n, bool isRequired)
 Add a C array parameter and load its elements. More...
 
template<typename Type >
CArrayParam< Type > & loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n)
 Add and load a required CArrayParam< Type > array parameter. More...
 
template<typename Type >
DArrayParam< Type > & loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n, bool isRequired)
 Add an load a DArray < Type > array parameter. More...
 
template<typename Type >
DArrayParam< Type > & loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n)
 Add and load a required DArray< Type > array parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array, bool isRequired)
 Add and load an FArray < Type, N > fixed-size array parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array)
 Add and load a required FArray < Type > array parameter. More...
 
template<typename Type >
CArray2DParam< Type > & loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np, bool isRequired)
 Add and load a CArray2DParam < Type > C 2D array parameter. More...
 
template<typename Type >
CArray2DParam< Type > & loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np)
 Add and load a required < Type > matrix parameter. More...
 
template<typename Type >
DMatrixParam< Type > & loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n, bool isRequired)
 Add and load a DMatrixParam < Type > matrix parameter. More...
 
template<typename Type >
DMatrixParam< Type > & loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and load a required DMatrixParam < Type > matrix parameter. More...
 
template<typename Type >
DSymmMatrixParam< Type > & loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n, bool isRequired)
 Add and load a symmetric DSymmMatrixParam < Type > matrix parameter. More...
 
template<typename Type >
DSymmMatrixParam< Type > & loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n)
 Add and load a required DSymmMatrixParam < Type > matrix parameter. More...
 
void addParamComposite (ParamComposite &child, bool next=true)
 Add a child ParamComposite object to the format array. More...
 
BeginaddBegin (const char *label)
 Add a Begin object representing a class name and bracket. More...
 
EndaddEnd ()
 Add a closing bracket. More...
 
BlankaddBlank ()
 Create and add a new Blank object, representing a blank line. More...
 
std::string className () const
 Get class name string. More...
 
bool isRequired () const
 Is this ParamComposite required in the input file? More...
 
bool isActive () const
 Is this parameter active? More...
 
- Public Member Functions inherited from Util::ParamComponent
virtual ~ParamComponent ()
 Destructor. More...
 
void setIndent (const ParamComponent &parent, bool next=true)
 Set indent level. More...
 
std::string indent () const
 Return indent string for this object (string of spaces). More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize this ParamComponent as a string. More...
 
- Public Member Functions inherited from Util::Serializable
virtual ~Serializable ()
 Destructor. More...
 
- Public Member Functions inherited from Util::MpiFileIo
 MpiFileIo ()
 Constructor. More...
 
 MpiFileIo (const MpiFileIo &other)
 Copy constructor. More...
 
bool isIoProcessor () const
 Can this processor do file I/O ? More...
 
void setIoCommunicator (MPI::Intracomm &communicator)
 Set the communicator. More...
 
void clearCommunicator ()
 Clear (nullify) the communicator. More...
 
bool hasIoCommunicator () const
 Does this object have an associated MPI communicator? More...
 
MPI::Intracomm & ioCommunicator () const
 Get the MPI communicator by reference. More...
 

Protected Member Functions

BoundarymaxBoundary () const
 Get the maximum Boundary by reference. More...
 
virtual ConfigIonewDefaultConfigIo ()
 Return a pointer to a new default ConfigIo. More...
 
virtual Factory< ConfigIo > * newDefaultConfigIoFactory ()
 Return a pointer to a new default ConfigIoFactory. More...
 
virtual Factory< TrajectoryReader > * newDefaultTrajectoryReaderFactory ()
 Return a pointer to a new default TrajectoryReaderFactory. More...
 
virtual Factory< Perturbation > * newDefaultPerturbationFactory ()
 Return a pointer to the default perturbation Factory. More...
 
void readPerturbation (std::istream &in)
 Read the perturbation parameter block (if any) More...
 
void loadPerturbation (Serializable::IArchive &ar)
 Load the perturbation parameter block (if any) More...
 
void savePerturbation (Serializable::OArchive &ar)
 Save the perturbation parameter block (if any) More...
 
void readReplicaMove (std::istream &in)
 Read the ReplicaMove parameter block (if any) More...
 
void loadReplicaMove (Serializable::IArchive &ar)
 Read the ReplicaMove parameter block (if any) More...
 
void saveReplicaMove (Serializable::OArchive &ar)
 Save the ReplicaMove parameter block (if any) More...
 
void allocateMoleculeSets ()
 Allocate and initialize molecule sets for all species. More...
 
void readFileMaster (std::istream &in)
 Read FileMaster parameters, if none yet exists. More...
 
void loadFileMaster (Serializable::IArchive &ar)
 Load FileMaster data from archive, if necessary. More...
 
void saveFileMaster (Serializable::OArchive &ar)
 If necessary, save FileMaster to archive. More...
 
void readPotentialStyles (std::istream &in)
 Read potential style parameter strings. More...
 
void loadPotentialStyles (Serializable::IArchive &ar)
 Load potential style strings from an archive. More...
 
void savePotentialStyles (Serializable::OArchive &ar)
 Save potential style strings. More...
 
void readEnsembles (std::istream &in)
 Read energy and boundary ensemble parameters. More...
 
void loadEnsembles (Serializable::IArchive &ar)
 Load energy and boundary ensembles from archive. More...
 
void saveEnsembles (Serializable::OArchive &ar)
 Save energy and boundary ensembles. More...
 
void readLinkMaster (std::istream &in)
 Read the LinkMaster parameters. More...
 
void loadLinkMaster (Serializable::IArchive &ar)
 Load the LinkMaster. More...
 
void saveLinkMaster (Serializable::OArchive &ar)
 Save the LinkMaster. More...
 
- Protected Member Functions inherited from Util::ParamComposite
void setClassName (const char *className)
 Set class name string. More...
 
void setIsRequired (bool isRequired)
 Set or unset the isActive flag. More...
 
void setIsActive (bool isActive)
 Set or unset the isActive flag. More...
 
void setParent (ParamComponent &param, bool next=true)
 Set this to the parent of a child component. More...
 
void addComponent (ParamComponent &param, bool isLeaf=true)
 Add a new ParamComponent object to the format array. More...
 
template<typename Type >
ScalarParam< Type > & add (std::istream &in, const char *label, Type &value, bool isRequired=true)
 Add a new required ScalarParam < Type > object. More...
 
template<typename Type >
CArrayParam< Type > & addCArray (std::istream &in, const char *label, Type *value, int n, bool isRequired=true)
 Add (but do not read) a required C array parameter. More...
 
template<typename Type >
DArrayParam< Type > & addDArray (std::istream &in, const char *label, DArray< Type > &array, int n, bool isRequired=true)
 Add (but do not read) a DArray < Type > parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & addFArray (std::istream &in, const char *label, FArray< Type, N > &array, bool isRequired=true)
 Add (but do not read) a FArray < Type, N > array parameter. More...
 
template<typename Type >
CArray2DParam< Type > & addCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np, bool isRequired=true)
 Add (but do not read) a CArray2DParam < Type > 2D C-array. More...
 
template<typename Type >
DMatrixParam< Type > & addDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n, bool isRequired=true)
 Add and read a required DMatrix < Type > matrix parameter. More...
 
- Protected Member Functions inherited from Util::ParamComponent
 ParamComponent ()
 Constructor. More...
 
 ParamComponent (const ParamComponent &other)
 Copy constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Util::ParamComponent
static void initStatic ()
 Initialize static echo member to false. More...
 
static void setEcho (bool echo=true)
 Enable or disable echoing for all subclasses of ParamComponent. More...
 
static bool echo ()
 Get echo parameter. More...
 

Member Typedef Documentation

A set of molecules of one Species in a System.

Definition at line 123 of file System.h.

Iterator for a MoleculeSet.

Definition at line 126 of file System.h.

Const Iterator for a MoleculeSet.

Definition at line 129 of file System.h.

Constructor & Destructor Documentation

McMd::System::System ( )

Default constructor.

Definition at line 78 of file System.cpp.

McMd::System::System ( const System other)

Copy constructor.

This is intended to be used to create the System subobject of an MdSystem that is created by a hybrid MD/MC move within a parent MC simulation. The constructor creates a shallow copy, in which the child has pointers to most of the same objects as those owned by the parent. Specifically, the child will have pointers to the same molecule sets for each species, the same Boundary, and the same energy and boundary ensembles as the parent system. A System created by copying a parent that has a Perturbation or Replica Exchange move will, however, not have pointers to these objects.

Parameters
otherSystem object being copied.

Definition at line 177 of file System.cpp.

McMd::System::~System ( )
virtual

Destructor.

Definition at line 272 of file System.cpp.

References isCopy().

Member Function Documentation

void McMd::System::setId ( int  Id)

Set the integer Id for this System.

Set id to zero for Simulation objects with one System.

Parameters
Idinteger System index.

Definition at line 862 of file System.cpp.

References id().

Referenced by McMd::McSimulation::McSimulation(), and McMd::MdSimulation::MdSimulation().

void McMd::System::setSimulation ( Simulation simulation)

Set the parent Simulation.

Parameters
simulationparent Simulation object.

Definition at line 872 of file System.cpp.

References simulation().

Referenced by McMd::McSimulation::McSimulation(), and McMd::MdSimulation::MdSimulation().

void McMd::System::setFileMaster ( FileMaster filemaster)

Set the FileMaster.

Is normally used to set the FileMaster to that of the parent Simulation.

Parameters
filemasterFileMaster object.

Definition at line 881 of file System.cpp.

References fileMaster().

Referenced by McMd::McSimulation::McSimulation(), and McMd::MdSimulation::MdSimulation().

void McMd::System::readParameters ( std::istream &  in)
virtual

Read parameter file.

Only reads parameters if this System is not a copy (i.e., was not constructed with the copy constructor). If it is a copy, this function does nothing and returns normally.

Parameters
inpararameter file input stream

Reimplemented from Util::ParamComposite.

Reimplemented in McMd::MdSystem, and McMd::McSystem.

Definition at line 368 of file System.cpp.

References allocateMoleculeSets(), isCopy(), readEnsembles(), readFileMaster(), readLinkMaster(), and readPotentialStyles().

void McMd::System::loadParameters ( Serializable::IArchive ar)
virtual

Load internal state from an archive.

Parameters
arinput/loading archive

Reimplemented from Util::ParamComposite.

Reimplemented in McMd::MdSystem, and McMd::McSystem.

Definition at line 390 of file System.cpp.

References allocateMoleculeSets(), isCopy(), loadEnsembles(), loadFileMaster(), loadLinkMaster(), and loadPotentialStyles().

void McMd::System::saveParameters ( Serializable::OArchive ar)

Save internal state from an archive.

Parameters
aroutput/saving archive

Definition at line 409 of file System.cpp.

References isCopy(), saveEnsembles(), saveFileMaster(), saveLinkMaster(), and savePotentialStyles().

Factory< ConfigIo > & McMd::System::configIoFactory ( )

Get the configuration file reader/writer factory by reference.

Definition at line 892 of file System.cpp.

References newDefaultConfigIoFactory().

void McMd::System::setConfigIo ( std::string &  classname)

Create a new configuration file reader/writer.

This function allows one to choose from among several subclasses of ConfigIo, identified by subclass name. The implementation uses a Factory<ConfigIo> object to instantiate a new object. If setConfigIoFactory() has not been called, an instance of the default class ConfigIoFactory is created and used.

Parameters
classnamename of desired ConfigIo subclass.

Definition at line 909 of file System.cpp.

References Util::Factory< Data >::factory(), newDefaultConfigIoFactory(), and UTIL_THROW.

Referenced by McMd::McCommandManager::readStandardCommand(), and McMd::MdCommandManager::readStandardCommand().

void McMd::System::readConfig ( std::istream &  in)
virtual

Read system configuration from file.

The configuration file contains the dimensions of the Boundary, the number of molecules of each Species, and the atomic positions for all atoms of all molecules in this System.

This function uses a ConfigIo object that is registered with this System. If a ConfigIo object has not been registered by calling setConfigIo(std::string&), this function creates and uses an instance of the ConfigIo base class.

Precondition: The System and its Parent Simulation must have been initialized by calling their readParam function.

Parameters
inconfiguration file input stream

Reimplemented in McMd::MdSystem, and McMd::McSystem.

Definition at line 808 of file System.cpp.

References isEmpty(), isValid(), newDefaultConfigIo(), McMd::ConfigIo::read(), and removeAllMolecules().

Referenced by McMd::McSystem::readConfig(), McMd::MdSystem::readConfig(), and readConfig().

void McMd::System::readConfig ( std::string  filename)

Open, read and close configuration file.

Uses FileMaster::openInputFile(filename) to open the file, which appends an input file prefix to the path. Calls the function readConfig(std::istream& ) internally.

Parameters
filenameconfiguration file name

Definition at line 825 of file System.cpp.

References fileMaster(), Util::FileMaster::openInputFile(), and readConfig().

void McMd::System::writeConfig ( std::ostream &  out)

Write system configuration to a specified ostream.

Like readConfig(), this function will create and use a ConfigIo object if none has been registered previously.

Parameters
outconfiguration file output stream

Definition at line 836 of file System.cpp.

References newDefaultConfigIo(), and McMd::ConfigIo::write().

Referenced by McMd::McCommandManager::readStandardCommand(), McMd::MdCommandManager::readStandardCommand(), McMd::Crosslinker::sample(), McMd::LammpsDumpWriter::sample(), McMd::ConfigWriter::sample(), and writeConfig().

void McMd::System::writeConfig ( std::string  filename)

Open, write and close a configuration file.

Uses FileMaster::openOutputFile(filename) to open the file, which appends a output file prefix to the path. Calls the function readConfig(std::istream& ) internally.

Parameters
filenameconfiguration file name

Definition at line 847 of file System.cpp.

References fileMaster(), Util::FileMaster::openOutputFile(), and writeConfig().

void McMd::System::loadConfig ( Serializable::IArchive ar)
virtual
void McMd::System::saveConfig ( Serializable::OArchive ar)
Factory< TrajectoryReader > & McMd::System::trajectoryReaderFactory ( )

Get the trajectory reader/writer factory by reference.

Definition at line 929 of file System.cpp.

References newDefaultTrajectoryReaderFactory().

Referenced by McMd::MdSimulation::analyzeTrajectory(), and McMd::McSimulation::analyzeTrajectory().

void McMd::System::addMolecule ( Molecule molecule)

Add a Molecule to this System.

This function adds a Molecule to the set of Molecules of the same Species in this System, and calls Molecule::setSystem(*this).

The molecule to be added should first be popped off the Species reservoir or removed from another System.

Parameters
moleculeMolecule to be added to this System.

Definition at line 1111 of file System.cpp.

References Simp::Species::id(), McMd::Molecule::setSystem(), McMd::Molecule::species(), and UTIL_THROW.

Referenced by McMd::TrajectoryReader::addMolecules(), McMd::Generator::generate(), loadConfig(), McMd::McMdConfigIo::read(), McMd::SmpConfigIo::read(), McMd::DdMdConfigIo::read(), McMd::LammpsConfigIo::read(), and McMd::McNVTChemicalPotential::sample().

void McMd::System::removeMolecule ( Molecule molecule)

Remove a specific molecule from this System.

This function removes a Molecule from the set of molecules of the same Species in this System, and calls Molecule::unsetSystem().

The removed Molecule should be pushed onto the Species reservoir or added to another System.

Parameters
moleculeMolecule to be removed from this System.

Definition at line 1129 of file System.cpp.

References Simp::Species::id(), McMd::Molecule::species(), McMd::Molecule::system(), McMd::Molecule::unsetSystem(), and UTIL_THROW.

Referenced by McMd::Generator::generate(), removeAllMolecules(), and McMd::McNVTChemicalPotential::sample().

void McMd::System::removeAllMolecules ( )

Remove all molecules from this System.

Remove all molecules of every species from this System, and push each onto the reservoir for the appropriate Species.

Definition at line 1163 of file System.cpp.

References McMd::LinkMaster::clear(), linkMaster(), molecule(), nMolecule(), McMd::Simulation::nSpecies(), removeMolecule(), McMd::Simulation::returnMolecule(), and simulation().

Referenced by McMd::MdSimulation::analyzeConfigs(), McMd::McSimulation::analyzeConfigs(), and readConfig().

void McMd::System::subscribeMoleculeSetChange ( MoleculeSetObserver observer)
inline

Subscribe to moleculeSet change signal.

Parameters
observerthe observer

Definition at line 1212 of file System.h.

void McMd::System::unsubscribeMoleculeSetChange ( MoleculeSetObserver observer)
inline

Unsubscribe from moleculeSet change signal.

Parameters
observerthe observer

Definition at line 1218 of file System.h.

int McMd::System::nMolecule ( int  speciesId) const
inline
int McMd::System::nAtom ( ) const
bool McMd::System::isEmpty ( ) const

Is this an empty System (i.e., one with no molecules) ?

Definition at line 1147 of file System.cpp.

References nMolecule(), McMd::Simulation::nSpecies(), and simulation().

Referenced by readConfig().

int McMd::System::moleculeId ( const Molecule molecule) const

Get the index of a Molecule within its Species in this System.

This function returns the current (mutable) index of the molecule within the set of molecules of the same Species in this System, in the range 0 <= moleculeId < nMolecule(speciesId). This is the index required as the second argument of molecule(int, int).

Note: The id returned by this function is not the same as the id returned by Molecule::id(), which is a permanent identifier for each molecule that is set immediately after allocation.

Parameters
moleculeMolecule object of interest.
Returns
index for molecule within its Species and System.

Definition at line 1189 of file System.cpp.

References Simp::Species::id(), and McMd::Molecule::species().

Referenced by McMd::Sliplinker::move(), McMd::SliplinkMove::move(), McMd::CfbDoubleRebridgeMove::move(), randomMolecule(), McMd::InterIntraLink::sample(), and McMd::McMdConfigIo::write().

Molecule & McMd::System::molecule ( int  speciesId,
int  moleculeId 
)
inline

Get a specific Molecule in this System, by integer index.

The moleculeId must be in range 0 <= moleculeId < nMolecule(speciesId). The index associated with a molecule is mutable, and can change when another molecule of the same Species is removed from this System. The value of this index is returned by System::moleculeId().

Parameters
speciesIdinteger id of the desired Species
moleculeIdinteger id of molecule within Species and System
Returns
reference to the molecule

Definition at line 1137 of file System.h.

Referenced by loadConfig(), McMd::CfbDoubleRebridgeMove::move(), McMd::RingOctaRebridgeMove::move(), McMd::ComMSD::output(), randomMolecule(), McMd::McMdConfigIo::read(), McMd::LammpsDumpReader::readFrame(), McMd::DdMdTrajectoryReader::readFrame(), McMd::DCDTrajectoryReader::readFrame(), removeAllMolecules(), McMd::G1MSD::sample(), McMd::AtomMSD::sample(), McMd::ComMSD::sample(), McMd::RingRouseAutoCorr::sample(), McMd::EndtoEndXYZ::sample(), McMd::LinearRouseAutoCorr::sample(), McMd::EndtoEnd::sample(), McMd::BlockRadiusGyration::sample(), McMd::IntraPairAutoCorr::sample(), McMd::RadiusGyration::sample(), McMd::RingOctaRebridgeMove::scanBridge(), McMd::G1MSD::setup(), McMd::AtomMSD::setup(), and McMd::ComMSD::setup().

Molecule & McMd::System::randomMolecule ( int  speciesId)
void McMd::System::begin ( int  speciesId,
MoleculeIterator iterator 
)
inline

Initialize an iterator for molecules of one species in this System.

Parameters
speciesIdinteger Id for the desired Species (input)
iteratormolecule iterator (output)

Definition at line 1147 of file System.h.

Referenced by McMd::MdEwaldPotential::addForces(), McMd::MdSpmePotential::addForces(), McMd::MdEwaldPotential::computeEnergy(), McMd::MdSpmePotential::computeEnergy(), McMd::McExternalPerturbation< Interaction >::derivative(), McMd::McPairExternalPerturbation< PairInteraction, ExternalInteraction >::derivative(), McMd::ClusterIdentifier::identifyClusters(), McMd::ClusterIdentifier::isValid(), McMd::MdSystem::kineticEnergy(), McMd::MdEwaldPotential::makeWaves(), McMd::MdSpmePotential::makeWaves(), McMd::HybridMdMove::move(), McMd::HybridNphMdMove::move(), McMd::ReplicaMove::move(), McMd::McCommandManager::readStandardCommand(), McMd::MdSystem::removeDriftVelocity(), McMd::Crosslinker::sample(), McMd::McExternalEnergyAverage::sample(), McMd::McMuExchange::sample(), McMd::CompositionProfile::sample(), McMd::RDF::sample(), McMd::StructureFactor::sample(), McMd::VanHove::sample(), McMd::StructureFactorP::sample(), McMd::IntraStructureFactor::sample(), saveConfig(), McMd::MdSystem::setBoltzmannVelocities(), McMd::MdSystem::setZeroForces(), McMd::MdSystem::setZeroVelocities(), McMd::MdSystem::shiftAtoms(), McMd::NveVvIntegrator::step(), McMd::NvtLangevinIntegrator::step(), McMd::NvtDpdVvIntegrator::step(), McMd::NvtNhIntegrator::step(), McMd::NphIntegrator::step(), McMd::McMdConfigIo::write(), McMd::SmpConfigIo::write(), McMd::DdMdConfigIo::write(), and McMd::LammpsConfigIo::write().

void McMd::System::begin ( int  speciesId,
ConstMoleculeIterator iterator 
) const
inline

Initialize a const iterator for molecules of one species in this System.

Parameters
speciesIdinteger Id for the desired Species (input)
iteratormolecule iterator (output)

Definition at line 1157 of file System.h.

PairFactory & McMd::System::pairFactory ( )
std::string McMd::System::pairStyle ( ) const
Factory< BondPotential > & McMd::System::bondFactory ( )
std::string McMd::System::bondStyle ( ) const
Factory< AnglePotential > & McMd::System::angleFactory ( )
std::string McMd::System::angleStyle ( ) const
Factory< DihedralPotential > & McMd::System::dihedralFactory ( )

Get the associated Dihedral Factory by reference.

Definition at line 1289 of file System.cpp.

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().

std::string McMd::System::dihedralStyle ( ) const

Return dihedral potential style string.

Definition at line 1301 of file System.cpp.

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().

CoulombFactory & McMd::System::coulombFactory ( )

Get the associated Coulomb Factory by reference.

Definition at line 1309 of file System.cpp.

Referenced by McMd::MdSystem::loadParameters(), and McMd::MdSystem::readParameters().

std::string McMd::System::coulombStyle ( ) const
Factory< ExternalPotential > & McMd::System::externalFactory ( )
std::string McMd::System::externalStyle ( ) const

Return external potential style string.

Definition at line 1341 of file System.cpp.

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().

Factory< BondPotential > & McMd::System::linkFactory ( )

Get the associated Link factory by reference.

Definition at line 1366 of file System.cpp.

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().

std::string McMd::System::linkStyle ( ) const
LinkMaster & McMd::System::linkMaster ( ) const
inline
Factory< Perturbation > & McMd::System::perturbationFactory ( )
inline

Get the perturbation factory by reference.

Return the perturbation factory by reference.

Definition at line 1173 of file System.h.

void McMd::System::setExpectPerturbation ( )

Set to expect a Perturbation in the parameter file.

Definition at line 948 of file System.cpp.

References hasPerturbation(), newDefaultPerturbationFactory(), and UTIL_THROW.

Referenced by loadPerturbation(), McMd::MdSimulation::setOptions(), and McMd::McSimulation::setOptions().

bool McMd::System::expectPerturbation ( ) const
inline

Return true if we expect a perturbation.

Should this system create a Perturbation?

Definition at line 1167 of file System.h.

Referenced by McMd::McSystem::readParameters().

bool McMd::System::hasPerturbation ( ) const
inline
Perturbation & McMd::System::perturbation ( ) const
inline
bool McMd::System::hasReplicaMove ( ) const
inline

Does this system have an associated ReplicaMove?

Definition at line 1195 of file System.h.

ReplicaMove & McMd::System::replicaMove ( ) const
inline

Get the associated ReplicaMove by reference.

Definition at line 1201 of file System.h.

Referenced by McMd::McSimulation::simulate().

int McMd::System::id ( ) const
inline

Get integer index for this System.

Definition at line 1049 of file System.h.

Referenced by setId().

Simulation & McMd::System::simulation ( ) const
inline

Get the parent Simulation by reference.

Definition at line 1055 of file System.h.

Referenced by allocateMoleculeSets(), McMd::BennettsMethod::BennettsMethod(), McMd::McExternalPerturbation< Interaction >::derivative(), McMd::McPairExternalPerturbation< PairInteraction, ExternalInteraction >::derivative(), McMd::McPerturbationFactory::factory(), McMd::Generator::generate(), McMd::McSystem::generateMolecules(), McMd::MdSystem::generateMolecules(), McMd::ClusterIdentifier::initialize(), isEmpty(), McMd::MdSimulation::isValid(), isValid(), McMd::MdSystem::kineticEnergy(), loadConfig(), loadLinkMaster(), McMd::SemiGrandDistribution::loadParameters(), McMd::AtomMSD::loadParameters(), McMd::CfbLinearEndMove::loadParameters(), McMd::TypeDistribution::loadParameters(), McMd::RingTetraRebridgeMove::loadParameters(), McMd::ComMSD::loadParameters(), McMd::RingRouseAutoCorr::loadParameters(), McMd::MdPairEnergyCoefficients::loadParameters(), McMd::LinearRouseAutoCorr::loadParameters(), McMd::RDF::loadParameters(), McMd::CompositionProfile::loadParameters(), McMd::McMuExchange::loadParameters(), McMd::StructureFactor::loadParameters(), McMd::McSystem::loadParameters(), McMd::IntraPairAutoCorr::loadParameters(), McMd::RadiusGyration::loadParameters(), McMd::ReplicaMove::loadParameters(), McMd::BlockRadiusGyration::loadParameters(), McMd::MdSystem::loadParameters(), McMd::StructureFactorP::loadParameters(), McMd::IntraStructureFactor::loadParameters(), loadPotentialStyles(), McMd::PairFactory::mdFactory(), McMd::Sliplinker::move(), McMd::SliplinkerAll::move(), McMd::ReplicaMove::move(), nAtom(), McMd::VelProf::output(), McMd::LinkLTPos::output(), McMd::McEnergyAnalyzer::output(), McMd::MdEnergyAnalyzer::output(), randomMolecule(), readLinkMaster(), McMd::AtomMSD::readParameters(), McMd::SemiGrandDistribution::readParameters(), McMd::RingTetraRebridgeMove::readParameters(), McMd::CfbLinearEndMove::readParameters(), McMd::G1MSD::readParameters(), McMd::TypeDistribution::readParameters(), McMd::ComMSD::readParameters(), McMd::McMuExchange::readParameters(), McMd::RingRouseAutoCorr::readParameters(), McMd::LinearRouseAutoCorr::readParameters(), McMd::MdPairEnergyCoefficients::readParameters(), McMd::RDF::readParameters(), McMd::CompositionProfile::readParameters(), McMd::StructureFactor::readParameters(), McMd::EndtoEndXYZ::readParameters(), McMd::IntraPairAutoCorr::readParameters(), McMd::McSystem::readParameters(), McMd::RadiusGyration::readParameters(), McMd::EndtoEnd::readParameters(), McMd::BlockRadiusGyration::readParameters(), McMd::StructureFactorGrid::readParameters(), McMd::StructureFactorPGrid::readParameters(), McMd::ReplicaMove::readParameters(), McMd::IntraStructureFactorGrid::readParameters(), McMd::VanHove::readParameters(), McMd::MdSystem::readParameters(), McMd::StructureFactorP::readParameters(), McMd::IntraStructureFactor::readParameters(), readPotentialStyles(), removeAllMolecules(), McMd::MdSystem::removeDriftVelocity(), McMd::ReplicaMove::ReplicaMove(), McMd::Crosslinker::sample(), McMd::McExternalEnergyAverage::sample(), McMd::LinkLifeTime::sample(), McMd::LinkLTPos::sample(), McMd::CompositionProfile::sample(), McMd::MdPairEnergyCoefficients::sample(), McMd::RDF::sample(), McMd::StructureFactor::sample(), McMd::VanHove::sample(), McMd::StructureFactorP::sample(), McMd::ReplicaMove::save(), saveConfig(), saveLinkMaster(), McMd::McSystem::saveParameters(), McMd::MdSystem::saveParameters(), savePotentialStyles(), McMd::MdSystem::setBoltzmannVelocities(), setSimulation(), McMd::LinkLTPos::setup(), McMd::VelProf::setup(), McMd::MdEnergyAnalyzer::setup(), McMd::McEnergyAnalyzer::setup(), McMd::MdSystem::setZeroForces(), McMd::MdSystem::setZeroVelocities(), McMd::MdSystem::shiftAtoms(), McMd::DdMdConfigIo::write(), and McMd::MdPairEnergyCoefficients::~MdPairEnergyCoefficients().

Boundary & McMd::System::boundary ( ) const
inline

Get the Boundary by reference.

Definition at line 1064 of file System.h.

Referenced by McMd::McPairExternalPerturbation< PairInteraction, ExternalInteraction >::derivative(), McMd::McPairPerturbation< Interaction >::derivative(), McMd::DeformCommand::execute(), McMd::McSystem::generateMolecules(), McMd::MdSystem::generateMolecules(), McMd::ClusterIdentifier::identifyClusters(), McMd::ClusterIdentifier::initialize(), McMd::MdSystem::kineticEnergy(), loadConfig(), McMd::CompositionProfile::makeWaveVectors(), McMd::StructureFactor::makeWaveVectors(), McMd::StructureFactorP::makeWaveVectors(), McMd::SliplinkerAll::move(), McMd::Sliplinker::move(), McMd::SliplinkMove::move(), McMd::SliplinkerEnd::move(), McMd::HybridNphMdMove::move(), McMd::ReplicaMove::move(), McMd::VelProf::output(), McMd::ComMSD::output(), McMd::DdMdConfigIo::read(), McMd::McCommandManager::readStandardCommand(), McMd::MdCommandManager::readStandardCommand(), McMd::Crosslinker::sample(), McMd::LinkLengthDist::sample(), McMd::G1MSD::sample(), McMd::VelProf::sample(), McMd::CompositionProfile::sample(), McMd::BoundaryAverage::sample(), McMd::AtomMSD::sample(), McMd::BondLengthDist::sample(), McMd::McPairEnergyAverage::sample(), McMd::ComMSD::sample(), McMd::RingRouseAutoCorr::sample(), McMd::EndtoEndXYZ::sample(), McMd::LinearRouseAutoCorr::sample(), McMd::EndtoEnd::sample(), McMd::RDF::sample(), McMd::BlockRadiusGyration::sample(), McMd::StructureFactor::sample(), McMd::IntraPairAutoCorr::sample(), McMd::RadiusGyration::sample(), McMd::StructureFactorGrid::sample(), McMd::VanHove::sample(), McMd::StructureFactorP::sample(), McMd::IntraStructureFactor::sample(), saveConfig(), McMd::RingTetraRebridgeMove::scanBridge(), McMd::G1MSD::setup(), McMd::VelProf::setup(), McMd::AtomMSD::setup(), McMd::ComMSD::setup(), McMd::MdSystem::shiftAtoms(), McMd::NphIntegrator::step(), McMd::McSystem::unsetPotentialEnergies(), and McMd::DdMdConfigIo::write().

EnergyEnsemble & McMd::System::energyEnsemble ( ) const
inline
BoundaryEnsemble & McMd::System::boundaryEnsemble ( ) const
inline

Get the BoundaryEnsemble by reference.

Definition at line 1104 of file System.h.

Referenced by McMd::HybridNphMdMove::move(), and McMd::NphIntegrator::step().

FileMaster & McMd::System::fileMaster ( ) const
inline
bool McMd::System::isCopy ( ) const
inline
bool McMd::System::isValid ( ) const
virtual

Return true if valid, or throw Exception.

Reimplemented in McMd::MdSystem, and McMd::McSystem.

Definition at line 1405 of file System.cpp.

References McMd::LinkMaster::isValid(), nMolecule(), McMd::Simulation::nSpecies(), simulation(), McMd::Molecule::system(), and UTIL_THROW.

Referenced by McMd::McSystem::isValid(), McMd::MdSystem::isValid(), and readConfig().

Boundary& McMd::System::maxBoundary ( ) const
protected

Get the maximum Boundary by reference.

ConfigIo * McMd::System::newDefaultConfigIo ( )
protectedvirtual

Return a pointer to a new default ConfigIo.

Reimplemented in McMd::MdSystem.

Definition at line 802 of file System.cpp.

Referenced by readConfig(), and writeConfig().

Factory< ConfigIo > * McMd::System::newDefaultConfigIoFactory ( )
protectedvirtual

Return a pointer to a new default ConfigIoFactory.

Definition at line 903 of file System.cpp.

Referenced by configIoFactory(), and setConfigIo().

Factory< TrajectoryReader > * McMd::System::newDefaultTrajectoryReaderFactory ( )
protectedvirtual

Return a pointer to a new default TrajectoryReaderFactory.

Definition at line 940 of file System.cpp.

Referenced by trajectoryReaderFactory().

virtual Factory<Perturbation>* McMd::System::newDefaultPerturbationFactory ( )
inlineprotectedvirtual

Return a pointer to the default perturbation Factory.

Reimplemented in McMd::McSystem.

Definition at line 678 of file System.h.

Referenced by setExpectPerturbation().

void McMd::System::readPerturbation ( std::istream &  in)
protected

Read the perturbation parameter block (if any)

Parameters
ininput parameter stream

Definition at line 980 of file System.cpp.

References Util::ParamComposite::className(), Util::MpiFileIo::hasIoCommunicator(), hasPerturbation(), Util::Factory< Data >::readObject(), UTIL_CHECK, and UTIL_THROW.

Referenced by McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().

void McMd::System::loadPerturbation ( Serializable::IArchive ar)
protected

Load the perturbation parameter block (if any)

Parameters
arinput/saving archive

Definition at line 1003 of file System.cpp.

References Util::ParamComposite::className(), hasPerturbation(), isCopy(), Util::Factory< Data >::loadObject(), setExpectPerturbation(), UTIL_CHECK, and UTIL_THROW.

Referenced by McMd::McSystem::loadParameters(), and McMd::MdSystem::loadParameters().

void McMd::System::savePerturbation ( Serializable::OArchive ar)
protected

Save the perturbation parameter block (if any)

Parameters
aroutput/saving archive

Definition at line 1028 of file System.cpp.

References Util::ParamComposite::className(), hasPerturbation(), isCopy(), McMd::Perturbation::save(), and UTIL_CHECK.

Referenced by McMd::McSystem::saveParameters(), and McMd::MdSystem::saveParameters().

void McMd::System::readReplicaMove ( std::istream &  in)
protected

Read the ReplicaMove parameter block (if any)

Parameters
ininput parameter stream

Definition at line 1044 of file System.cpp.

References hasPerturbation(), and Util::ParamComposite::readParamComposite().

Referenced by McMd::McSystem::readParameters().

void McMd::System::loadReplicaMove ( Serializable::IArchive ar)
protected

Read the ReplicaMove parameter block (if any)

Parameters
arinput/loading archive

Definition at line 1061 of file System.cpp.

References hasPerturbation(), and Util::ParamComposite::loadParamComposite().

Referenced by McMd::McSystem::loadParameters().

void McMd::System::saveReplicaMove ( Serializable::OArchive ar)
protected

Save the ReplicaMove parameter block (if any)

Parameters
aroutput/saving archive

Definition at line 1078 of file System.cpp.

References hasPerturbation(), and McMd::ReplicaMove::save().

Referenced by McMd::McSystem::saveParameters().

void McMd::System::allocateMoleculeSets ( )
protected

Allocate and initialize molecule sets for all species.

This function is called within the Simulation::initialize() private member function to allocate and initialize an array of MoleculeSet objects for all Species for this System.

Preconditions: This System must be associated with a parent Simulation, and all Species objects must have been initialized by calling SpeciesManager::readParameters().

Definition at line 1093 of file System.cpp.

References McMd::Simulation::allocateMoleculeSet(), McMd::Simulation::nSpecies(), and simulation().

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), loadParameters(), McMd::McSystem::readParameters(), McMd::MdSystem::readParameters(), and readParameters().

void McMd::System::readFileMaster ( std::istream &  in)
protected

Read FileMaster parameters, if none yet exists.

If no FileMaster exists, create and read one.

If no FileMaster exists, this function creates one and reads paramters to initialize one. If there is already a FileMaster, it does nothing.

Invoked in implementation of readParameters().

Parameters
ininput parameter stream

Definition at line 427 of file System.cpp.

References Util::ParamComposite::readParamComposite().

Referenced by McMd::McSystem::readParameters(), McMd::MdSystem::readParameters(), and readParameters().

void McMd::System::loadFileMaster ( Serializable::IArchive ar)
protected

Load FileMaster data from archive, if necessary.

Parameters
arinput/loading archive

Definition at line 446 of file System.cpp.

References Util::ParamComposite::loadParamComposite().

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), and loadParameters().

void McMd::System::saveFileMaster ( Serializable::OArchive ar)
protected

If necessary, save FileMaster to archive.

Parameters
aroutput/saving archive

Definition at line 463 of file System.cpp.

References Util::FileMaster::save().

Referenced by McMd::McSystem::saveParameters(), McMd::MdSystem::saveParameters(), and saveParameters().

void McMd::System::readPotentialStyles ( std::istream &  in)
protected
void McMd::System::loadPotentialStyles ( Serializable::IArchive ar)
protected
void McMd::System::savePotentialStyles ( Serializable::OArchive ar)
protected

Save potential style strings.

Parameters
aroutput/saving archive

Definition at line 575 of file System.cpp.

References isCopy(), simulation(), and UTIL_CHECK.

Referenced by McMd::McSystem::saveParameters(), McMd::MdSystem::saveParameters(), and saveParameters().

void McMd::System::readEnsembles ( std::istream &  in)
protected

Read energy and boundary ensemble parameters.

Parameters
ininput parameter stream

Definition at line 626 of file System.cpp.

References isCopy(), Util::ParamComposite::readParamComposite(), and UTIL_CHECK.

Referenced by McMd::McSystem::readParameters(), McMd::MdSystem::readParameters(), and readParameters().

void McMd::System::loadEnsembles ( Serializable::IArchive ar)
protected

Load energy and boundary ensembles from archive.

Parameters
arinput/loading archive

Definition at line 636 of file System.cpp.

References isCopy(), Util::ParamComposite::loadParamComposite(), and UTIL_CHECK.

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), and loadParameters().

void McMd::System::saveEnsembles ( Serializable::OArchive ar)
protected

Save energy and boundary ensembles.

Parameters
aroutput/saving archive

Definition at line 646 of file System.cpp.

References isCopy(), Simp::BoundaryEnsemble::save(), Simp::EnergyEnsemble::save(), and UTIL_CHECK.

Referenced by McMd::McSystem::saveParameters(), McMd::MdSystem::saveParameters(), and saveParameters().

void McMd::System::readLinkMaster ( std::istream &  in)
protected

Read the LinkMaster parameters.

Parameters
ininput parameter stream

Definition at line 654 of file System.cpp.

References Util::ParamComposite::readParamComposite(), and simulation().

Referenced by McMd::McSystem::readParameters(), McMd::MdSystem::readParameters(), and readParameters().

void McMd::System::loadLinkMaster ( Serializable::IArchive ar)
protected

Load the LinkMaster.

Parameters
arinput archive.

Definition at line 662 of file System.cpp.

References Util::ParamComposite::loadParamComposite(), and simulation().

Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), and loadParameters().

void McMd::System::saveLinkMaster ( Serializable::OArchive ar)
protected

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