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

Detailed Description

A System for use in a Markov chain Monte Carlo simulation.

McSystem provides methods to evaluate energies of individual atoms, and other functions needed in MC simulations.

Definition at line 52 of file McSystem.h.

#include <McSystem.h>

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

Public Member Functions

 McSystem ()
 Constructor. More...
 
virtual ~McSystem ()
 Destructor. More...
 
Parameter IO
virtual void readParameters (std::istream &in)
 Read parameters from input file. More...
 
virtual void loadParameters (Serializable::IArchive &ar)
 Load parameters from an archive, without configuration. More...
 
virtual void saveParameters (Serializable::OArchive &ar)
 Save parameters to an archive, without configuration. More...
 
Initial Configurations
virtual void readConfig (std::istream &in)
 Read system configuration from file. More...
 
virtual void loadConfig (Serializable::IArchive &ar)
 Load the system configuration from an archive. More...
 
virtual void generateMolecules (Array< int > const &capacities, Array< double > const &diameters)
 Generate molecules for all species. More...
 
Energy and Stress calculators
double atomPotentialEnergy (const Atom &atom) const
 Calculate the total potential energy for one Atom. More...
 
double potentialEnergy () const
 Return total potential energy of this System. More...
 
template<typename T >
void computeVirialStress (T &stress) const
 Compute total virial stress (excludes kinetic contribution). More...
 
template<typename T >
void computeStress (T &stress) const
 Compute total pressure (T=double), xyz pressures (T=Vector) or stress (T=Tensor). More...
 
void unsetPotentialEnergies ()
 Unset potential precomputed potential energy components. More...
 
void unsetVirialStress ()
 Unset precomputed virial stress components. More...
 
Potential Energy Accessors
McPairPotentialpairPotential () const
 Return the McPairPotential by reference. More...
 
bool hasBondPotential () const
 Does a bond potential exist?. More...
 
BondPotentialbondPotential () const
 Return the BondPotential by reference. More...
 
bool hasAnglePotential () const
 Does angle potential exist?. More...
 
AnglePotentialanglePotential () const
 Return AnglePotential by reference. More...
 
bool hasDihedralPotential () const
 Does a dihedral potential exist?. More...
 
DihedralPotentialdihedralPotential () const
 Return the DihedralPotential by reference. More...
 
bool hasCoulombPotential () const
 Does a Coulomb potential exist?. More...
 
CoulombPotential & coulombPotential () const
 Return CoulombPotential by reference. More...
 
bool hasExternalPotential () const
 Does an external potential exist?. More...
 
ExternalPotentialexternalPotential () const
 Return ExternalPotential by reference. More...
 
bool hasLinkPotential () const
 Does a link potential exist?. More...
 
BondPotentiallinkPotential () const
 Return the McLinkPotential by reference. More...
 
Miscellaneous
SignalpositionSignal ()
 Signal to indicate change in atomic positions. More...
 
virtual bool isValid () const
 Return true if McSystem is valid, or throw Exception. More...
 
- Public Member Functions inherited from McMd::System
 System ()
 Default constructor. More...
 
 System (const System &other)
 Copy constructor. More...
 
virtual ~System ()
 Destructor. More...
 
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...
 
void saveParameters (Serializable::OArchive &ar)
 Save internal state from an archive. 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...
 
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...
 
void saveConfig (Serializable::OArchive &ar)
 Save configuration. More...
 
Factory< TrajectoryReader > & trajectoryReaderFactory ()
 Get the trajectory reader/writer factory by reference. More...
 
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...
 
int nMolecule (int speciesId) const
 Get the number of molecules of one Species in this System. More...
 
int nAtom () const
 Return the total number of atoms in this System. More...
 
bool isEmpty () const
 Is this an empty System (i.e., one with no molecules) ? More...
 
int moleculeId (const Molecule &molecule) const
 Get the index of a Molecule within its Species in this System. More...
 
Moleculemolecule (int speciesId, int moleculeId)
 Get a specific Molecule in this System, by integer index. More...
 
MoleculerandomMolecule (int speciesId)
 Get a random Molecule of a specified species in this System. More...
 
