Simpatico
v1.10
|
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.
#include <System.h>
Public Types | |
typedef ArraySet< Molecule > | MoleculeSet |
A set of molecules of one Species in a System. More... | |
typedef PArrayIterator< Molecule > | MoleculeIterator |
Iterator for a MoleculeSet. More... | |
typedef ConstPArrayIterator< Molecule > | ConstMoleculeIterator |
Const Iterator for a MoleculeSet. More... | |
![]() | |
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... | |
Molecule & | molecule (int speciesId, int moleculeId) |
Get a specific Molecule in this System, by integer index. More... | |
Molecule & | randomMolecule (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 | |
PairFactory & | pairFactory () |
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... | |
CoulombFactory & | coulombFactory () |
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... | |
LinkMaster & | linkMaster () 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... | |
Perturbation & | perturbation () const |
Get the associated Perturbation by reference. More... | |
bool | hasReplicaMove () const |
Does this system have an associated ReplicaMove? More... | |
ReplicaMove & | replicaMove () const |
Get the associated ReplicaMove by reference. More... | |
Accessors (Miscellaneous) | |
int | id () const |
Get integer index for this System. More... | |
Simulation & | simulation () const |
Get the parent Simulation by reference. More... | |
Boundary & | boundary () const |
Get the Boundary by reference. More... | |
EnergyEnsemble & | energyEnsemble () const |
Get the EnergyEnsemble by reference. More... | |
BoundaryEnsemble & | boundaryEnsemble () const |
Get the BoundaryEnsemble by reference. More... | |
FileMaster & | fileMaster () 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... | |
![]() | |
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... | |
Begin & | readBegin (std::istream &in, const char *label, bool isRequired=true) |
Add and read a class label and opening bracket. More... | |
End & | readEnd (std::istream &in) |
Add and read the closing bracket. More... | |
Blank & | readBlank (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... | |
Begin & | addBegin (const char *label) |
Add a Begin object representing a class name and bracket. More... | |
End & | addEnd () |
Add a closing bracket. More... | |
Blank & | addBlank () |
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... | |
![]() | |
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... | |
![]() | |
virtual | ~Serializable () |
Destructor. More... | |
![]() | |
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 | |
Boundary & | maxBoundary () const |
Get the maximum Boundary by reference. More... | |
virtual ConfigIo * | newDefaultConfigIo () |
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... | |
![]() | |
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 ¶m, bool next=true) |
Set this to the parent of a child component. More... | |
void | addComponent (ParamComponent ¶m, 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... | |
![]() | |
ParamComponent () | |
Constructor. More... | |
ParamComponent (const ParamComponent &other) | |
Copy constructor. More... | |
Additional Inherited Members | |
![]() | |
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... | |
typedef ArraySet<Molecule> McMd::System::MoleculeSet |
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.
other | System object being copied. |
Definition at line 177 of file System.cpp.
|
virtual |
void McMd::System::setId | ( | int | Id | ) |
Set the integer Id for this System.
Set id to zero for Simulation objects with one System.
Id | integer 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.
simulation | parent 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.
filemaster | FileMaster object. |
Definition at line 881 of file System.cpp.
References fileMaster().
Referenced by McMd::McSimulation::McSimulation(), and McMd::MdSimulation::MdSimulation().
|
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.
in | pararameter 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().
|
virtual |
Load internal state from an archive.
ar | input/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.
ar | output/saving archive |
Definition at line 409 of file System.cpp.
References isCopy(), saveEnsembles(), saveFileMaster(), saveLinkMaster(), and savePotentialStyles().
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.
classname | name 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().
|
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.
in | configuration 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.
filename | configuration 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.
out | configuration 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.
filename | configuration file name |
Definition at line 847 of file System.cpp.
References fileMaster(), Util::FileMaster::openOutputFile(), and writeConfig().
|
virtual |
Load configuration.
ar | input/loading archive |
Reimplemented in McMd::MdSystem, and McMd::McSystem.
Definition at line 706 of file System.cpp.
References addMolecule(), McMd::Molecule::begin(), boundary(), McMd::Simulation::getMolecule(), molecule(), Simp::Species::mutator(), Util::ArrayIterator< Data >::notEnd(), McMd::Simulation::nSpecies(), McMd::SpeciesMutator::setMoleculeState(), Simp::OrthorhombicBoundary::shift(), simulation(), McMd::Simulation::species(), and UTIL_THROW.
Referenced by McMd::McSystem::loadConfig(), and McMd::MdSystem::loadConfig().
void McMd::System::saveConfig | ( | Serializable::OArchive & | ar | ) |
Save configuration.
ar | output/save archive |
Definition at line 756 of file System.cpp.
References begin(), boundary(), McMd::SpeciesMutator::moleculeStateId(), Simp::Species::mutator(), nMolecule(), Util::ArrayIterator< Data >::notEnd(), Util::PArrayIterator< Data >::notEnd(), McMd::Simulation::nSpecies(), Simp::OrthorhombicBoundary::shift(), simulation(), and McMd::Simulation::species().
Referenced by McMd::McSimulation::save(), and McMd::MdSimulation::save().
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.
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.
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().
|
inline |
|
inline |
|
inline |
Get the number of molecules of one Species in this System.
speciesId | integer Id for a Species. |
Definition at line 1128 of file System.h.
Referenced by isEmpty(), McMd::ClusterIdentifier::isValid(), isValid(), McMd::SliplinkerEnd::move(), McMd::GcSliplinkMove::move(), McMd::CfbDoubleRebridgeMove::move(), nAtom(), McMd::CfbReptationMove::output(), McMd::CfbReptateMove::output(), randomMolecule(), removeAllMolecules(), McMd::EndtoEndXYZ::sample(), McMd::EndtoEnd::sample(), McMd::BlockRadiusGyration::sample(), McMd::RadiusGyration::sample(), saveConfig(), McMd::G1MSD::setup(), McMd::McMuExchange::setup(), McMd::AtomMSD::setup(), McMd::ComMSD::setup(), McMd::RingRouseAutoCorr::setup(), McMd::LinearRouseAutoCorr::setup(), McMd::IntraPairAutoCorr::setup(), McMd::SmpConfigIo::write(), McMd::McMdConfigIo::write(), McMd::DdMdConfigIo::write(), and McMd::LammpsConfigIo::write().
int McMd::System::nAtom | ( | ) | const |
Return the total number of atoms in this System.
Definition at line 1216 of file System.cpp.
References Simp::Species::nAtom(), nMolecule(), McMd::Simulation::nSpecies(), simulation(), and McMd::Simulation::species().
Referenced by McMd::MdSystem::removeDriftVelocity(), McMd::NvtNhIntegrator::setup(), McMd::NvtNhIntegrator::step(), and McMd::McSystem::unsetPotentialEnergies().
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.
molecule | Molecule object of interest. |
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().
|
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().
speciesId | integer id of the desired Species |
moleculeId | integer id of molecule within Species and System |
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 | ) |
Get a random Molecule of a specified species in this System.
speciesId | integer id of the desired Species. |
Definition at line 1200 of file System.cpp.
References Util::Log::file(), molecule(), moleculeId(), nMolecule(), McMd::Simulation::random(), simulation(), Util::Random::uniformInt(), and UTIL_THROW.
Referenced by McMd::GcSliplinkMove::move(), McMd::SliplinkerAll::move(), McMd::SliplinkerEnd::move(), McMd::Sliplinker::move(), McMd::RingTetraRebridgeMove::move(), McMd::AtomDisplaceMove::move(), McMd::CfbDoubleRebridgeMove::move(), McMd::RingOctaRebridgeMove::move(), McMd::CfbEndMove::move(), McMd::CfbLinearEndMove::move(), McMd::CfbRebridgeMove::move(), McMd::HomopolymerSemiGrandMove::move(), McMd::CfbReptationMove::move(), McMd::EndSwapMove::move(), McMd::CfbRingRebridgeMove::move(), McMd::CfbReptateMove::move(), and McMd::RigidDisplaceMove::move().
|
inline |
Initialize an iterator for molecules of one species in this System.
speciesId | integer Id for the desired Species (input) |
iterator | molecule 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().
|
inline |
PairFactory & McMd::System::pairFactory | ( | ) |
Get the PairFactory by reference.
Definition at line 1229 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::MdSystem::MdSystem(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
std::string McMd::System::pairStyle | ( | ) | const |
Return nonbonded pair style string.
Definition at line 1241 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
Factory< BondPotential > & McMd::System::bondFactory | ( | ) |
Get the associated Factory<BondPotential> by reference.
Definition at line 1249 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
std::string McMd::System::bondStyle | ( | ) | const |
Return covalent bond style string.
Definition at line 1261 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
Factory< AnglePotential > & McMd::System::angleFactory | ( | ) |
Get the associated AngleFactory by reference.
Definition at line 1269 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
std::string McMd::System::angleStyle | ( | ) | const |
Return angle potential style string.
Definition at line 1281 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
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 |
Return coulomb potential style string.
Definition at line 1321 of file System.cpp.
Referenced by McMd::MdSystem::loadParameters(), McMd::MdEwaldPairPotentialImpl< Interaction >::MdEwaldPairPotentialImpl(), and McMd::MdSystem::readParameters().
Factory< ExternalPotential > & McMd::System::externalFactory | ( | ) |
Get the associated ExternalPotential factory by reference.
Definition at line 1329 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
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 |
Return link potential style string.
Definition at line 1378 of file System.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), McMd::McSystem::readParameters(), and McMd::MdSystem::readParameters().
|
inline |
Get the LinkMaster by reference.
Definition at line 1074 of file System.h.
Referenced by McMd::GcSliplinkMove::move(), McMd::Sliplinker::move(), McMd::SliplinkerAll::move(), McMd::SliplinkerEnd::move(), McMd::SliplinkMove::move(), McMd::McMdConfigIo::read(), removeAllMolecules(), McMd::Crosslinker::sample(), McMd::LinkLengthDist::sample(), McMd::SSChainDist::sample(), McMd::LinkMSD::sample(), McMd::NLinkAverage::sample(), McMd::InterIntraLink::sample(), McMd::LinkLifeTime::setup(), McMd::LinkLTPos::setup(), McMd::LinkMSD::setup(), and McMd::McMdConfigIo::write().
|
inline |
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().
|
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().
|
inline |
Does this system have an associated Perturbation?
Definition at line 1179 of file System.h.
Referenced by McMd::McSystem::loadParameters(), loadPerturbation(), loadReplicaMove(), McMd::McSystem::readParameters(), readPerturbation(), readReplicaMove(), McMd::ReplicaMove::ReplicaMove(), McMd::McSystem::saveParameters(), savePerturbation(), saveReplicaMove(), and setExpectPerturbation().
|
inline |
Get the associated Perturbation by reference.
Definition at line 1185 of file System.h.
Referenced by McMd::BennettsMethod::BennettsMethod(), McMd::ReplicaMove::move(), McMd::ReplicaMove::ReplicaMove(), and McMd::BennettsMethod::sample().
|
inline |
Does this system have an associated ReplicaMove?
|
inline |
Get the associated ReplicaMove by reference.
Definition at line 1201 of file System.h.
Referenced by McMd::McSimulation::simulate().
|
inline |
|
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().
|
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().
|
inline |
Get the EnergyEnsemble by reference.
Definition at line 1095 of file System.h.
Referenced by McMd::McExternalPerturbation< Interaction >::derivative(), McMd::McPairExternalPerturbation< PairInteraction, ExternalInteraction >::derivative(), McMd::McPairPerturbation< Interaction >::derivative(), McMd::HybridNphMdMove::move(), McMd::NvtDpdVvIntegrator::NvtDpdVvIntegrator(), McMd::NvtNhIntegrator::NvtNhIntegrator(), McMd::McEnergyPerturbation::parameter(), McMd::McMuExchange::sample(), McMd::McEnergyPerturbation::setParameter(), McMd::NvtLangevinIntegrator::setup(), McMd::NvtDpdVvIntegrator::setup(), McMd::SystemMove::SystemMove(), McMd::McSystem::unsetPotentialEnergies(), and McMd::McStressAutoCorrelation::~McStressAutoCorrelation().
|
inline |
Get the BoundaryEnsemble by reference.
Definition at line 1104 of file System.h.
Referenced by McMd::HybridNphMdMove::move(), and McMd::NphIntegrator::step().
|
inline |
Get the associated FileMaster by reference.
Definition at line 1113 of file System.h.
Referenced by McMd::CfbReptationMove::output(), McMd::CfbReptateMove::output(), readConfig(), McMd::MdVirialStressTensorAverage::readParameters(), McMd::McVirialStressTensorAverage::readParameters(), McMd::ReplicaMove::ReplicaMove(), setFileMaster(), and writeConfig().
|
inline |
Was this System instantiated with the copy constructor?
Definition at line 1122 of file System.h.
Referenced by loadEnsembles(), McMd::MdSystem::loadParameters(), loadParameters(), loadPerturbation(), loadPotentialStyles(), McMd::McSystem::McSystem(), readEnsembles(), McMd::MdSystem::readParameters(), readParameters(), readPotentialStyles(), saveEnsembles(), McMd::MdSystem::saveParameters(), saveParameters(), savePerturbation(), savePotentialStyles(), McMd::MdSystem::~MdSystem(), and ~System().
|
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().
|
protected |
Get the maximum Boundary by reference.
|
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().
Return a pointer to a new default ConfigIoFactory.
Definition at line 903 of file System.cpp.
Referenced by configIoFactory(), and setConfigIo().
|
protectedvirtual |
Return a pointer to a new default TrajectoryReaderFactory.
Definition at line 940 of file System.cpp.
Referenced by trajectoryReaderFactory().
|
inlineprotectedvirtual |
Return a pointer to the default perturbation Factory.
Reimplemented in McMd::McSystem.
Definition at line 678 of file System.h.
Referenced by setExpectPerturbation().
|
protected |
Read the perturbation parameter block (if any)
in | input 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().
|
protected |
Load the perturbation parameter block (if any)
ar | input/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().
|
protected |
Save the perturbation parameter block (if any)
ar | output/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().
|
protected |
Read the ReplicaMove parameter block (if any)
in | input parameter stream |
Definition at line 1044 of file System.cpp.
References hasPerturbation(), and Util::ParamComposite::readParamComposite().
Referenced by McMd::McSystem::readParameters().
|
protected |
Read the ReplicaMove parameter block (if any)
ar | input/loading archive |
Definition at line 1061 of file System.cpp.
References hasPerturbation(), and Util::ParamComposite::loadParamComposite().
Referenced by McMd::McSystem::loadParameters().
|
protected |
Save the ReplicaMove parameter block (if any)
ar | output/saving archive |
Definition at line 1078 of file System.cpp.
References hasPerturbation(), and McMd::ReplicaMove::save().
Referenced by McMd::McSystem::saveParameters().
|
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().
|
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().
in | input parameter stream |
Definition at line 427 of file System.cpp.
References Util::ParamComposite::readParamComposite().
Referenced by McMd::McSystem::readParameters(), McMd::MdSystem::readParameters(), and readParameters().
|
protected |
Load FileMaster data from archive, if necessary.
ar | input/loading archive |
Definition at line 446 of file System.cpp.
References Util::ParamComposite::loadParamComposite().
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), and loadParameters().
|
protected |
If necessary, save FileMaster to archive.
ar | output/saving archive |
Definition at line 463 of file System.cpp.
References Util::FileMaster::save().
Referenced by McMd::McSystem::saveParameters(), McMd::MdSystem::saveParameters(), and saveParameters().
|
protected |
Read potential style parameter strings.
in | input parameter stream |
Definition at line 473 of file System.cpp.
References McMd::Simulation::hasCoulomb(), McMd::Simulation::hasExternal(), isCopy(), McMd::Simulation::nAngleType(), McMd::Simulation::nBondType(), McMd::Simulation::nDihedralType(), McMd::Simulation::nLinkType(), simulation(), and UTIL_CHECK.
Referenced by McMd::McSystem::readParameters(), McMd::MdSystem::readParameters(), and readParameters().
|
protected |
Load potential style strings from an archive.
ar | input/loading archive |
Definition at line 524 of file System.cpp.
References McMd::Simulation::hasCoulomb(), McMd::Simulation::hasExternal(), isCopy(), McMd::Simulation::nAngleType(), McMd::Simulation::nBondType(), McMd::Simulation::nDihedralType(), McMd::Simulation::nLinkType(), simulation(), and UTIL_CHECK.
Referenced by McMd::McSystem::loadParameters(), McMd::MdSystem::loadParameters(), and loadParameters().
|
protected |
Save potential style strings.
ar | output/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().
|
protected |
Read energy and boundary ensemble parameters.
in | input 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().
|
protected |
Load energy and boundary ensembles from archive.
ar | input/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().
|
protected |
Save energy and boundary ensembles.
ar | output/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().
|
protected |
Read the LinkMaster parameters.
in | input 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().
|
protected |
Load the LinkMaster.
ar | input 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().
|
protected |
Save the LinkMaster.
ar | output archive. |
Definition at line 670 of file System.cpp.
References Util::ParamComposite::loadParamComposite(), Util::ParamComposite::readParamComposite(), Util::ParamComposite::save(), and simulation().
Referenced by McMd::McSystem::saveParameters(), McMd::MdSystem::saveParameters(), and saveParameters().