1 #ifndef MCMD_SPECIES_MUTATOR_H 2 #define MCMD_SPECIES_MUTATOR_H 11 #include <util/containers/DArray.h> 12 #include <util/param/Label.h> 13 #include <mcMd/chemistry/Molecule.h> 67 virtual void readMoleculeState(std::istream& in,
Molecule& molecule);
76 void writeMoleculeState(std::ostream& out,
const Molecule& molecule)
const;
89 virtual void setMoleculeState(
Molecule& molecule,
int stateId) = 0;
97 void setWeight(
int stateId,
double weight);
107 int moleculeStateId(
const Molecule& molecule)
const;
119 int stateOccupancy(
int stateId)
const;
126 double stateWeight(
int stateId)
const;
133 static const int NullStateId = -1;
143 void allocateSpeciesMutator(
int nMolecule,
int nState);
156 void setMoleculeStateId(
const Molecule& molecule,
int stateId);
202 {
return moleculeStateIds_[molecule.
id()]; }
209 {
return stateOccupancies_[stateId]; }
223 {
return stateWeights_[stateId]; }
230 { stateWeights_[stateId] = weight; }
int nState() const
Get the number of possible molecule states.
double stateWeight(int stateId) const
Get the statistical weight for a specfic molecular state.
void setWeight(int stateId, double weight)
Set the statistical weight associated with a specific state.
int moleculeStateId(const Molecule &molecule) const
Get the state id for a specific molecule.
int id() const
Get the index for this Molecule (unique in species).
Mix-in class for mutable subclasses of Species.
Utility classes for scientific computation.
int stateOccupancy(int stateId) const
Get the number of molecules with a specified state.
A label string in a file format.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A physical molecule (a set of covalently bonded Atoms).