void begin (int speciesId, MoleculeIterator &iterator)
 Initialize an iterator for molecules of one species in this System. More...
 
void begin (int speciesId, ConstMoleculeIterator &iterator) const
 Initialize a const iterator for molecules of one species in this System. More...
 
PairFactorypairFactory ()
 Get the PairFactory by reference. More...
 
std::string pairStyle () const
 Return nonbonded pair style string. More...
 
Factory< BondPotential > & bondFactory ()
 Get the associated Factory<BondPotential> by reference. More...
 
std::string bondStyle () const
 Return covalent bond style string. More...
 
Factory< AnglePotential > & angleFactory ()
 Get the associated AngleFactory by reference. More...
 
std::string angleStyle () const
 Return angle potential style string. More...
 
Factory< DihedralPotential > & dihedralFactory ()
 Get the associated Dihedral Factory by reference. More...
 
std::string dihedralStyle () const
 Return dihedral potential style string. More...
 
CoulombFactorycoulombFactory ()
 Get the associated Coulomb Factory by reference. More...
 
std::string coulombStyle () const
 Return coulomb potential style string. More...
 
Factory< ExternalPotential > & externalFactory ()
 Get the associated ExternalPotential factory by reference. More...
 
std::string externalStyle () const
 Return external potential style string. More...
 
Factory< BondPotential > & linkFactory ()
 Get the associated Link factory by reference. More...
 
std::string linkStyle () const
 Return link potential style string. More...
 
LinkMasterlinkMaster () const
 Get the LinkMaster by reference. More...
 
Factory< Perturbation > & perturbationFactory ()
 Get the perturbation factory by reference. More...
 
void setExpectPerturbation ()
 Set to expect a Perturbation in the parameter file. More...
 
bool expectPerturbation () const
 Return true if we expect a perturbation. More...
 
bool hasPerturbation () const
 Does this system have an associated Perturbation? More...
 
Perturbationperturbation () const
 Get the associated Perturbation by reference. More...
 
bool hasReplicaMove () const
 Does this system have an associated ReplicaMove? More...
 
ReplicaMovereplicaMove () const
 Get the associated ReplicaMove by reference. More...
 
int id () const
 Get integer index for this System. More...
 
Simulationsimulation () const
 Get the parent Simulation by reference. More...
 
Boundaryboundary () const
 Get the Boundary by reference. More...
 
EnergyEnsembleenergyEnsemble () const
 Get the EnergyEnsemble by reference. More...
 
BoundaryEnsembleboundaryEnsemble () const
 Get the BoundaryEnsemble by reference. More...
 
FileMasterfileMaster () const
 Get the associated FileMaster by reference. More...
 
bool isCopy () const
 Was this System instantiated with the copy constructor? More...
 
- Public Member Functions inherited from Util::ParamComposite
 ParamComposite ()
 Constructor. More...
 
 ParamComposite (const ParamComposite &other)
 Copy constructor. More...
 
 ParamComposite (int capacity)
 Constructor. More...
 
virtual ~ParamComposite ()
 Virtual destructor. More...
 
void resetParam ()
 Resets ParamComposite to its empty state. More...
 
virtual void readParam (std::istream &in)
 Read the parameter file block. More...
 
virtual void readParamOptional (std::istream &in)
 Read optional parameter file block. More...
 
virtual void writeParam (std::ostream &out)
 Write all parameters to an output stream. More...
 
virtual void load (Serializable::IArchive &ar)
 Load all parameters from an input archive. More...
 
virtual void loadOptional (Serializable::IArchive &ar)
 Load an optional ParamComposite. More...
 
virtual void save (Serializable::OArchive &ar)
 Saves all parameters to an archive. More...
 
void saveOptional (Serializable::OArchive &ar)
 Saves isActive flag, and then calls save() iff isActive is true. More...
 
void readParamComposite (std::istream &in, ParamComposite &child, bool next=true)
 Add and read a required child ParamComposite. More...
 
void readParamCompositeOptional (std::istream &in, ParamComposite &child, bool next=true)
 Add and attempt to read an optional child ParamComposite. More...
 
