Simpatico
v1.10
|
Main object for a domain-decomposition MD simulation.
A DdMd::Simulation contains and coordinates all the components of a parallel MD simulation.
Most member functions of this class should be called simultaneously on all processors. This should be assumed to be the case unless the documentation says otherwise. Member functions that should only be called on the master processor of the communicator associated with a spatial grid decomposition (i.e.,the communicator associated with the Domain member) are identified explicitly as such.
Definition at line 84 of file ddMd/simulation/Simulation.h.
#include <Simulation.h>
Public Member Functions | |
Simulation (MPI::Intracomm &communicator=MPI::COMM_WORLD) | |
Constructor. More... | |
~Simulation () | |
Destructor. More... | |
void | outputOptions (std::ostream &out) const |
Output a list of options enabled & disabled during compilation. More... | |
bool | isValid () |
Return true if this Simulation is valid, or throw an Exception. More... | |
Initialization | |
void | setOptions (int argc, char *const *argv) |
Process command line options. More... | |
virtual void | readParam () |
Read parameters from default parameter file. More... | |
virtual void | readParam (std::istream &in) |
Read parameters. More... | |
virtual void | readParameters (std::istream &in) |
Read body of the parameter block, allocate memory and initialize. More... | |
void | setReverseUpdateFlag (bool reverseUpdateFlag) |
Set flag to identify if reverse communication is enabled. More... | |
Serialization (Restart files) | |
void | load (const std::string &filename) |
Load internal state from a restart file. More... | |
virtual void | loadParameters (Serializable::IArchive &ar) |
Load parameters from a restart archive. More... | |
void | save (const std::string &filename) |
Save state to a restart file. More... | |
virtual void | save (Serializable::OArchive &ar) |
Save internal state to restart archive. More... | |
Run Time Actions | |
void | readCommands () |
Read and execute commands from the default command file. More... | |
void | readCommands (std::istream &in) |
Read and execute commands from a specific command file. More... | |
void | setBoltzmannVelocities (double temperature) |
Set random velocities chosen from a Boltzmann distribution. More... | |
Vector | removeDriftVelocity () |
Subtract system center of mass velocity from atom velocities. More... | |
void | zeroForces () |
Set forces for all atoms to zero. More... | |
Config File IO | |
void | readConfig (const std::string &filename) |
Read configuration file on master and distribute atoms. More... | |
void | writeConfig (const std::string &filename) |
Write configuration file. More... | |
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... | |
Force, energy and stress calculators | |
void | computeForces () |
Compute forces for all local atoms. More... | |
void | computeForcesAndVirial () |
Compute forces for all local atoms and virial stress. More... | |
void | computeKineticEnergy () |
Compute total kinetic energy. More... | |
double | kineticEnergy () |
Return precomputed total kinetic energy. More... | |
void | unsetKineticEnergy () |
Mark kinetic energy as unknown. More... | |
void | computePotentialEnergies () |
Calculate and store total potential energy on all processors. More... | |
double | potentialEnergy () const |
Return sum of precomputed total potential energies. More... | |
void | unsetPotentialEnergies () |
Mark all potential energies as unknown. More... | |
void | computePairEnergies () |
Compute pair energies for each pair of atom types. More... | |
DMatrix< double > | pairEnergies () const |
Return precomputed pair energies. More... | |
void | computeKineticStress () |
Calculate and store kinetic stress. More... | |
Tensor | kineticStress () const |
Return total kinetic stress. More... | |
double | kineticPressure () const |
Return total kinetic pressure. More... | |
void | unsetKineticStress () |
Mark kinetic stress as unknown. More... | |
void | computeVirialStress () |
Calculate and store all virial stress contributions. More... | |
Tensor | virialStress () const |
Return total virial stress. More... | |
double | virialPressure () const |
Return total virial pressure. More... | |
void | unsetVirialStress () |
Mark all virial stress contributions as unknown. More... | |
Potential Energy Classes (Objects, Style Strings and Factories) | |
const PairPotential & | pairPotential () const |
Get the PairPotential by const reference. More... | |
PairPotential & | pairPotential () |
Get the PairPotential by reference. More... | |
std::string | pairStyle () const |
Return nonbonded pair style string. More... | |
Factory< PairPotential > & | pairFactory () |
Get the Factory<PairPotential> by reference. More... | |
const BondPotential & | bondPotential () const |
Get the PairPotential by const reference. More... | |
BondPotential & | bondPotential () |
Get the PairPotential by reference. More... | |
std::string | bondStyle () const |
Return covalent bond style string. More... | |
Factory< BondPotential > & | bondFactory () |
Get the Factory<BondPotential> by reference. More... | |
const AnglePotential & | anglePotential () const |
Get the AnglePotential by const reference. More... | |
AnglePotential & | anglePotential () |
Get the AnglePotential by reference. More... | |
std::string | angleStyle () const |
Return angle potential style string. More... | |
Factory< AnglePotential > & | angleFactory () |
Get the AngleFactory by reference. More... | |
const DihedralPotential & | dihedralPotential () const |
Get the DihedralPotential by const reference. More... | |
DihedralPotential & | dihedralPotential () |
Get the DihedralPotential by reference. More... | |
std::string | dihedralStyle () const |
Return dihedral potential style string. More... | |
Factory< DihedralPotential > & | dihedralFactory () |
Get the associated Dihedral Factory by reference. More... | |
const ExternalPotential & | externalPotential () const |
Get the ExternalPotential by reference. More... | |
ExternalPotential & | externalPotential () |
Get the ExternalPotential by reference. More... | |
std::string | externalStyle () const |
Return external potential style string. More... | |
Factory< ExternalPotential > & | externalFactory () |
Get the associated External Factory by reference. More... | |
Atom and Group Containers | |
AtomStorage & | atomStorage () |
Get the AtomStorage by reference. More... | |
BondStorage & | bondStorage () |
Get the BondStorage by reference. More... | |
AngleStorage & | angleStorage () |
Get the AngleStorage by reference. More... | |
DihedralStorage & | dihedralStorage () |
Get the DihedralStorage by reference. More... | |
Miscellaneous Accessors (return members by reference) | |
Domain & | domain () |
Get the Domain by reference. More... | |
Boundary & | boundary () |
Get the Boundary by reference. More... | |
AtomType & | atomType (int i) |
Get an AtomType descriptor by reference. More... | |
Integrator & | integrator () |
Get the Integrator by reference. More... | |
EnergyEnsemble & | energyEnsemble () |
Get the EnergyEnsemble by reference. More... | |
BoundaryEnsemble & | boundaryEnsemble () |
Get the BoundaryEnsemble by reference. More... | |
FileMaster & | fileMaster () |
Get the associated FileMaster by reference. More... | |
Random & | random () |
Get the Random number generator by reference. More... | |
Exchanger & | exchanger () |
Get the Exchanger by reference. More... | |
Buffer & | buffer () |
Get the Buffer by reference. More... | |
ModifierManager & | modifierManager () |
Return the ModifierManager by reference. More... | |
AnalyzerManager & | analyzerManager () |
Return the AnalyzerManager by reference. More... | |
Factory< Integrator > & | integratorFactory () |
Get the Integrator factory by reference. More... | |
Accessors (return by value) | |
int | nAtomType () |
Get maximum number of atom types. More... | |
int | nBondType () |
Get maximum number of bond types. More... | |
int | nAngleType () |
Get maximum number of angle types. More... | |
int | nDihedralType () |
Get maximum number of dihedral types. More... | |
bool | hasExternal () |
Does this simulation have an external potential? More... | |
MaskPolicy | maskedPairPolicy () const |
Return the value of the mask policy (MaskNone or MaskBonded). More... | |
bool | reverseUpdateFlag () const |
Is reverse communication enabled? More... | |
Signals | |
Signal & | modifySignal () |
Signal to force unsetting of quantities that depend on x, v, or f. More... | |
Signal & | positionSignal () |
Signal to indicate change in atomic positions. More... | |
Signal & | velocitySignal () |
Signal to indicate change in atomic velocities. More... | |
Signal & | exchangeSignal () |
Signal to indicate exchange of atoms and groups. 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 | 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... | |
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 | |
void | readFileMaster (std::istream &in) |
Read the FileMaster. More... | |
void | loadFileMaster (Serializable::IArchive &ar) |
Load FileMaster from an archive. More... | |
void | saveFileMaster (Serializable::OArchive &ar) |
Save FileMaster to archive. More... | |
void | readPotentialStyles (std::istream &in) |
Read potential styles and maskedPairPolicy. More... | |
void | loadPotentialStyles (Serializable::IArchive &ar) |
Load potential styles. More... | |
void | savePotentialStyles (Serializable::OArchive &ar) |
Save potential styles to archive. More... | |
void | readEnsembles (std::istream &in) |
Read energy and boundary ensembles. More... | |
void | loadEnsembles (Serializable::IArchive &ar) |
Load energy and boundary ensembles from an input archive. More... | |
void | saveEnsembles (Serializable::OArchive &ar) |
Save energy and boundary ensembles to archive. 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 | |
![]() | |
typedef BinaryFileOArchive | OArchive |
Type of output archive used by save method. More... | |
typedef BinaryFileIArchive | IArchive |
Type of input archive used by load method. More... | |
![]() | |
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... | |
DdMd::Simulation::Simulation | ( | MPI::Intracomm & | communicator = MPI::COMM_WORLD | ) |
Constructor.
communicator | MPI communicator for MD processors. |
Definition at line 79 of file ddMd/simulation/Simulation.cpp.
References Util::Vector::commitMpiType(), Util::IntVector::commitMpiType(), Util::initStatic(), DdMd::AtomType::initStatic(), and UTIL_THROW.
DdMd::Simulation::~Simulation | ( | ) |
Destructor.
Definition at line 217 of file ddMd/simulation/Simulation.cpp.
void DdMd::Simulation::setOptions | ( | int | argc, |
char *const * | argv | ||
) |
Process command line options.
Options:
-e Enable echoing of the parameter file to the log file as it is read.
-s nSystem [int] Enable multi system simulation, using different groups of processors for different systems. Integer argument nSystem is the number of systems. The rank of the communicator passed to the constructor must be an integer multiple of nSystem.
-p filename [string] Specifies the name of a parameter file. If not specified here, the parameter file for a single-system simulation may be read from standard input by default.
-r filename [string] Restarts a simulation from a checkpoint file. The name of the checkpoint file is restartFilename + ".rst", i..e., it is obtained by adding a suffix ".rst" to the filename argument. Also sets the default command file name to filename + ".cmd".
-c filename [string] Specifies the name of a command file. If not specified here, the command file name may be specified in the FileMaster block of the parameter file.
The -p (parameter file) and -r (restart) options are incompatible: A simulation may either be initialized from a parameter file or a restart file, but not both. A command file is required in both cases.
This function is passed two arguments that should contain the command line arguments that were passed to the main program:
argc | number of command line arguments |
argv | C-array of C-string argument strings |
Definition at line 300 of file ddMd/simulation/Simulation.cpp.
References Util::Log::file(), Util::ParamComponent::setEcho(), Util::Log::setFile(), and UTIL_THROW.
|
virtual |
Read parameters from default parameter file.
See comment about restarting in readParam(std::istream&)
Definition at line 468 of file ddMd/simulation/Simulation.cpp.
|
virtual |
Read parameters.
This version includes the opening and closing blocks. Does nothing and returns if load() was called previously.
Reimplemented from Util::ParamComposite.
Definition at line 444 of file ddMd/simulation/Simulation.cpp.
|
virtual |
Read body of the parameter block, allocate memory and initialize.
This function is called by the readParam() methods, which simply add code to read opening and closing brackets.
Reimplemented from Util::ParamComposite.
Definition at line 479 of file ddMd/simulation/Simulation.cpp.
References DdMd::Atom::setHasAtomContext(), unsetKineticEnergy(), unsetKineticStress(), DdMd::GroupStorage< 2 >::unsetNTotal(), DdMd::GroupStorage< 3 >::unsetNTotal(), DdMd::GroupStorage< 4 >::unsetNTotal(), unsetPotentialEnergies(), unsetVirialStress(), and UTIL_THROW.
void DdMd::Simulation::setReverseUpdateFlag | ( | bool | reverseUpdateFlag | ) |
Set flag to identify if reverse communication is enabled.
Reverse communication is off by default. It is used in communication patterns in which forces involving several atoms (nonbonded pairs or covalent groups) are calculated on one processor and the forces on particles that are not owned by that processor are then communicated to the processor that owns each particle. The default mode is for such forces to be calculated independently on each processor that owns one or more atoms in a group, to avoid the extra "reverse" communication step.
reverseUpdateFlag | true if reverse communication is enabled. |
Definition at line 1460 of file ddMd/simulation/Simulation.cpp.
void DdMd::Simulation::load | ( | const std::string & | filename | ) |
Load internal state from a restart file.
Call on all processors. This function opens an archive file with a name given by concatentaing filename + ".rst" on the ioProcessor, calls load(Serializable::OArchive& ), and closes the file. It also sets the default command file name to filename + ".cmd".
filename | base filename (add suffixes ".rst" and ".cmd") |
Definition at line 866 of file ddMd/simulation/Simulation.cpp.
References Util::BinaryFileIArchive::file(), and UTIL_THROW.
|
virtual |
Load parameters from a restart archive.
Call on all processors, but loads from archive only on ioProcessor. This function loads both parameter information and the system configuration.
Do not call this directly. Instead call load(const std::string&) or load(Serializable::IArchive& ).
ar | input archive (open for reading on ioProcessor). |
Reimplemented from Util::ParamComposite.
Definition at line 668 of file ddMd/simulation/Simulation.cpp.
References DdMd::Atom::setHasAtomContext(), unsetKineticEnergy(), unsetKineticStress(), DdMd::GroupStorage< 2 >::unsetNTotal(), DdMd::GroupStorage< 3 >::unsetNTotal(), DdMd::GroupStorage< 4 >::unsetNTotal(), unsetPotentialEnergies(), unsetVirialStress(), and UTIL_THROW.
void DdMd::Simulation::save | ( | const std::string & | filename | ) |
Save state to a restart file.
Call on all processors. Only writes from communicator ioProcessor. This function opens an archive file with a name given by filename
Definition at line 974 of file ddMd/simulation/Simulation.cpp.
References Util::BinaryFileOArchive::file().
Referenced by DdMd::TwoStepIntegrator::run().
|
virtual |
Save internal state to restart archive.
Used to implement save(std::string).
Reimplemented from Util::ParamComposite.
Definition at line 893 of file ddMd/simulation/Simulation.cpp.
References Util::Parameter::saveOptional().
void DdMd::Simulation::readCommands | ( | ) |
Read and execute commands from the default command file.
This function calls readCommands(std::istream&) internally. The current default command file is defined by the FileMaster. The file name for the default file may be specified as a command line option (option -c) or in the parameter file.
Definition at line 1449 of file ddMd/simulation/Simulation.cpp.
References UTIL_THROW.
void DdMd::Simulation::readCommands | ( | std::istream & | in | ) |
Read and execute commands from a specific command file.
in | command file |
Definition at line 1172 of file ddMd/simulation/Simulation.cpp.
References Util::Log::file(), Util::getNextLine(), Util::Memory::max(), and UTIL_THROW.
void DdMd::Simulation::setBoltzmannVelocities | ( | double | temperature | ) |
Set random velocities chosen from a Boltzmann distribution.
temperature | absolute temperature kT, in energy units. |
Definition at line 1471 of file ddMd/simulation/Simulation.cpp.
References Util::Dimension, and Util::PArrayIterator< Data >::notEnd().
Vector DdMd::Simulation::removeDriftVelocity | ( | ) |
Subtract system center of mass velocity from atom velocities.
Call on all processors. Does all-reduce internally.
Definition at line 1494 of file ddMd/simulation/Simulation.cpp.
References Util::Dimension, and Util::PArrayIterator< Data >::notEnd().
void DdMd::Simulation::zeroForces | ( | ) |
Set forces for all atoms to zero.
Definition at line 1544 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::Integrator::computeForces(), and DdMd::Integrator::computeForcesAndVirial().
void DdMd::Simulation::readConfig | ( | const std::string & | filename | ) |
Read configuration file on master and distribute atoms.
Upon return, all processors should have all atoms and groups, and a full set of ghost atoms, but values for the atomic forces are undefined.
filename | name of input configuration file |
Definition at line 2057 of file ddMd/simulation/Simulation.cpp.
void DdMd::Simulation::writeConfig | ( | const std::string & | filename | ) |
Write configuration file.
filename | name of output configuration file |
Definition at line 2073 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::ConfigWriter::sample().
Get the configuration file reader/writer factory by reference.
Definition at line 2202 of file ddMd/simulation/Simulation.cpp.
void DdMd::Simulation::setConfigIo | ( | std::string & | classname | ) |
Create a new configuration file reader/writer.
This method creates a new instance of the specified subclass of ConfigIo, and retains a pointer to the new object.
classname | name of desired ConfigIo subclass |
Definition at line 2214 of file ddMd/simulation/Simulation.cpp.
References Util::Bit::clear(), DdMd::Atom::hasAtomContext(), Util::PArrayIterator< Data >::notEnd(), Util::Bit::set(), and UTIL_THROW.
void DdMd::Simulation::computeForces | ( | ) |
Compute forces for all local atoms.
Upon return, forces are correct for all local atoms. Values of the forces on ghost atoms are generally undefined.
This method zeros all forces, adds forces from all potential energies, and carries out reverse communication if required (i.e., if reverseUpdateFlag is true).
Definition at line 1550 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::Integrator::setupAtoms().
void DdMd::Simulation::computeForcesAndVirial | ( | ) |
Compute forces for all local atoms and virial stress.
Upon return, forces are correct for all local atoms and virial stress values are set for all Potential objects. Values of the forces on ghost atoms are undefined.
This functions zeros all forces, adds forces from all potential energies, and carries out reverse communication if required (i.e., if reverseUpdateFlag is true). It also calculates and sets each virial stress contribution.
Definition at line 1584 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::Integrator::setupAtoms().
void DdMd::Simulation::computeKineticEnergy | ( | ) |
Compute total kinetic energy.
This function is called on on all processors. The value is accessed by subsequently calling kineticEnergy() on the master.
Definition at line 1620 of file ddMd/simulation/Simulation.cpp.
References Util::PArrayIterator< Data >::notEnd().
Referenced by DdMd::KineticEnergyAnalyzer::compute(), DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NvtIntegrator::integrateStep2(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::LogEnergy::sample(), DdMd::OutputTemperature::sample(), DdMd::OutputEnergy::sample(), DdMd::EnergyAnalyzer::sample(), DdMd::NvtIntegrator::setup(), DdMd::NphIntegrator::setup(), and DdMd::NptIntegrator::setup().
double DdMd::Simulation::kineticEnergy | ( | ) |
Return precomputed total kinetic energy.
Call only on master node.
Definition at line 1658 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NvtIntegrator::integrateStep2(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), DdMd::OutputTemperature::sample(), DdMd::EnergyAnalyzer::sample(), DdMd::NvtIntegrator::setup(), and DdMd::KineticEnergyAnalyzer::value().
void DdMd::Simulation::unsetKineticEnergy | ( | ) |
Mark kinetic energy as unknown.
Definition at line 1664 of file ddMd/simulation/Simulation.cpp.
Referenced by loadParameters(), and readParameters().
void DdMd::Simulation::computePotentialEnergies | ( | ) |
Calculate and store total potential energy on all processors.
Reduce operation: Must be called on all nodes.
Definition at line 1749 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::ExternalEnergyAverage::sample(), DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), and DdMd::EnergyAnalyzer::sample().
double DdMd::Simulation::potentialEnergy | ( | ) | const |
Return sum of precomputed total potential energies.
Call only on master processor, after computePotentialEnergies. Calls the energy() methods of each of the potential classes.
Definition at line 1817 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::NphIntegrator::integrateStep2(), and DdMd::NptIntegrator::integrateStep2().
void DdMd::Simulation::unsetPotentialEnergies | ( | ) |
Mark all potential energies as unknown.
Definition at line 1847 of file ddMd/simulation/Simulation.cpp.
Referenced by loadParameters(), and readParameters().
void DdMd::Simulation::computePairEnergies | ( | ) |
Compute pair energies for each pair of atom types.
Reduce operation: Must be called on all nodes.
Definition at line 1978 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::PairEnergyAverage::sample(), and DdMd::OutputPairEnergies::sample().
DMatrix< double > DdMd::Simulation::pairEnergies | ( | ) | const |
Return precomputed pair energies.
Call only on master processor, after computePairEnergies.
Definition at line 1991 of file ddMd/simulation/Simulation.cpp.
References Util::DMatrix< Data >::allocate().
Referenced by DdMd::PairEnergyAverage::sample(), and DdMd::OutputPairEnergies::sample().
void DdMd::Simulation::computeKineticStress | ( | ) |
Calculate and store kinetic stress.
Reduce operation: Must be called on all nodes.
Definition at line 1674 of file ddMd/simulation/Simulation.cpp.
References Util::Dimension, Util::PArrayIterator< Data >::notEnd(), and Util::Tensor::zero().
Referenced by DdMd::PressureAnalyzer::compute(), DdMd::StressAnalyzer::compute(), DdMd::StressAutoCorrelation::computeData(), DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::VirialStressTensor::sample(), DdMd::VirialStressTensorAverage::sample(), DdMd::OutputStressTensor::sample(), DdMd::OutputBoxdim::sample(), DdMd::StressAutoCorr::sample(), DdMd::OutputPressure::sample(), and DdMd::NptIntegrator::setup().
Tensor DdMd::Simulation::kineticStress | ( | ) | const |
Return total kinetic stress.
Call only on master processor, after computeKineticStress.
Definition at line 1721 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::StressAutoCorrelation::data(), DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::VirialStressTensor::sample(), DdMd::VirialStressTensorAverage::sample(), DdMd::OutputStressTensor::sample(), DdMd::StressAutoCorr::sample(), and DdMd::StressAnalyzer::value().
double DdMd::Simulation::kineticPressure | ( | ) | const |
Return total kinetic pressure.
Call only on master processor, after computeKineticStress.
Definition at line 1727 of file ddMd/simulation/Simulation.cpp.
References Util::Dimension.
Referenced by DdMd::OutputPressure::sample(), and DdMd::PressureAnalyzer::value().
void DdMd::Simulation::unsetKineticStress | ( | ) |
Mark kinetic stress as unknown.
Definition at line 1740 of file ddMd/simulation/Simulation.cpp.
Referenced by loadParameters(), and readParameters().
void DdMd::Simulation::computeVirialStress | ( | ) |
Calculate and store all virial stress contributions.
Reduce operation: Must be called on all nodes. This calls the computeStress() method of each potential class.
Definition at line 1878 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::PressureAnalyzer::compute(), DdMd::StressAnalyzer::compute(), DdMd::VirialStressAnalyzer::compute(), DdMd::StressAutoCorrelation::computeData(), DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::VirialStressTensor::sample(), DdMd::VirialStressTensorAverage::sample(), DdMd::OutputStressTensor::sample(), DdMd::OutputBoxdim::sample(), DdMd::StressAutoCorr::sample(), and DdMd::OutputPressure::sample().
Tensor DdMd::Simulation::virialStress | ( | ) | const |
Return total virial stress.
Call only on master processor, after computeVirialStress. This method calls the stress() method of each potential class (pair, bond, etc.) and adds and returns the sum.
Definition at line 1925 of file ddMd/simulation/Simulation.cpp.
References Util::Tensor::zero().
Referenced by DdMd::StressAutoCorrelation::data(), DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::VirialStressTensor::sample(), DdMd::VirialStressTensorAverage::sample(), DdMd::OutputStressTensor::sample(), DdMd::StressAutoCorr::sample(), DdMd::VirialStressAnalyzer::value(), and DdMd::StressAnalyzer::value().
double DdMd::Simulation::virialPressure | ( | ) | const |
Return total virial pressure.
Call only on master processor, after computeVirialStress. Similar to virialStress, but returns average of diagonal elements.
Definition at line 1951 of file ddMd/simulation/Simulation.cpp.
Referenced by DdMd::OutputPressure::sample(), and DdMd::PressureAnalyzer::value().
void DdMd::Simulation::unsetVirialStress | ( | ) |
Mark all virial stress contributions as unknown.
This method calls unsetStress for each potential energy.
Definition at line 2002 of file ddMd/simulation/Simulation.cpp.
References DdMd::Atom::hasAtomContext().
Referenced by loadParameters(), and readParameters().
|
inline |
Get the PairPotential by const reference.
Definition at line 1110 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::PairEnergyAnalyzer::compute(), DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), DdMd::EnergyAnalyzer::sample(), and DdMd::PairEnergyAnalyzer::value().
|
inline |
Get the PairPotential by reference.
Definition at line 1116 of file ddMd/simulation/Simulation.h.
std::string DdMd::Simulation::pairStyle | ( | ) | const |
Return nonbonded pair style string.
Definition at line 2102 of file ddMd/simulation/Simulation.cpp.
Factory< PairPotential > & DdMd::Simulation::pairFactory | ( | ) |
Get the Factory<PairPotential> by reference.
Definition at line 2090 of file ddMd/simulation/Simulation.cpp.
|
inline |
Get the PairPotential by const reference.
Definition at line 1123 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), and DdMd::EnergyAnalyzer::sample().
|
inline |
Get the PairPotential by reference.
Definition at line 1129 of file ddMd/simulation/Simulation.h.
std::string DdMd::Simulation::bondStyle | ( | ) | const |
Return covalent bond style string.
Definition at line 2121 of file ddMd/simulation/Simulation.cpp.
Factory< BondPotential > & DdMd::Simulation::bondFactory | ( | ) |
Get the Factory<BondPotential> by reference.
Definition at line 2109 of file ddMd/simulation/Simulation.cpp.
|
inline |
Get the AnglePotential by const reference.
Definition at line 1137 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), and DdMd::EnergyAnalyzer::sample().
|
inline |
Get the AnglePotential by reference.
Definition at line 1143 of file ddMd/simulation/Simulation.h.
std::string DdMd::Simulation::angleStyle | ( | ) | const |
Return angle potential style string.
Definition at line 2141 of file ddMd/simulation/Simulation.cpp.
Factory< AnglePotential > & DdMd::Simulation::angleFactory | ( | ) |
Get the AngleFactory by reference.
Definition at line 2129 of file ddMd/simulation/Simulation.cpp.
|
inline |
Get the DihedralPotential by const reference.
Definition at line 1151 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), and DdMd::EnergyAnalyzer::sample().
|
inline |
Get the DihedralPotential by reference.
Definition at line 1157 of file ddMd/simulation/Simulation.h.
std::string DdMd::Simulation::dihedralStyle | ( | ) | const |
Return dihedral potential style string.
Definition at line 2161 of file ddMd/simulation/Simulation.cpp.
Factory< DihedralPotential > & DdMd::Simulation::dihedralFactory | ( | ) |
Get the associated Dihedral Factory by reference.
Definition at line 2149 of file ddMd/simulation/Simulation.cpp.
|
inline |
Get the ExternalPotential by reference.
Definition at line 1165 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::ExternalEnergyAnalyzer::compute(), DdMd::ExternalEnergyAverage::sample(), DdMd::OutputEnergy::sample(), DdMd::EnergyAnalyzer::sample(), and DdMd::ExternalEnergyAnalyzer::value().
|
inline |
Get the ExternalPotential by reference.
Definition at line 1171 of file ddMd/simulation/Simulation.h.
std::string DdMd::Simulation::externalStyle | ( | ) | const |
Return external potential style string.
Definition at line 2181 of file ddMd/simulation/Simulation.cpp.
Factory< ExternalPotential > & DdMd::Simulation::externalFactory | ( | ) |
Get the associated External Factory by reference.
Definition at line 2169 of file ddMd/simulation/Simulation.cpp.
|
inline |
Get the AtomStorage by reference.
Definition at line 1086 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::ConfigIo::ConfigIo(), DdMd::OutputTemperature::sample(), DdMd::OrderParamNucleation::sample(), DdMd::StructureFactor::sample(), DdMd::VanHove::sample(), and DdMd::TrajectoryWriter::TrajectoryWriter().
|
inline |
Get the BondStorage by reference.
Definition at line 1090 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::BondTensorAutoCorr::computeData(), DdMd::ConfigIo::ConfigIo(), and DdMd::TrajectoryWriter::TrajectoryWriter().
|
inline |
Get the AngleStorage by reference.
Definition at line 1095 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::ConfigIo::ConfigIo(), and DdMd::TrajectoryWriter::TrajectoryWriter().
|
inline |
Get the DihedralStorage by reference.
Definition at line 1100 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::ConfigIo::ConfigIo(), and DdMd::TrajectoryWriter::TrajectoryWriter().
|
inline |
Get the Domain by reference.
Definition at line 1083 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::EnergyAnalyzer::clear(), DdMd::ExternalEnergyAnalyzer::compute(), DdMd::PairEnergyAnalyzer::compute(), DdMd::BondTensorAutoCorr::computeData(), DdMd::ConfigIo::ConfigIo(), DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::ExternalEnergyAverage::loadParameters(), DdMd::PairEnergyAverage::loadParameters(), DdMd::VirialStressTensorAverage::loadParameters(), DdMd::AverageAnalyzer::loadParameters(), DdMd::TensorAverageAnalyzer::loadParameters(), DdMd::SymmTensorAverageAnalyzer::loadParameters(), DdMd::EnergyAnalyzer::output(), DdMd::ExternalEnergyAverage::readParameters(), DdMd::PairEnergyAverage::readParameters(), DdMd::StressAutoCorr::readParameters(), DdMd::AutoCorrAnalyzer< Data, Product >::readParameters(), DdMd::AverageAnalyzer::readParameters(), DdMd::SymmTensorAverageAnalyzer::readParameters(), DdMd::TensorAverageAnalyzer::readParameters(), DdMd::OutputPairEnergies::sample(), DdMd::VirialStressTensorAverage::sample(), DdMd::LogEnergy::sample(), DdMd::OutputStressTensor::sample(), DdMd::OutputEnergy::sample(), DdMd::OutputTemperature::sample(), DdMd::OutputBoxdim::sample(), DdMd::OutputPressure::sample(), DdMd::StressAutoCorr::sample(), DdMd::EnergyAnalyzer::sample(), DdMd::OrderParamNucleation::sample(), DdMd::StructureFactor::sample(), DdMd::VanHove::sample(), and DdMd::TrajectoryWriter::TrajectoryWriter().
|
inline |
Get the Boundary by reference.
Definition at line 1080 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::BondTensorAutoCorr::computeData(), DdMd::ConfigIo::ConfigIo(), DdMd::ExternalPotentialImpl< Interaction >::ExternalPotentialImpl(), DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NphIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), DdMd::VanHove::makeWaveVectors(), DdMd::StructureFactor::makeWaveVectors(), DdMd::OrderParamNucleation::output(), DdMd::OutputBoxdim::sample(), DdMd::StressAutoCorr::sample(), DdMd::OrderParamNucleation::sample(), DdMd::StructureFactorGrid::sample(), DdMd::StructureFactor::sample(), and DdMd::TrajectoryWriter::TrajectoryWriter().
|
inline |
Get an AtomType descriptor by reference.
Get an AtomType descriptor for a specific type by reference.
i | index of desired atom type. |
Definition at line 1255 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::NptIntegrator::integrateStep2(), DdMd::NvtIntegrator::setup(), DdMd::NveIntegrator::setup(), DdMd::NphIntegrator::setup(), DdMd::NptIntegrator::setup(), and DdMd::NvtLangevinIntegrator::setup().
|
inline |
Get the Integrator by reference.
Get the MD integrator by reference.
Definition at line 1179 of file ddMd/simulation/Simulation.h.
|
inline |
Get the EnergyEnsemble by reference.
Definition at line 1190 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::NvtIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NvtIntegrator::integrateStep2(), DdMd::NvtIntegrator::NvtIntegrator(), DdMd::NvtIntegrator::setup(), DdMd::NptIntegrator::setup(), and DdMd::NvtLangevinIntegrator::setup().
|
inline |
Get the BoundaryEnsemble by reference.
Definition at line 1197 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::NphIntegrator::integrateStep1(), DdMd::NptIntegrator::integrateStep1(), DdMd::NphIntegrator::setup(), and DdMd::NptIntegrator::setup().
|
inline |
Get the associated FileMaster by reference.
Get the FileMaster by reference.
Definition at line 1204 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::OutputStressTensor::loadParameters(), DdMd::OutputEnergy::loadParameters(), DdMd::OutputTemperature::loadParameters(), DdMd::OutputPressure::loadParameters(), DdMd::VirialStressTensor::loadParameters(), DdMd::OutputPairEnergies::loadParameters(), DdMd::VirialStressTensorAverage::loadParameters(), DdMd::ExternalEnergyAverage::output(), DdMd::PairEnergyAverage::output(), DdMd::StressAutoCorr::output(), DdMd::AutoCorrAnalyzer< Data, Product >::output(), DdMd::AverageAnalyzer::output(), DdMd::EnergyAnalyzer::output(), DdMd::SymmTensorAverageAnalyzer::output(), DdMd::TensorAverageAnalyzer::output(), DdMd::OrderParamNucleation::output(), DdMd::StructureFactorGrid::output(), DdMd::StructureFactor::output(), DdMd::VanHove::output(), DdMd::OutputStressTensor::readParameters(), DdMd::OutputBoxdim::readParameters(), DdMd::OutputTemperature::readParameters(), DdMd::OutputEnergy::readParameters(), DdMd::VirialStressTensor::readParameters(), DdMd::OutputPairEnergies::readParameters(), DdMd::OutputPressure::readParameters(), DdMd::VirialStressTensorAverage::readParameters(), DdMd::StructureFactorGrid::sample(), DdMd::StructureFactor::sample(), DdMd::OutputStressTensor::setup(), DdMd::OutputBoxdim::setup(), DdMd::OutputTemperature::setup(), DdMd::OutputEnergy::setup(), DdMd::OutputPressure::setup(), DdMd::TrajectoryWriter::setup(), DdMd::AverageAnalyzer::setup(), DdMd::EnergyAnalyzer::setup(), DdMd::TensorAverageAnalyzer::setup(), and DdMd::SymmTensorAverageAnalyzer::setup().
|
inline |
Get the Random number generator by reference.
Get the Random RNG by reference.
Definition at line 1186 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::NvtLangevinIntegrator::integrateStep2().
|
inline |
Get the Exchanger by reference.
Definition at line 1104 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::Integrator::clear().
|
inline |
Get the Buffer by reference.
Definition at line 1107 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::Integrator::clear(), and DdMd::ConfigIo::ConfigIo().
|
inline |
Return the ModifierManager by reference.
Get the ModifierManager by reference.
Definition at line 1212 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::TwoStepIntegrator::run().
|
inline |
Return the AnalyzerManager by reference.
Get the AnalyzerManager by reference.
Definition at line 1220 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::Integrator::clear(), and DdMd::TwoStepIntegrator::run().
Factory< Integrator > & DdMd::Simulation::integratorFactory | ( | ) |
Get the Integrator factory by reference.
Definition at line 2190 of file ddMd/simulation/Simulation.cpp.
|
inline |
Get maximum number of atom types.
Definition at line 1227 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::ExternalPotentialImpl< Interaction >::ExternalPotentialImpl(), DdMd::LammpsConfigIo::LammpsConfigIo(), DdMd::NvtIntegrator::loadParameters(), DdMd::NphIntegrator::loadParameters(), DdMd::NveIntegrator::loadParameters(), DdMd::NptIntegrator::loadParameters(), DdMd::NvtLangevinIntegrator::loadParameters(), DdMd::OrderParamNucleation::loadParameters(), DdMd::StructureFactorGrid::loadParameters(), DdMd::StructureFactor::loadParameters(), DdMd::VanHove::loadParameters(), DdMd::PairPotentialImpl< Interaction >::PairPotentialImpl(), DdMd::NvtIntegrator::readParameters(), DdMd::NveIntegrator::readParameters(), DdMd::NphIntegrator::readParameters(), DdMd::NptIntegrator::readParameters(), DdMd::NvtLangevinIntegrator::readParameters(), DdMd::OrderParamNucleation::readParameters(), DdMd::StructureFactorGrid::readParameters(), DdMd::StructureFactor::readParameters(), DdMd::VanHove::readParameters(), DdMd::PairEnergyAverage::sample(), and DdMd::OutputPairEnergies::sample().
|
inline |
Get maximum number of bond types.
Definition at line 1232 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::BondPotentialImpl< Interaction >::BondPotentialImpl(), DdMd::EnergyAnalyzer::clear(), DdMd::LammpsConfigIo::LammpsConfigIo(), DdMd::EnergyAnalyzer::output(), DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), DdMd::EnergyAnalyzer::sample(), and DdMd::EnergyAnalyzer::save().
|
inline |
Get maximum number of angle types.
Definition at line 1238 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::AnglePotentialImpl< Interaction >::AnglePotentialImpl(), DdMd::EnergyAnalyzer::clear(), DdMd::LammpsConfigIo::LammpsConfigIo(), DdMd::EnergyAnalyzer::output(), DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), DdMd::EnergyAnalyzer::sample(), and DdMd::EnergyAnalyzer::save().
|
inline |
Get maximum number of dihedral types.
Get the maximum number of dihedral types.
Definition at line 1244 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::EnergyAnalyzer::clear(), DdMd::DihedralPotentialImpl< Interaction >::DihedralPotentialImpl(), DdMd::LammpsConfigIo::LammpsConfigIo(), DdMd::EnergyAnalyzer::output(), DdMd::LogEnergy::sample(), DdMd::OutputEnergy::sample(), DdMd::EnergyAnalyzer::sample(), and DdMd::EnergyAnalyzer::save().
|
inline |
Does this simulation have an external potential?
Definition at line 1250 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::EnergyAnalyzer::clear(), DdMd::EnergyAnalyzer::output(), DdMd::OutputEnergy::sample(), DdMd::EnergyAnalyzer::sample(), and DdMd::EnergyAnalyzer::save().
|
inline |
Return the value of the mask policy (MaskNone or MaskBonded).
Get the masked pair policy.
Definition at line 1259 of file ddMd/simulation/Simulation.h.
|
inline |
Is reverse communication enabled?
Get the reverse update flag.
Definition at line 1263 of file ddMd/simulation/Simulation.h.
|
inline |
Signal to force unsetting of quantities that depend on x, v, or f.
Signal to force unsetting of all computed quantities.
Definition at line 1269 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::TwoStepIntegrator::run().
|
inline |
Signal to indicate change in atomic positions.
Definition at line 1273 of file ddMd/simulation/Simulation.h.
|
inline |
Signal to indicate change in atomic velocities.
Definition at line 1277 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::NvtIntegrator::integrateStep2(), DdMd::NphIntegrator::integrateStep2(), DdMd::NveIntegrator::integrateStep2(), DdMd::NptIntegrator::integrateStep2(), and DdMd::NvtLangevinIntegrator::integrateStep2().
|
inline |
Signal to indicate exchange of atoms and groups.
Signal to indicate exchange of atom ownership.
Definition at line 1281 of file ddMd/simulation/Simulation.h.
Referenced by DdMd::TwoStepIntegrator::run().
void DdMd::Simulation::outputOptions | ( | std::ostream & | out | ) | const |
Output a list of options enabled & disabled during compilation.
out | output stream |
Definition at line 2286 of file ddMd/simulation/Simulation.cpp.
bool DdMd::Simulation::isValid | ( | ) |
Return true if this Simulation is valid, or throw an Exception.
Definition at line 2338 of file ddMd/simulation/Simulation.cpp.
References Util::bcast().
Referenced by DdMd::TwoStepIntegrator::run().
|
protected |
Read the FileMaster.
in | input parameter stream |
Definition at line 1019 of file ddMd/simulation/Simulation.cpp.
|
protected |
Load FileMaster from an archive.
ar | input/loading archive |
Definition at line 1029 of file ddMd/simulation/Simulation.cpp.
|
protected |
Save FileMaster to archive.
ar | output/saving archive |
Definition at line 1039 of file ddMd/simulation/Simulation.cpp.
|
protected |
Read potential styles and maskedPairPolicy.
in | input parameter stream |
Definition at line 1045 of file ddMd/simulation/Simulation.cpp.
|
protected |
Load potential styles.
ar | input/loading archive |
Definition at line 1081 of file ddMd/simulation/Simulation.cpp.
|
protected |
Save potential styles to archive.
ar | output/saving archive |
Definition at line 1113 of file ddMd/simulation/Simulation.cpp.
|
protected |
Read energy and boundary ensembles.
in | input parameter stream |
Definition at line 1143 of file ddMd/simulation/Simulation.cpp.
|
protected |
Load energy and boundary ensembles from an input archive.
ar | input/loading archive |
Definition at line 1152 of file ddMd/simulation/Simulation.cpp.
|
protected |
Save energy and boundary ensembles to archive.
ar | output/saving archive |
Definition at line 1161 of file ddMd/simulation/Simulation.cpp.