Simpatico  v1.10
mcMd/potentials/bond/BondPotential.h
1 #ifndef MCMD_BOND_POTENTIAL_H
2 #define MCMD_BOND_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> // base class
12 #include <mcMd/potentials/misc/EnergyCalculator.h> // base class
13 #include <mcMd/potentials/misc/StressCalculator.h> // base class
14 
15 #include <string>
16 
17 namespace Util
18 {
19  class Vector;
20  class Tensor;
21  class Random;
22 }
23 
24 namespace McMd
25 {
26 
27  using namespace Util;
28 
29  class Atom;
30 
36  class BondPotential : public ParamComposite,
37  public EnergyCalculator, public StressCalculator
38  {
39 
40  public:
41 
45  BondPotential();
46 
50  virtual ~BondPotential();
51 
53 
54 
61  virtual double energy(double rSq, int type) const = 0;
62 
72  virtual double forceOverR(double rSq, int type) const = 0;
73 
87  virtual
88  double randomBondLength(Util::Random* random, double beta, int type)
89  const = 0;
90 
98  virtual void set(std::string name, int type, double value) = 0;
99 
106  virtual double get(std::string name, int type) const = 0;
107 
111  virtual std::string interactionClassName() const = 0;
112 
114 
116 
120  virtual void addForces() = 0;
121 
128  virtual double atomEnergy(const Atom& atom) const = 0;
129 
130  // Prevent hiding of inherited function energy();
131  using EnergyCalculator::energy;
132 
134 
135  };
136 
137 }
138 #endif
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).
Abstract Bond Potential class.
Random number generator.
Definition: Random.h:46
An object that can read multiple parameters from file.
Interface for a stress calculator.