template<typename Type >
ScalarParam< Type > & read (std::istream &in, const char *label, Type &value)
 Add and read a new required ScalarParam < Type > object. More...
 
template<typename Type >
ScalarParam< Type > & readOptional (std::istream &in, const char *label, Type &value)
 Add and read a new optional ScalarParam < Type > object. More...
 
template<typename Type >
CArrayParam< Type > & readCArray (std::istream &in, const char *label, Type *value, int n)
 Add and read a required C array parameter. More...
 
template<typename Type >
CArrayParam< Type > & readOptionalCArray (std::istream &in, const char *label, Type *value, int n)
 Add and read an optional C array parameter. More...
 
template<typename Type >
DArrayParam< Type > & readDArray (std::istream &in, const char *label, DArray< Type > &array, int n)
 Add and read a required DArray < Type > parameter. More...
 
template<typename Type >
DArrayParam< Type > & readOptionalDArray (std::istream &in, const char *label, DArray< Type > &array, int n)
 Add and read an optional DArray < Type > parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & readFArray (std::istream &in, const char *label, FArray< Type, N > &array)
 Add and read a required FArray < Type, N > array parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & readOptionalFArray (std::istream &in, const char *label, FArray< Type, N > &array)
 Add and read an optional FArray < Type, N > array parameter. More...
 
template<typename Type >
CArray2DParam< Type > & readCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np)
 Add and read a required CArray2DParam < Type > 2D C-array. More...
 
template<typename Type >
CArray2DParam< Type > & readOptionalCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np)
 Add and read an optional CArray2DParam < Type > 2D C-array parameter. More...
 
template<typename Type >
DMatrixParam< Type > & readDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and read a required DMatrix < Type > matrix parameter. More...
 
template<typename Type >
DMatrixParam< Type > & readOptionalDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and read an optional DMatrix < Type > matrix parameter. More...
 
template<typename Type >
DSymmMatrixParam< Type > & readDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n)
 Add and read a required symmetrix DMatrix. More...
 
template<typename Type >
DSymmMatrixParam< Type > & readOptionalDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n)
 Add and read an optional DMatrix matrix parameter. More...
 
BeginreadBegin (std::istream &in, const char *label, bool isRequired=true)
 Add and read a class label and opening bracket. More...
 
EndreadEnd (std::istream &in)
 Add and read the closing bracket. More...
 
BlankreadBlank (std::istream &in)
 Add and read a new Blank object, representing a blank line. More...
 
void loadParamComposite (Serializable::IArchive &ar, ParamComposite &child, bool next=true)
 Add and load a required child ParamComposite. More...
 
void loadParamCompositeOptional (Serializable::IArchive &ar, ParamComposite &child, bool next=true)
 Add and load an optional child ParamComposite if isActive. More...
 
template<typename Type >
ScalarParam< Type > & loadParameter (Serializable::IArchive &ar, const char *label, Type &value, bool isRequired)
 Add and load a new ScalarParam < Type > object. More...
 
template<typename Type >
ScalarParam< Type > & loadParameter (Serializable::IArchive &ar, const char *label, Type &value)
 Add and load new required ScalarParam < Type > object. More...
 
template<typename Type >
CArrayParam< Type > & loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n, bool isRequired)
 Add a C array parameter and load its elements. More...
 
template<typename Type >
CArrayParam< Type > & loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n)
 Add and load a required CArrayParam< Type > array parameter. More...
 
template<typename Type >
DArrayParam< Type > & loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n, bool isRequired)
 Add an load a DArray < Type > array parameter. More...
 
template<typename Type >
DArrayParam< Type > & loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n)
 Add and load a required DArray< Type > array parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array, bool isRequired)
 Add and load an FArray < Type, N > fixed-size array parameter. More...
 
template<typename Type , int N>
FArrayParam< Type, N > & loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array)
 Add and load a required FArray < Type > array parameter. More...
 
template<typename Type >
CArray2DParam< Type > & loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np, bool isRequired)
 Add and load a CArray2DParam < Type > C 2D array parameter. More...
 
