Simpatico  v1.10
mcMd/potentials/angle/AnglePotential.h
1 #ifndef MCMD_ANGLE_POTENTIAL_H
2 #define MCMD_ANGLE_POTENTIAL_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <util/param/ParamComposite.h>
12 #include <mcMd/potentials/misc/EnergyCalculator.h> // base class
13 #include <mcMd/potentials/misc/StressCalculator.h> // base class
14 
15 #include <util/random/Random.h>
16 #include <string>
17 
18 namespace Util
19 {
20  class Vector;
21  class Tensor;
22 }
23 
24 namespace McMd
25 {
26 
27  using namespace Util;
28 
29  class Atom;
30 
37  public EnergyCalculator, public StressCalculator
38 
39  {
40 
41  public:
42 
47 
51  virtual ~AnglePotential();
52 
54 
55 
62  virtual double energy(double cosTheta, int type) const = 0;
63 
74  virtual void force(const Vector& R1, const Vector& R2,
75  Vector& F1, Vector& F2, int type) const = 0;
76 
90  virtual
91  double randomAngle(Util::Random* random, double beta, int type)
92  const = 0;
93 
107  virtual
108  double randomCosineAngle(Util::Random* random, double beta, int type)
109  const = 0;
110 
118  virtual void set(std::string name, int type, double value) = 0;
119 
126  virtual double get(std::string name, int type) const = 0;
127 
131  virtual std::string interactionClassName() const = 0;
132 
134 
136 
140  virtual void addForces() = 0;
141 
152  virtual double atomEnergy(const Atom& atom) const
153  {
154  UTIL_THROW("Unimplemented method");
155  return 0.0; // Never reached, but avoids compiler warning.
156  }
157 
158  // Prevent hiding of inherited function energy();
159  using EnergyCalculator::energy;
160 
162 
163  };
164 
165 }
166 #endif
A Vector is a Cartesian vector.
Definition: Vector.h:75
Interface for a Angle Interaction.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Definition: global.h:51
virtual double atomEnergy(const Atom &atom) const
Calculate the covalent angle energy for one Atom.
Interface for a class that calculates a total energy.
A point particle within a Molecule.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Random number generator.
Definition: Random.h:46
An object that can read multiple parameters from file.
Interface for a stress calculator.