1 #ifndef MCMD_SIMULATION_H 2 #define MCMD_SIMULATION_H 13 #include <util/param/ParamComposite.h> 14 #include <mcMd/chemistry/Atom.h> 15 #include <mcMd/chemistry/Molecule.h> 17 #include <mcMd/chemistry/MaskPolicy.h> 20 #include <mcMd/chemistry/Bond.h> 23 #include <mcMd/chemistry/Angle.h> 26 #include <mcMd/chemistry/Dihedral.h> 28 #include <mcMd/chemistry/AtomType.h> 29 #include <util/misc/FileMaster.h> 30 #include <util/random/Random.h> 31 #include <util/containers/RArray.h> 32 #include <util/containers/DArray.h> 33 #include <util/containers/ArrayStack.h> 37 template <
typename T>
class ArraySet;
38 template <
typename T>
class Factory;
51 class AnalyzerManager;
138 virtual void setIoCommunicator(MPI::Intracomm& communicator);
145 void setIoCommunicator();
153 virtual void readParameters(std::istream &in);
166 void writeParam(std::string filename);
207 Molecule& getMolecule(
int speciesId);
214 void returnMolecule(
Molecule& molecule);
252 MPI::Intracomm& communicator();
267 int nAtomType()
const;
274 const AtomType& atomType(
int i)
const;
284 int nSpecies()
const;
291 const Species& species(
int i)
const;
296 int moleculeCapacity()
const;
301 int atomCapacity()
const;
313 virtual bool isValid()
const;
318 bool hasSpecies()
const;
331 int nBondType()
const;
336 int bondCapacity()
const;
343 int nAngleType()
const;
348 int angleCapacity()
const;
355 int nDihedralType()
const;
360 int dihedralCapacity()
const;
367 int hasCoulomb()
const;
374 int hasExternal()
const;
381 int nLinkType()
const;
388 int hasTether()
const;
399 int hasSpecial()
const;
406 bool hasCommunicator()
const;
415 void outputOptions(std::ostream& out)
const;
519 int moleculeCapacity_;
672 int dihedralCapacity_;
709 std::ofstream logFile_;
714 MPI::Intracomm* communicatorPtr_;
724 void initializeSpeciesData();
731 void initializeSpeciesMolecules(
int speciesId);
739 void initializeSpeciesBonds(
int speciesId);
748 void initializeSpeciesAngles(
int speciesId);
757 void initializeSpeciesDihedrals(
int speciesId);
765 inline int Simulation::nSystem()
const 768 inline int Simulation::nAtomType()
const 769 {
return nAtomType_; }
771 inline int Simulation::moleculeCapacity()
const 772 {
return moleculeCapacity_; }
774 inline int Simulation::atomCapacity()
const 775 {
return atomCapacity_; }
778 {
return atomTypes_; }
780 inline const AtomType& Simulation::atomType(
int i)
const 781 {
return atomTypes_[i]; }
784 inline int Simulation::nBondType()
const 785 {
return nBondType_; }
787 inline int Simulation::bondCapacity()
const 788 {
return bondCapacity_; }
792 inline int Simulation::nAngleType()
const 793 {
return nAngleType_; }
795 inline int Simulation::angleCapacity()
const 796 {
return angleCapacity_; }
800 inline int Simulation::nDihedralType()
const 801 {
return nDihedralType_; }
803 inline int Simulation::dihedralCapacity()
const 804 {
return dihedralCapacity_; }
808 inline int Simulation::hasCoulomb()
const 809 {
return hasCoulomb_; }
813 inline int Simulation::hasExternal()
const 814 {
return hasExternal_; }
818 inline int Simulation::nLinkType()
const 819 {
return nLinkType_; }
823 inline int Simulation::hasTether()
const 824 {
return hasTether_; }
828 inline int Simulation::hasSpecial()
const 829 {
return hasSpecial_; }
834 {
return maskedPairPolicy_; }
840 inline bool Simulation::hasSpecies()
const 841 {
return hasSpecies_; }
844 inline bool Simulation::hasCommunicator()
const 845 {
return communicatorPtr_ != 0; }
847 inline MPI::Intracomm& Simulation::communicator()
849 assert(communicatorPtr_);
850 return *communicatorPtr_;
856 inline int Simulation::iStep()
const 860 {
return fileMaster_; }
865 return *analyzerManagerPtr_;
871 return *commandManagerPtr_;
Manager for Command objects in an MdSimulation.
int iStep_
Step index for main MC or MD loop.
MaskPolicy
Enumeration of policies for suppressing ("masking") some pair interactions.
Array container class template.
File containing preprocessor macros for error handling.
Classes used by all simpatico molecular simulations.
int nSystem_
Number of Systems of interacting molecules (> 1 in Gibbs ensemble).
The main object in a simulation, which coordinates others.
Saving / output archive for binary ostream.
Descriptor for a type of Atom.
virtual void writeParam(std::ostream &out)
Write all parameters to an output stream.
A container for pointers to a subset of elements of an associated array.
Utility classes for scientific computation.
A FileMaster manages input and output files for a simulation.
Dynamically allocatable contiguous array template.
Manager for a list of Analyzer objects.
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
A Manager for a set of Species objects.
An Array that acts as a reference to another Array or C array.
A physical molecule (a set of covalently bonded Atoms).
An object that can read multiple parameters from file.
A Species represents a set of chemically similar molecules.