template<typename Type >
CArray2DParam< Type > & loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np)
 Add and load a required < Type > matrix parameter. More...
 
template<typename Type >
DMatrixParam< Type > & loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n, bool isRequired)
 Add and load a DMatrixParam < Type > matrix parameter. More...
 
template<typename Type >
DMatrixParam< Type > & loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and load a required DMatrixParam < Type > matrix parameter. More...
 
template<typename Type >
DSymmMatrixParam< Type > & loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n, bool isRequired)
 Add and load a symmetric DSymmMatrixParam < Type > matrix parameter. More...
 
template<typename Type >
DSymmMatrixParam< Type > & loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n)
 Add and load a required DSymmMatrixParam < Type > matrix parameter. More...
 
void addParamComposite (ParamComposite &child, bool next=true)
 Add a child ParamComposite object to the format array. More...
 
BeginaddBegin (const char *label)
 Add a Begin object representing a class name and bracket. More...
 
EndaddEnd ()
 Add a closing bracket. More...
 
BlankaddBlank ()
 Create and add a new Blank object, representing a blank line. More...
 
std::string className () const
 Get class name string. More...
 
bool isRequired () const
 Is this ParamComposite required in the input file? More...
 
bool isActive () const
 Is this parameter active? More...
 
- Public Member Functions inherited from Util::ParamComponent
virtual ~ParamComponent ()
 Destructor. More...
 
void setIndent (const ParamComponent &parent, bool next=true)
 Set indent level. More...
 
std::string indent () const
 Return indent string for this object (string of spaces). More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize this ParamComponent as a string. More...
 
- Public Member Functions inherited from Util::Serializable
virtual ~Serializable ()
 Destructor. More...
 
- Public Member Functions inherited from Util::MpiFileIo
 MpiFileIo ()
 Constructor. More...
 
 MpiFileIo (const MpiFileIo &other)
 Copy constructor. More...
 
bool isIoProcessor () const
 Can this processor do file I/O ? More...
 
void setIoCommunicator (MPI::Intracomm &communicator)
 Set the communicator. More...
 
void clearCommunicator ()
 Clear (nullify) the communicator. More...
 
bool hasIoCommunicator () const
 Does this object have an associated MPI communicator? More...
 
MPI::Intracomm & ioCommunicator () const
 Get the MPI communicator by reference. More...
 

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from McMd::System
typedef ArraySet< MoleculeMoleculeSet
 A set of molecules of one Species in a System. More...
 
typedef PArrayIterator< MoleculeMoleculeIterator
 Iterator for a MoleculeSet. More...
 
typedef ConstPArrayIterator< MoleculeConstMoleculeIterator
 Const Iterator for a MoleculeSet. More...
 
- Public Types inherited from Util::Serializable
typedef BinaryFileOArchive OArchive
 Type of output archive used by save method. More...
 
typedef BinaryFileIArchive IArchive
 Type of input archive used by load method. More...
 
- Static Public Member Functions inherited from Util::ParamComponent
static void initStatic ()
 Initialize static echo member to false. More...
 
static void setEcho (bool echo=true)
 Enable or disable echoing for all subclasses of ParamComponent. More...
 
static bool echo ()
 Get echo parameter. More...
 

Constructor & Destructor Documentation

McMd::McSystem::McSystem ( )
McMd::McSystem::~McSystem ( )
virtual

Destructor.

Definition at line 101 of file McSystem.cpp.

Member Function Documentation

void McMd::McSystem::readParameters ( std::istream &  in)
virtual
void McMd::McSystem::loadParameters ( Serializable::IArchive ar)
virtual
void McMd::McSystem::saveParameters ( Serializable::OArchive ar)
virtual
void McMd::McSystem::readConfig ( std::istream &  in)
virtual

Read system configuration from file.

Calls System::readConfig() and then builds CellList.

Parameters
inconfiguration file input stream

Reimplemented from McMd::System.

Definition at line 393 of file McSystem.cpp.

References McMd::McPairPotential::buildCellList(), pairPotential(), and McMd::System::readConfig().

