Simpatico  v1.10
HarmonicCvBias.h
1 #ifndef MCMD_HARMONIC_CV_BIAS_H
2 #define MCMD_HARMONIC_CV_BIAS_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 <mcMd/colvars/CvBias.h>
12 
13 namespace McMd
14 {
15 
16  using namespace Util;
17 
28  class HarmonicCvBias : public CvBias
29  {
30 
31  public:
32 
37 
43  virtual ~HarmonicCvBias();
44 
50  virtual void readParameters(std::istream& in);
51 
57  virtual void loadParameters(Serializable::IArchive& ar);
58 
64  virtual void save(Serializable::OArchive& ar);
65 
73  virtual double value(double cv);
74 
82  virtual double derivative(double cv);
83 
84  private:
85 
86  // Central value of collective variable.
87  double cv0_;
88 
89  // Spring constant
90  double k_;
91 
92  };
93 
94 }
95 #endif
Harmonic function of a collective variable (CV).
Bias potential as a function of a collective variable (CV).
Definition: CvBias.h:26
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).