1 #ifndef DDMD_POTENTIAL_H 2 #define DDMD_POTENTIAL_H 4 #include <util/param/ParamComposite.h> 5 #include <util/misc/Setable.h> 6 #include <util/space/Tensor.h> 48 void setReverseUpdateFlag(
bool reverseUpdateFlag);
53 bool reverseUpdateFlag()
const;
61 virtual void computeForces() = 0;
71 virtual void computeEnergy(MPI::Intracomm& communicator) = 0;
73 virtual void computeEnergy() = 0;
82 double energy()
const;
94 bool isEnergySet()
const;
106 virtual void computeStress()
118 virtual void computeForcesAndStress(MPI::Intracomm& communicator);
120 virtual void computeForcesAndStress();
137 double pressure()
const;
149 bool isStressSet()
const;
160 virtual bool isValid(MPI::Intracomm& communicator)
const;
170 void setEnergy(
double energy);
175 void setStress(
const Tensor& stress);
184 void incrementPairStress(
const Vector& f,
const Vector& dr,
196 void reduceEnergy(
double localEnergy, MPI::Intracomm& communicator);
210 void reduceStress(
Tensor& localStress, MPI::Intracomm& communicator);
224 bool reverseUpdateFlag_;
229 {
return reverseUpdateFlag_; }
241 stress(i, j) += f[i]*dr[j];
const int Dimension
Dimensionality of space.
A Vector is a Cartesian vector.
Template for a value that can be set or declared null (i.e., unknown).
virtual void computeStress(MPI::Intracomm &communicator)
Compute stress on all processors.
Parallel domain decomposition (DD) MD simulation.
A Tensor represents a Cartesian tensor.
A Potential represents a potential energy contribution.
Utility classes for scientific computation.
void incrementPairStress(const Vector &f, const Vector &dr, Tensor &stress) const
Add a pair contribution to the stress tensor.
bool reverseUpdateFlag() const
Get flag to identify if reverse communication is enabled.
An object that can read multiple parameters from file.