Simpatico  v1.10
McEnergyPerturbation.h
1 #ifdef MCMD_PERTURB
2 #ifndef MCMD_MC_ENERGY_PERTURBATION_H
3 #define MCMD_MC_ENERGY_PERTURBATION_H
4 
5 /*
6 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
7 *
8 * Copyright 2010 - 2017, The Regents of the University of Minnesota
9 * Distributed under the terms of the GNU General Public License.
10 */
11 
12 #include <mcMd/perturb/LinearPerturbation.h>
13 
14 namespace McMd
15 {
16 
17  class McSystem;
18 
27  class McEnergyPerturbation : public LinearPerturbation<McSystem>
28  {
29 
30  public:
31 
35  McEnergyPerturbation(McSystem& system, int size, int rank);
36 
42  virtual void readParameters(std::istream& in);
43 
47  virtual void setParameter();
48 
55  virtual double parameter(int i) const;
56 
67  virtual double derivative(int i) const;
68 
69  private:
70 
71  /*
72  Number of perturbation parameters associated with a System.
73  nParameters = 1 for McEnergyPerturbation.
74  */
75  int nParameters_;
76 
77  };
78 
79 }
80 #endif // ifndef ENERGY_PERTURBATION_H
81 #endif // ifdef MCMD_PERTURB
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
virtual void readParameters(std::istream &in)
Read beta parameter (inverse temperature) from file.
McEnergyPerturbation(McSystem &system, int size, int rank)
Constructor.
A Perturbation that is a linear function of a parameter.
virtual double parameter(int i) const
Get inverse temperature of the parent system.
A Perturbation with a variable inverse temperature.
virtual double derivative(int i) const
Get derivative of the Boltzmann weight with respect to the perturbation parameter.
McSystem & system() const
Get the associated System by reference.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
virtual void setParameter()
Set inverse temperature of the parent system.