8 #include "AtomDisplaceMove.h" 9 #include <mcMd/mcSimulation/McSystem.h> 11 #include <mcMd/potentials/pair/McPairPotential.h> 13 #include <mcMd/chemistry/Molecule.h> 14 #include <mcMd/chemistry/Atom.h> 15 #include <simp/boundary/Boundary.h> 16 #include <util/space/Vector.h> 17 #include <util/space/Dimension.h> 41 read<int>(in,
"speciesId", speciesId_);
42 read<double>(in,
"delta", delta_);
51 loadParameter<int>(ar,
"speciesId", speciesId_);
52 loadParameter<double>(ar,
"delta", delta_);
71 double newEnergy, oldEnergy;
81 atomPtr = &molPtr->
atom(iAtom);
const int Dimension
Dimensionality of space.
A System for use in a Markov chain Monte Carlo simulation.
A Vector is a Cartesian vector.
void incrementNAttempt()
Increment the number of attempted moves.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
double atomPotentialEnergy(const Atom &atom) const
Calculate the total potential energy for one Atom.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
File containing preprocessor macros for error handling.
Classes used by all simpatico molecular simulations.
double uniform()
Return a random floating point number x, uniformly distributed in the range 0 <= x < 1...
Saving / output archive for binary ostream.
double boltzmann(double energy)
Boltzmann weight associated with an energy difference.
McSystem & system()
Get parent McSystem.
Molecule & randomMolecule(int speciesId)
Get a random Molecule of a specified species in this System.
void incrementNAccept()
Increment the number of accepted moves.
AtomDisplaceMove(McSystem &system)
Constructor.
A point particle within a Molecule.
Utility classes for scientific computation.
An McMove that acts on one McSystem.
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.
Random & random()
Get Random number generator of parent Simulation.
McPairPotential & pairPotential() const
Return the McPairPotential by reference.
virtual void readParameters(std::istream &in)
Read species to which displacement is applied.
Saving archive for binary istream.
virtual bool move()
Generate, attempt and accept or reject a move.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
void readProbability(std::istream &in)
Read the probability from file.
void setClassName(const char *className)
Set class name string.
const Atom & atom(int localId) const
Get a specific Atom in this Molecule.
bool metropolis(double ratio)
Metropolis algorithm for whether to accept a MC move.
A physical molecule (a set of covalently bonded Atoms).
const Vector & position() const
Get the position Vector by const reference.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
void updateAtomCell(Atom &atom)
Update the cell list to reflect a new position.
int nAtom() const
Get the number of Atoms in this Molecule.
Boundary & boundary()
Get Boundary object of parent McSystem.