9 #include <ddMd/potentials/pair/PairPotential.h> 11 #include <ddMd/potentials/bond/BondPotential.h> 14 #include <ddMd/potentials/angle/AnglePotential.h> 17 #include <ddMd/potentials/dihedral/DihedralPotential.h> 19 #include <util/format/Int.h> 20 #include <util/format/Dbl.h> 21 #include <util/mpi/MpiLoader.h> 22 #include <util/misc/ioUtil.h> 46 isInitialized_ =
true;
56 loader.
load(nSample_);
57 isInitialized_ =
true;
88 double potential = 0.0;
109 potential += dihedral;
virtual void readParameters(std::istream &in)
Read dumpPrefix and interval.
Abstract base for periodic output and/or analysis actions.
Simulation & simulation()
Get the parent Simulation by reference.
const BondPotential & bondPotential() const
Get the PairPotential by const reference.
void saveInterval(Serializable::OArchive &ar)
Save interval parameter to an archive.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
double kineticEnergy()
Return precomputed total kinetic energy.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
LogEnergy(Simulation &simulation)
Constructor.
void readInterval(std::istream &in)
Read parameter interval from file.
Wrapper for a double precision number, for formatted ostream output.
int nBondType()
Get maximum number of bond types.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
Saving / output archive for binary ostream.
int nDihedralType()
Get maximum number of dihedral types.
const DihedralPotential & dihedralPotential() const
Get the DihedralPotential by const reference.
void computePotentialEnergies()
Calculate and store total potential energy on all processors.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
Utility classes for scientific computation.
void load(Data &value)
Load and broadcast a single Data value.
Wrapper for an int, for formatted ostream output.
virtual void clear()
Clear nSample counter.
bool isMaster() const
Is this the master processor (gridRank == 0) ?
const PairPotential & pairPotential() const
Get the PairPotential by const reference.
static std::ostream & file()
Get log ostream by reference.
double energy() const
Return the total potential, from all processors.
Saving archive for binary istream.
Provides methods for MPI-aware loading of data from input archive.
void setClassName(const char *className)
Set class name string.
void loadInterval(Serializable::IArchive &ar)
Load parameter interval from input archive.
const AnglePotential & anglePotential() const
Get the AnglePotential by const reference.
int nAngleType()
Get maximum number of angle types.
void computeKineticEnergy()
Compute total kinetic energy.
Domain & domain()
Get the Domain by reference.
virtual void sample(long iStep)
Dump configuration to file.