Referenced by McMd::McSimulation::analyzeConfigs(), and McMd::McCommandManager::readStandardCommand().

void McMd::McSystem::loadConfig ( Serializable::IArchive ar)
virtual

Load the system configuration from an archive.

Parameters
arinput (loading) archive object.

Reimplemented from McMd::System.

Definition at line 404 of file McSystem.cpp.

References McMd::McPairPotential::buildCellList(), McMd::System::loadConfig(), and pairPotential().

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

void McMd::McSystem::generateMolecules ( Array< int > const &  capacities,
Array< double > const &  diameters 
)
virtual

Generate molecules for all species.

The array capacities contains at least nSpecies elements, in which element i contains the number of molecules to generate for species i.

The array capacities contains at least nAtomType elements, in which element i contains the steric diameter used for atom i in the packing algorithm.

Parameters
capacitiesnumber of molecules in each species
diametersdiameter of each atom type

Definition at line 415 of file McSystem.cpp.

References McMd::System::boundary(), McMd::McPairPotential::buildCellList(), Util::Log::file(), McMd::Generator::generate(), McMd::generatorFactory(), isValid(), McMd::Simulation::nSpecies(), pairPotential(), McMd::Generator::setupCellList(), McMd::System::simulation(), and UTIL_CHECK.

Referenced by McMd::McCommandManager::readStandardCommand().

double McMd::McSystem::atomPotentialEnergy ( const Atom atom) const
double McMd::McSystem::potentialEnergy ( ) const
template<typename T >
void McMd::McSystem::computeVirialStress ( T &  stress) const

Compute total virial stress (excludes kinetic contribution).

The virial stress is the sum of all pair and bonded stress components. It excludes the kinetic stress.

See also
McSystem::computeStress(T&) regarding allowed types for T.
Parameters
stress(output) pressure, pressures or Tensor.

Referenced by McMd::McVirialStressTensorAverage::sample(), unsetPotentialEnergies(), and McMd::McStressAutoCorrelation::~McStressAutoCorrelation().

template<typename T >
void McMd::McSystem::computeStress ( T &  stress) const

Compute total pressure (T=double), xyz pressures (T=Vector) or stress (T=Tensor).

In this and all other stress / pressure calculators, typename T must be double to obtain total pressure, Util::Vector to obtain the diagonal pressure components, or Util::Tensor to obtain the full stress tensor. These templates work only for these three types. The parameter stress contains the desired value when the function returns.

The total stress is the sum of the virial stress arising from interatomic forces and an ideal gas kinetic stress.

Parameters
stress(output) pressure, xyz pressures or stress Tensor.

Referenced by McMd::McStressAutoCorrelation::~McStressAutoCorrelation().

void McMd::McSystem::unsetPotentialEnergies ( )
void McMd::McSystem::unsetVirialStress ( )
McPairPotential & McMd::McSystem::pairPotential ( ) const
inline

Return the McPairPotential by reference.

Definition at line 388 of file McSystem.h.

