10 #include "Simulation.h" 11 #include <mcMd/configIos/ConfigIo.h> 12 #include <mcMd/configIos/McConfigIo.h> 13 #include <mcMd/configIos/ConfigIoFactory.h> 14 #include <mcMd/trajectory/TrajectoryReader.h> 15 #include <mcMd/trajectory/TrajectoryReaderFactory.h> 16 #include <mcMd/species/SpeciesMutator.h> 19 #include <mcMd/potentials/pair/PairFactory.h> 22 #include <mcMd/potentials/bond/BondFactory.h> 25 #include <mcMd/potentials/angle/AngleFactory.h> 28 #include <mcMd/potentials/dihedral/DihedralFactory.h> 31 #include <mcMd/potentials/coulomb/CoulombFactory.h> 34 #include <mcMd/potentials/external/ExternalFactory.h> 37 #include <mcMd/potentials/special/SpecialFactory.h> 40 #include <mcMd/potentials/link/LinkFactory.h> 41 #include <mcMd/links/LinkMaster.h> 44 #include <mcMd/potentials/tether/tetherFactory.h> 45 #include <mcMd/tethers/TetherMaster.h> 48 #include <mcMd/perturb/Perturbation.h> 50 #include <mcMd/perturb/ReplicaMove.h> 52 #endif // MCMD_PERTURB 55 #include <simp/species/Species.h> 56 #include <simp/ensembles/EnergyEnsemble.h> 57 #include <simp/ensembles/BoundaryEnsemble.h> 60 #include <util/misc/FileMaster.h> 61 #include <util/param/Factory.h> 62 #include <util/archives/Serializable_includes.h> 63 #include <util/archives/serialize.h> 79 : moleculeSetsPtr_(0),
88 energyEnsemblePtr_(0),
89 boundaryEnsemblePtr_(0),
100 dihedralFactoryPtr_(0),
103 coulombFactoryPtr_(0),
106 externalFactoryPtr_(0),
109 specialFactoryPtr_(0),
115 tetherFactoryPtr_(0),
118 configIoFactoryPtr_(0),
119 trajectoryReaderFactoryPtr_(0),
123 perturbationFactoryPtr_(0),
126 hasReplicaMove_(false),
158 createdFileMaster_(false)
160 , expectPerturbationParam_(false)
161 , createdPerturbation_(false)
162 , createdPerturbationFactory_(false)
164 , createdReplicaMove_(false)
179 moleculeSetsPtr_(other.moleculeSetsPtr_),
180 boundaryPtr_(other.boundaryPtr_),
182 linkMasterPtr_(other.linkMasterPtr_),
185 tetherMasterPtr_(other.tetherMasterPtr_),
187 simulationPtr_(other.simulationPtr_),
188 energyEnsemblePtr_(other.energyEnsemblePtr_),
189 boundaryEnsemblePtr_(other.boundaryEnsemblePtr_),
191 pairFactoryPtr_(other.pairFactoryPtr_),
194 bondFactoryPtr_(other.bondFactoryPtr_),
197 angleFactoryPtr_(other.angleFactoryPtr_),
200 dihedralFactoryPtr_(other.dihedralFactoryPtr_),
203 coulombFactoryPtr_(other.coulombFactoryPtr_),
206 externalFactoryPtr_(other.externalFactoryPtr_),
209 specialFactoryPtr_(other.specialFactoryPtr_),
212 linkFactoryPtr_(other.linkFactoryPtr_),
215 tetherFactoryPtr_(other.tetherFactoryPtr_),
217 configIoPtr_(other.configIoPtr_),
218 configIoFactoryPtr_(other.configIoFactoryPtr_),
219 trajectoryReaderFactoryPtr_(other.trajectoryReaderFactoryPtr_),
220 fileMasterPtr_(other.fileMasterPtr_),
223 perturbationFactoryPtr_(0),
226 hasReplicaMove_(false),
230 pairStyle_(other.pairStyle_),
233 bondStyle_(other.bondStyle_),
236 angleStyle_(other.angleStyle_),
239 dihedralStyle_(other.dihedralStyle_),
242 coulombStyle_(other.coulombStyle_),
245 externalStyle_(other.externalStyle_),
248 specialStyle_(other.specialStyle_),
251 linkStyle_(other.linkStyle_),
254 tetherStyle_(other.tetherStyle_),
258 createdFileMaster_(false)
260 , expectPerturbationParam_(false)
261 , createdPerturbation_(false)
262 , createdPerturbationFactory_(false)
264 , createdReplicaMove_(false)
275 if (moleculeSetsPtr_) {
276 delete moleculeSetsPtr_;
282 if (pairFactoryPtr_) {
283 delete pairFactoryPtr_;
287 if (bondFactoryPtr_) {
288 delete bondFactoryPtr_;
292 if (angleFactoryPtr_) {
293 delete angleFactoryPtr_;
297 if (dihedralFactoryPtr_) {
298 delete dihedralFactoryPtr_;
302 if (coulombFactoryPtr_) {
303 delete coulombFactoryPtr_;
307 if (externalFactoryPtr_) {
308 delete externalFactoryPtr_;
312 if (specialFactoryPtr_) {
313 delete specialFactoryPtr_;
317 if (linkFactoryPtr_) {
318 delete linkFactoryPtr_;
322 if (tetherMasterPtr_) {
323 delete tetherMasterPtr_;
325 if (tetherFactoryPtr_) {
326 delete tetherFactoryPtr_;
331 if (perturbationPtr_ && createdPerturbation_) {
332 delete perturbationPtr_;
334 if (perturbationFactoryPtr_ && createdPerturbationFactory_) {
335 delete perturbationFactoryPtr_;
338 if (replicaMovePtr_ && createdReplicaMove_) {
339 delete replicaMovePtr_;
342 #endif // MCMD_PERTURB 344 if (energyEnsemblePtr_) {
345 delete energyEnsemblePtr_;
347 if (boundaryEnsemblePtr_) {
348 delete boundaryEnsemblePtr_;
353 if (configIoFactoryPtr_) {
354 delete configIoFactoryPtr_;
356 if (trajectoryReaderFactoryPtr_) {
357 delete trajectoryReaderFactoryPtr_;
359 if (fileMasterPtr_ && createdFileMaster_) {
360 delete fileMasterPtr_;
380 readTetherMaster(in);
400 loadTetherMaster(ar);
418 saveTetherMaster(ar);
430 if (!fileMasterPtr_) {
432 createdFileMaster_ =
true;
448 if (!fileMasterPtr_) {
450 createdFileMaster_ =
true;
465 if (createdFileMaster_) {
466 fileMasterPtr_->
save(ar);
477 read<std::string>(in,
"pairStyle", pairStyle_);
481 read<std::string>(in,
"bondStyle", bondStyle_);
486 read<std::string>(in,
"angleStyle", angleStyle_);
491 read<std::string>(in,
"dihedralStyle", dihedralStyle_);
496 read<std::string>(in,
"coulombStyle", coulombStyle_);
501 read<std::string>(in,
"externalStyle", externalStyle_);
506 read<std::string>(in,
"specialStyle", specialStyle_);
511 read<std::string>(in,
"linkStyle", linkStyle_);
516 read<std::string>(in,
"tetherStyle", tetherStyle_);
528 loadParameter<std::string>(ar,
"pairStyle", pairStyle_);
532 loadParameter<std::string>(ar,
"bondStyle", bondStyle_);
537 loadParameter<std::string>(ar,
"angleStyle", angleStyle_);
542 loadParameter<std::string>(ar,
"dihedralStyle", dihedralStyle_);
547 loadParameter<std::string>(ar,
"coulombStyle", coulombStyle_);
552 loadParameter<std::string>(ar,
"externalStyle", externalStyle_);
557 loadParameter<std::string>(ar,
"specialStyle", specialStyle_);
562 loadParameter<std::string>(ar,
"linkStyle", linkStyle_);
567 loadParameter<std::string>(ar,
"tetherStyle", tetherStyle_);
593 ar << dihedralStyle_;
603 ar << externalStyle_;
649 energyEnsemblePtr_->
save(ar);
650 boundaryEnsemblePtr_->
save(ar);
673 linkMasterPtr_->
save(ar);
679 void System::readTetherMaster(std::istream &in)
682 tetherMasterPtr_ =
new TetherMaster();
690 tetherMasterPtr_ =
new TetherMaster();
698 tetherMasterPtr_->save(ar);
711 bool isMutable =
false;
714 int iSpeciesIn, nMoleculeIn;
717 for (
int iSpecies = 0; iSpecies < nSpecies; ++iSpecies) {
719 if (
simulation().species(iSpecies).isMutable()) {
724 if (iSpeciesIn != iSpecies) {
728 for (
int iMol = 0; iMol < nMoleculeIn; ++iMol) {
731 if (molPtr != &
molecule(iSpecies, iMol)) {
738 molPtr->
begin(atomIter);
739 for ( ; atomIter.
notEnd(); ++atomIter) {
740 ar >> atomIter->position();
741 ar >> atomIter->velocity();
743 ar >> atomIter->shift();
761 bool isMutable =
false;
767 for (
int iSpecies = 0; iSpecies < nSpecies; ++iSpecies) {
769 if (
simulation().species(iSpecies).isMutable()) {
776 begin(iSpecies, molIter);
777 for ( ; molIter.
notEnd(); ++molIter) {
782 molIter->begin(atomIter);
783 for ( ; atomIter.
notEnd(); ++atomIter) {
789 ar << atomIter->position();
790 ar << atomIter->velocity();
792 ar << atomIter->shift();
812 if (configIoPtr_ == 0) {
815 configIoPtr_->
read(in);
838 if (configIoPtr_ == 0) {
841 configIoPtr_->
write(out);
874 assert(!simulationPtr_);
883 assert(!fileMasterPtr_);
894 if (!configIoFactoryPtr_) {
897 return *configIoFactoryPtr_;
911 if (!configIoFactoryPtr_) {
916 UTIL_THROW(
"Unrecognized ConfigIo subclass name");
931 if (!trajectoryReaderFactoryPtr_) {
934 return *trajectoryReaderFactoryPtr_;
957 createdPerturbationFactory_ =
true;
959 expectPerturbationParam_ =
true;
990 perturbationFactoryPtr_->
readObject(in, *
this, className, isEnd);
991 if (!perturbationPtr_) {
992 std::string msg =
"Unrecognized Perturbation subclass name ";
996 createdPerturbation_ =
true;
1006 bool savedPerturbation;
1007 ar >> savedPerturbation;
1008 if (savedPerturbation) {
1015 perturbationFactoryPtr_->
loadObject(ar, *
this, className);
1016 if (!perturbationPtr_) {
1017 std::string msg =
"Unrecognized Perturbation subclass name ";
1021 createdPerturbation_ =
true;
1032 ar << savingPerturbation;
1033 if (savingPerturbation) {
1036 perturbationPtr_->
save(ar);
1047 read<bool>(in,
"hasReplicaMove", hasReplicaMove_);
1048 if (hasReplicaMove_) {
1052 createdReplicaMove_ =
true;
1054 hasReplicaMove_ =
false;
1064 loadParameter<bool>(ar,
"hasReplicaMove", hasReplicaMove_);
1065 if (hasReplicaMove_) {
1069 createdReplicaMove_ =
true;
1071 hasReplicaMove_ =
false;
1081 ar & hasReplicaMove_;
1082 if (hasReplicaMove_) {
1083 replicaMovePtr_->
save(ar);
1088 #endif // MCMD_PERTURB 1096 assert(simulationPtr_);
1100 moleculeSetsPtr_->allocate(nSpecies);
1103 for (
int i=0; i < nSpecies; ++i) {
1113 assert(moleculeSetsPtr_);
1115 int speciesId = molecule.
species().
id();
1116 if ( speciesId >= moleculeSetsPtr_->capacity()) {
1117 UTIL_THROW(
"Error: speciesId >= moleculeSetsPtr_->capacity()");
1119 (*moleculeSetsPtr_)[speciesId].append(molecule);
1123 notifyMoleculeSetObservers();
1131 assert(moleculeSetsPtr_);
1133 if ( &molecule.
system() !=
this) {
1134 UTIL_THROW(
"Attempt to remove Molecule that is not in this System.");
1136 int speciesId = molecule.
species().
id();
1137 (*moleculeSetsPtr_)[speciesId].remove(molecule);
1141 notifyMoleculeSetObservers();
1168 for (iSpecies = 0; iSpecies < nSpecies; ++iSpecies) {
1171 molPtr = &
molecule(iSpecies, nMol - 1);
1183 notifyMoleculeSetObservers();
1191 assert(moleculeSetsPtr_);
1193 int speciesId = molecule.
species().
id();
1194 return (*moleculeSetsPtr_)[speciesId].index(molecule);
1205 Log::file() <<
"Number of molecules in species " << speciesId
1206 <<
" = " << nMol << std::endl;
1207 UTIL_THROW(
"Number of molecules in species <= 0");
1210 return molecule(speciesId, moleculeId);
1231 if (!pairFactoryPtr_) {
1234 assert(pairFactoryPtr_);
1235 return *pairFactoryPtr_;
1242 {
return pairStyle_; }
1251 if (!bondFactoryPtr_) {
1254 assert(bondFactoryPtr_);
1255 return *bondFactoryPtr_;
1262 {
return bondStyle_; }
1271 if (angleFactoryPtr_ == 0) {
1274 assert(angleFactoryPtr_);
1275 return *angleFactoryPtr_;
1282 {
return angleStyle_; }
1285 #ifdef SIMP_DIHEDRAL 1291 if (dihedralFactoryPtr_ == 0) {
1294 assert(dihedralFactoryPtr_);
1295 return *dihedralFactoryPtr_;
1302 {
return dihedralStyle_; }
1311 if (coulombFactoryPtr_ == 0) {
1314 assert(coulombFactoryPtr_);
1315 return *coulombFactoryPtr_;
1322 {
return coulombStyle_; }
1325 #ifdef SIMP_EXTERNAL 1331 if (externalFactoryPtr_ == 0) {
1334 assert(externalFactoryPtr_);
1335 return *externalFactoryPtr_;
1342 {
return externalStyle_; }
1348 if (specialFactoryPtr_ == 0) {
1351 assert(specialFactoryPtr_);
1352 return *specialFactoryPtr_;
1358 std::string System::specialStyle()
const 1359 {
return specialStyle_; }
1368 if (linkFactoryPtr_ == 0) {
1371 assert(linkFactoryPtr_);
1372 return *linkFactoryPtr_;
1379 {
return linkStyle_; }
1386 TetherFactory& System::tetherFactory()
1388 if (tetherFactoryPtr_ == 0) {
1389 tetherFactoryPtr_ =
new TetherFactory;
1391 assert(tetherFactoryPtr_);
1392 return *tetherFactoryPtr_;
1398 std::string System::tetherStyle()
const 1399 {
return tetherStyle_; }
1408 int iSpecies, iMolecule;
1409 if (!simulationPtr_) {
1412 if (!moleculeSetsPtr_) {
1415 for (iSpecies =0; iSpecies < simulationPtr_->
nSpecies(); ++iSpecies) {
1416 (*moleculeSetsPtr_)[iSpecies].isValid();
1417 for (iMolecule = 0; iMolecule <
nMolecule(iSpecies); ++iMolecule) {
1418 molPtr = &(*moleculeSetsPtr_)[iSpecies][iMolecule];
1419 if (&molPtr->
system() !=
this) {
1420 UTIL_THROW(
"Error in pointer to System in a Molecule");
1427 if (!linkMasterPtr_) {
1436 if (!tetherMasterPtr_) {
1439 tetherMasterPtr_->isValid();
void saveFileMaster(Serializable::OArchive &ar)
If necessary, save FileMaster to archive.
bool isEmpty() const
Is this an empty System (i.e., one with no molecules) ?
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
CoulombFactory & coulombFactory()
Get the associated Coulomb Factory by reference.
Replica exchange Monte Carlo move using Gibbs sampling.
bool isCopy() const
Was this System instantiated with the copy constructor?
FileMaster & fileMaster() const
Get the associated FileMaster by reference.
void begin(int speciesId, MoleculeIterator &iterator)
Initialize an iterator for molecules of one species in this System.
int nAtom() const
Get number of atoms per molecule for this Species.
void loadFileMaster(Serializable::IArchive &ar)
Load FileMaster data from archive, if necessary.
int nAtom() const
Return the total number of atoms in this System.
Factory for subclasses of DihedralPotential.
void setExpectPerturbation()
Set to expect a Perturbation in the parameter file.
bool notEnd() const
Is the current pointer not at the end of the array?
void saveConfig(Serializable::OArchive &ar)
Save configuration.
virtual Factory< ConfigIo > * newDefaultConfigIoFactory()
Return a pointer to a new default ConfigIoFactory.
void loadPerturbation(Serializable::IArchive &ar)
Load the perturbation parameter block (if any)
virtual ConfigIo * newDefaultConfigIo()
Return a pointer to a new default ConfigIo.
Factory for subclasses of MdBondPotential or McBondPotential.
Data * readObject(std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
Read a class name, instantiate an object, and read its parameters.
Statistical ensemble for changes in the periodic unit cell size.
void openOutputFile(const std::string &filename, std::ofstream &out, std::ios_base::openmode mode=std::ios_base::out) const
Open an output file.
void loadParamComposite(Serializable::IArchive &ar, ParamComposite &child, bool next=true)
Add and load a required child ParamComposite.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
void saveLinkMaster(Serializable::OArchive &ar)
Save the LinkMaster.
void readReplicaMove(std::istream &in)
Read the ReplicaMove parameter block (if any)
virtual void write(std::ostream &out)=0
Write configuration (particle positions) to file.
Species & species() const
Get the molecular Species by reference.
Factory< AnglePotential > & angleFactory()
Get the associated AngleFactory by reference.
Factory for subclasses MdPairPotential or McPairPotential.
void begin(AtomIterator &iterator)
Set an Molecule::AtomIterator to first Atom in this Molecule.
void setConfigIo(std::string &classname)
Create a new configuration file reader/writer.
A set of interacting Molecules enclosed by a Boundary.
void openInputFile(const std::string &filename, std::ifstream &in, std::ios_base::openmode mode=std::ios_base::in) const
Open an input file.
void allocateMoleculeSet(Util::ArraySet< Molecule > &set, int speciesId) const
Allocate and initialize a molecule set for one Species.
bool hasPerturbation() const
Does this system have an associated Perturbation?
void readEnsembles(std::istream &in)
Read energy and boundary ensemble parameters.
int moleculeStateId(const Molecule &molecule) const
Get the state id for a specific molecule.
Classes used by all simpatico molecular simulations.
void setFileMaster(FileMaster &filemaster)
Set the FileMaster.
Molecule & getMolecule(int speciesId)
Get a new molecule from a reservoir of unused Molecule objects.
std::string linkStyle() const
Return link potential style string.
The main object in a simulation, which coordinates others.
void allocateMoleculeSets()
Allocate and initialize molecule sets for all species.
std::string dihedralStyle() const
Return dihedral potential style string.
void returnMolecule(Molecule &molecule)
Return a molecule to a reservoir of unused molecules.
void savePotentialStyles(Serializable::OArchive &ar)
Save potential style strings.
Data * loadObject(Serializable::IArchive &ar, ParamComposite &parent, std::string &className)
Load a class name, instantiate an object, and load the object.
Saving / output archive for binary ostream.
virtual ~System()
Destructor.
void removeAllMolecules()
Remove all molecules from this System.
Molecule & molecule(int speciesId, int moleculeId)
Get a specific Molecule in this System, by integer index.
PairFactory & pairFactory()
Get the PairFactory by reference.
A statistical ensemble for energy.
virtual void loadConfig(Serializable::IArchive &ar)
Load configuration.
int nBondType() const
Get the number of bond types.
std::string bondStyle() const
Return covalent bond style string.
int nMolecule(int speciesId) const
Get the number of molecules of one Species in this System.
int hasCoulomb() const
Does a Coulomb potential exist?
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
std::string className() const
Get class name string.
Molecule & randomMolecule(int speciesId)
Get a random Molecule of a specified species in this System.
virtual void readParameters(std::istream &in)
Read parameter file.
Factory< BondPotential > & linkFactory()
Get the associated Link factory by reference.
Simulation & simulation() const
Get the parent Simulation by reference.
void addMolecule(Molecule &molecule)
Add a Molecule to this System.
void setId(int Id)
Set the integer Id for this System.
virtual void save(Serializable::OArchive &ar)
Saves all parameters to an archive.
std::string coulombStyle() const
Return coulomb potential style string.
Factory< BondPotential > & bondFactory()
Get the associated Factory<BondPotential> by reference.
OrthorhombicBoundary Boundary
Boundary is an alias for the periodic boundary condition class.
bool notEnd() const
Is the current pointer not at the end of the PArray?
Utility classes for scientific computation.
void clear()
Clear LinkMaster.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
void readLinkMaster(std::istream &in)
Read the LinkMaster parameters.
Default Factory for subclasses of TrajectoryReader.
long uniformInt(long range1, long range2)
Return random long int x uniformly distributed in range1 <= x < range2.
void shift(Vector &r) const
Shift Cartesian Vector r to its primary image.
System()
Default constructor.
int nLinkType() const
Get the number of link types.
Forward iterator for an Array or a C array.
virtual void setMoleculeState(Molecule &molecule, int stateId)=0
Change the state of a specific molecule.
Forward iterator for a PArray.
int nAngleType() const
Get the number of angle types.
void savePerturbation(Serializable::OArchive &ar)
Save the perturbation parameter block (if any)
Factory for CoulombPotential objects.
std::string externalStyle() const
Return external potential style string.
virtual void save(Serializable::OArchive &ar)
Save internal state to file.
Manages all Link objects in a System.
virtual void readConfig(std::istream &in)
Read system configuration from file.
Factory for subclasses MdExternalPotential or McExternalPotential.
int nDihedralType() const
Get the number of dihedral types.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
static std::ostream & file()
Get log ostream by reference.
bool hasIoCommunicator() const
Does this object have an associated MPI communicator?
A FileMaster manages input and output files for a simulation.
Factory< ConfigIo > & configIoFactory()
Get the configuration file reader/writer factory by reference.
Dynamically allocatable contiguous array template.
std::string pairStyle() const
Return nonbonded pair style string.
void loadLinkMaster(Serializable::IArchive &ar)
Load the LinkMaster.
void saveEnsembles(Serializable::OArchive &ar)
Save energy and boundary ensembles.
Boundary & boundary() const
Get the Boundary by reference.
int id() const
Get integer id of this Species.
Saving archive for binary istream.
Factory for BondPotential objects.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
int nSpecies() const
Get the number of Species in this Simulation.
void loadReplicaMove(Serializable::IArchive &ar)
Read the ReplicaMove parameter block (if any)
Factory for specialized subclasses of SpecialPotential.
void unsetSystem()
Set the parent System pointer to null (no System).
virtual bool isValid() const
Return true if valid, or throw Exception.
Default Factory for subclasses of ConfigIo.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
void saveReplicaMove(Serializable::OArchive &ar)
Save the ReplicaMove parameter block (if any)
bool isValid() const
Return true if this LinkMaster is valid, or throw an Exception.
int hasExternal() const
Does an external potential exist?
void readParamComposite(std::istream &in, ParamComposite &child, bool next=true)
Add and read a required child ParamComposite.
Factory< ExternalPotential > & externalFactory()
Get the associated ExternalPotential factory by reference.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
void readPerturbation(std::istream &in)
Read the perturbation parameter block (if any)
virtual void read(std::istream &in)=0
Read configuration (particle positions) from file.
virtual Data * factory(const std::string &className) const =0
Returns a pointer to a new instance of specified subclass.
void readFileMaster(std::istream &in)
Read FileMaster parameters, if none yet exists.
void readPotentialStyles(std::istream &in)
Read potential style parameter strings.
A physical molecule (a set of covalently bonded Atoms).
void removeMolecule(Molecule &molecule)
Remove a specific molecule from this System.
void setSystem(System &system)
Set the parent System.
Factory for subclasses of AnglePotential.
void saveParameters(Serializable::OArchive &ar)
Save internal state from an archive.
An object that can read multiple parameters from file.
Factory< DihedralPotential > & dihedralFactory()
Get the associated Dihedral Factory by reference.
McMd::SpeciesMutator & mutator()
Return the species mutator object by reference.
ConfigIo for MC simulations (no atom velocities).
void writeConfig(std::ostream &out)
Write system configuration to a specified ostream.
void loadEnsembles(Serializable::IArchive &ar)
Load energy and boundary ensembles from archive.
Species & species(int i)
Get a specific Species by reference.
System & system() const
Get the parent System.
void loadPotentialStyles(Serializable::IArchive &ar)
Load potential style strings from an archive.
std::string angleStyle() const
Return angle potential style string.
void setSimulation(Simulation &simulation)
Set the parent Simulation.
virtual Factory< TrajectoryReader > * newDefaultTrajectoryReaderFactory()
Return a pointer to a new default TrajectoryReaderFactory.
Factory< TrajectoryReader > & trajectoryReaderFactory()
Get the trajectory reader/writer factory by reference.
int moleculeId(const Molecule &molecule) const
Get the index of a Molecule within its Species in this System.
System configuration file reader and writer.
LinkMaster & linkMaster() const
Get the LinkMaster by reference.
int id() const
Get integer index for this System.
Random & random()
Get the random number generator by reference.
virtual Factory< Perturbation > * newDefaultPerturbationFactory()
Return a pointer to the default perturbation Factory.