13 #include <util/param/ParamComposite.h> 15 #include <simp/boundary/Boundary.h> 16 #include <mcMd/chemistry/Molecule.h> 18 #include <util/containers/DArray.h> 19 #include <util/containers/ArraySet.h> 20 #include <util/containers/PArrayIterator.h> 29 template <
typename T>
class Factory;
35 class BoundaryEnsemble;
55 virtual void notifyMoleculeSetChanged() = 0;
197 virtual void readParameters(std::istream& in);
233 void setConfigIo(std::string& classname);
254 virtual void readConfig(std::istream& in);
265 void readConfig(std::string filename);
276 void writeConfig(std::ostream& out);
287 void writeConfig(std::string filename);
327 void addMolecule(
Molecule& molecule);
340 void removeMolecule(
Molecule& molecule);
348 void removeAllMolecules();
374 int nMolecule(
int speciesId)
const;
384 bool isEmpty()
const;
401 int moleculeId(
const Molecule& molecule)
const;
415 Molecule& molecule(
int speciesId,
int moleculeId);
423 Molecule& randomMolecule(
int speciesId);
431 void begin(
int speciesId, MoleculeIterator& iterator);
439 void begin(
int speciesId, ConstMoleculeIterator& iterator)
const;
454 std::string pairStyle()
const;
466 std::string bondStyle()
const;
478 std::string angleStyle()
const;
490 std::string dihedralStyle()
const;
502 std::string coulombStyle()
const;
514 std::string externalStyle()
const;
526 std::string specialStyle()
const;
538 std::string linkStyle()
const;
550 TetherFactory& tetherFactory();
555 std::string tetherStyle()
const;
560 TetherMaster& tetherMaster()
const;
576 void setExpectPerturbation();
581 bool expectPerturbation()
const;
586 bool hasPerturbation()
const;
597 bool hasReplicaMove()
const;
606 #endif // MCMD_PERTURB 648 virtual bool isValid()
const;
662 virtual ConfigIo* newDefaultConfigIo();
686 void readPerturbation(std::istream& in);
708 void readReplicaMove(std::istream& in);
724 #endif // MCMD_PERTURB 738 void allocateMoleculeSets();
751 void readFileMaster(std::istream& in);
772 void readPotentialStyles(std::istream& in);
793 void readEnsembles(std::istream& in);
815 void readLinkMaster(std::istream& in);
838 void readTetherMaster(std::istream& in);
853 #endif // SIMP_TETHER 874 TetherMaster* tetherMasterPtr_;
928 TetherFactory* tetherFactoryPtr_;
956 bool hasReplicaMove_;
959 #endif // MCMD_PERTURB 961 std::string pairStyle_;
966 std::string bondStyle_;
971 std::string angleStyle_;
976 std::string dihedralStyle_;
981 std::string coulombStyle_;
986 std::string externalStyle_;
991 std::string specialStyle_;
996 std::string linkStyle_;
1001 std::string tetherStyle_;
1012 bool createdFileMaster_;
1015 bool expectPerturbationParam_;
1019 bool createdPerturbation_;
1022 bool createdPerturbationFactory_;
1025 bool createdReplicaMove_;
1027 #endif // ifdef UTIL_MPI 1028 #endif // ifdef MCMD_PERTURB 1031 std::set<MoleculeSetObserver*> observers_;
1034 void notifyMoleculeSetObservers()
const;
1039 friend class ::SystemTest;
1049 inline int System::id()
const 1057 assert(simulationPtr_);
1058 return *simulationPtr_;
1066 assert(boundaryPtr_);
1067 return *boundaryPtr_;
1076 assert(linkMasterPtr_);
1077 return *linkMasterPtr_;
1085 inline TetherMaster& System::tetherMaster()
const 1087 assert(tetherMasterPtr_);
1088 return *tetherMasterPtr_;
1097 assert(energyEnsemblePtr_);
1098 return *energyEnsemblePtr_;
1106 assert(boundaryEnsemblePtr_);
1107 return *boundaryEnsemblePtr_;
1115 assert(fileMasterPtr_);
1116 return *fileMasterPtr_;
1122 inline bool System::isCopy()
const 1128 inline int System::nMolecule(
int speciesId)
const 1130 assert(moleculeSetsPtr_);
1131 return (*moleculeSetsPtr_)[speciesId].size();
1137 inline Molecule& System::molecule(
int speciesId,
int moleculeId)
1139 assert(moleculeSetsPtr_);
1140 return (*moleculeSetsPtr_)[speciesId][moleculeId];
1149 assert(moleculeSetsPtr_);
1150 (*moleculeSetsPtr_)[speciesId].begin(iterator);
1159 assert(moleculeSetsPtr_);
1160 (*moleculeSetsPtr_)[speciesId].begin(iterator);
1167 inline bool System::expectPerturbation()
const 1168 {
return expectPerturbationParam_; }
1174 {
return *perturbationFactoryPtr_; }
1179 inline bool System::hasPerturbation()
const 1180 {
return perturbationPtr_; }
1187 assert(perturbationPtr_);
1188 return *perturbationPtr_;
1195 inline bool System::hasReplicaMove()
const 1196 {
return replicaMovePtr_; }
1203 assert(replicaMovePtr_);
1204 return *replicaMovePtr_;
1207 #endif // MCMD_PERTURB 1213 { observers_.insert(&observer); }
1219 { observers_.erase(&observer); }
1224 inline void System::notifyMoleculeSetObservers()
const 1226 std::set<MoleculeSetObserver*>::iterator itr;
1228 for ( itr = observers_.begin();
1229 itr != observers_.end(); itr++ )
1230 (*itr)->notifyMoleculeSetChanged();
PArrayIterator< Molecule > MoleculeIterator
Iterator for a MoleculeSet.
Replica exchange Monte Carlo move using Gibbs sampling.
Interface for a Angle Interaction.
An interface to a System.
An orthorhombic periodic unit cell.
ArraySet< Molecule > MoleculeSet
A set of molecules of one Species in a System.
Statistical ensemble for changes in the periodic unit cell size.
Factory for subclasses MdPairPotential or McPairPotential.
A set of interacting Molecules enclosed by a Boundary.
Forward iterator for a PArray.
File containing preprocessor macros for error handling.
Classes used by all simpatico molecular simulations.
The main object in a simulation, which coordinates others.
Interface for a Dihedral Potential.
Saving / output archive for binary ostream.
A statistical ensemble for energy.
Abstract External Potential class.
A container for pointers to a subset of elements of an associated array.
Utility classes for scientific computation.
Trajectory file reader (base class).
Forward iterator for a PArray.
Model of parameter dependence in a free energy perturbation theory.
Factory for CoulombPotential objects.
Manages all Link objects in a System.
A FileMaster manages input and output files for a simulation.
Dynamically allocatable contiguous array template.
Saving archive for binary istream.
ConstPArrayIterator< Molecule > ConstMoleculeIterator
Const Iterator for a MoleculeSet.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Factory for specialized subclasses of SpecialPotential.
Abstract Bond Potential class.
A physical molecule (a set of covalently bonded Atoms).
An object that can read multiple parameters from file.
System configuration file reader and writer.
virtual Factory< Perturbation > * newDefaultPerturbationFactory()
Return a pointer to the default perturbation Factory.