Referenced by McMd::CfbLinear::addAtom(), McMd::CfbEndBase::addEndAtom(), McMd::CfbRebridgeBase::addMiddleAtom(), McMd::CfbRebridgeBase::addSequence(), McMd::McSimulation::analyzeConfigs(), McMd::McSimulation::analyzeTrajectory(), atomPotentialEnergy(), McMd::CfbLinear::deleteAtom(), McMd::CfbEndBase::deleteEndAtom(), McMd::CfbRebridgeBase::deleteMiddleAtom(), McMd::CfbRebridgeBase::deleteSequence(), McMd::McPairExternalPerturbation< PairInteraction, ExternalInteraction >::derivative(), McMd::McPairPerturbation< Interaction >::derivative(), McMd::McPerturbationFactory::factory(), generateMolecules(), McMd::McPairPerturbation< Interaction >::interaction(), isValid(), McMd::McNVTChemicalPotential::load(), loadConfig(), McMd::McSystemInterface::McSystemInterface(), McMd::MdSystem::MdSystem(), McMd::GcSliplinkMove::move(), McMd::SliplinkerAll::move(), McMd::SliplinkerEnd::move(), McMd::SliplinkMove::move(), McMd::RingTetraRebridgeMove::move(), McMd::AtomDisplaceMove::move(), McMd::CfbDoubleRebridgeMove::move(), McMd::CfbEndMove::move(), McMd::RingOctaRebridgeMove::move(), McMd::CfbLinearEndMove::move(), McMd::CfbRebridgeMove::move(), McMd::HomopolymerSemiGrandMove::move(), McMd::CfbReptationMove::move(), McMd::CfbRingRebridgeMove::move(), McMd::EndSwapMove::move(), McMd::CfbReptateMove::move(), McMd::HybridMdMove::move(), McMd::HybridNphMdMove::move(), McMd::RigidDisplaceMove::move(), McMd::MdMove::move(), McMd::DpdMove::move(), McMd::GroupRebridgeBase::octaEnergy(), potentialEnergy(), readConfig(), McMd::McPairExternalPerturbation< PairInteraction, ExternalInteraction >::readParameters(), McMd::McCommandManager::readStandardCommand(), McMd::McNVTChemicalPotential::sample(), McMd::McMuExchange::sample(), McMd::McEnergyOutput::sample(), McMd::McPairEnergyAverage::sample(), McMd::McEnergyAnalyzer::sample(), saveParameters(), McMd::RingOctaRebridgeMove::scanBridge(), McMd::McSimulation::simulate(), McMd::GroupRebridgeBase::tetraEnergy(), unsetPotentialEnergies(), and unsetVirialStress().

bool McMd::McSystem::hasBondPotential ( ) const
inline
BondPotential & McMd::McSystem::bondPotential ( ) const
inline
bool McMd::McSystem::hasAnglePotential ( ) const
inline
AnglePotential & McMd::McSystem::anglePotential ( ) const
inline
bool McMd::McSystem::hasDihedralPotential ( ) const
inline
DihedralPotential & McMd::McSystem::dihedralPotential ( ) const
inline
bool McMd::McSystem::hasCoulombPotential ( ) const
inline

Does a Coulomb potential exist?.

Definition at line 450 of file McSystem.h.

Referenced by McMd::MdSystem::MdSystem(), and McMd::McEnergyAnalyzer::setup().

CoulombPotential & McMd::McSystem::coulombPotential ( ) const
inline

Return CoulombPotential by reference.

Definition at line 456 of file McSystem.h.

Referenced by McMd::MdSystem::MdSystem().

bool McMd::McSystem::hasExternalPotential ( ) const
inline
ExternalPotential & McMd::McSystem::externalPotential ( ) const
inline
bool McMd::McSystem::hasLinkPotential ( ) const
inline

Does a link potential exist?.

Definition at line 484 of file McSystem.h.

Referenced by atomPotentialEnergy(), McMd::MdSystem::MdSystem(), potentialEnergy(), and unsetPotentialEnergies().

BondPotential & McMd::McSystem::linkPotential ( ) const
inline
Signal & McMd::McSystem::positionSignal ( )
inline

Signal to indicate change in atomic positions.

Definition at line 519 of file McSystem.h.

Referenced by McSystem(), and McMd::McSimulation::simulate().

bool McMd::McSystem::isValid ( ) const
virtual

Return true if McSystem is valid, or throw Exception.

Reimplemented from McMd::System.

Definition at line 721 of file McSystem.cpp.

References McMd::McPairPotential::cellList(), McMd::CellList::isValid(), McMd::System::isValid(), pairPotential(), and UTIL_CHECK.

Referenced by generateMolecules(), and McMd::McSimulation::isValid().

Factory< Perturbation > * McMd::McSystem::newDefaultPerturbationFactory ( )
protectedvirtual

Return a pointer to a new McPerturbationFactory.

Reimplemented from McMd::System.

Definition at line 714 of file McSystem.cpp.

void McMd::McSystem::setPairPotential ( McPairPotential pairPotentialPtr)
inlineprotected

Set the PairPotential.

Parameters
pairPotentialPtrpointer to pair potential

Definition at line 512 of file McSystem.h.


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