Simpatico  v1.10
SystemMove.h
1 #ifndef MCMD_SYSTEM_MOVE_H
2 #define MCMD_SYSTEM_MOVE_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/mcMoves/McMove.h> // base class
12 #include <simp/ensembles/EnergyEnsemble.h> // inline function
13 #include <simp/boundary/Boundary.h> // typedef
14 
15 namespace McMd
16 {
17 
18  using namespace Util;
19  using namespace Simp;
20 
21  class McSystem;
22 
28  class SystemMove : public McMove
29  {
30 
31  public:
32 
38  SystemMove(McSystem& system);
39 
43  virtual ~SystemMove();
44 
45  protected:
46 
48  McSystem& system();
49 
51  Boundary& boundary();
52 
54  EnergyEnsemble& energyEnsemble();
55 
62  double boltzmann(double energy);
63 
64  private:
65 
67  McSystem *systemPtr_;
68 
70  Boundary *boundaryPtr_;
71 
73  EnergyEnsemble* isothermalPtr_;
74 
75  };
76 
77  // Inline methods
78 
79  /*
80  * Get parent McSystem.
81  */
83  { return *systemPtr_; }
84 
85  /*
86  * Get Boundary object of parent McSystem.
87  */
89  { return *boundaryPtr_; }
90 
91  /*
92  * Get EnergyEnsemble object of parent McSystem.
93  */
95  { return *isothermalPtr_; }
96 
97  /*
98  * Boltzmann weight associated with an energy difference.
99  */
100  inline double SystemMove::boltzmann(double energy)
101  { return exp(-isothermalPtr_->beta()*energy); }
102 
103 }
104 #endif
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
An orthorhombic periodic unit cell.
McMove is an abstract base class for Monte Carlo moves.
Definition: McMove.h:31
Classes used by all simpatico molecular simulations.
double boltzmann(double energy)
Boltzmann weight associated with an energy difference.
Definition: SystemMove.h:100
A statistical ensemble for energy.
McSystem & system()
Get parent McSystem.
Definition: SystemMove.h:82
Utility classes for scientific computation.
Definition: accumulators.mod:1
An McMove that acts on one McSystem.
Definition: SystemMove.h:28
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
EnergyEnsemble & energyEnsemble()
Get EnergyEnsemble object of parent McSystem.
Definition: SystemMove.h:94
Boundary & boundary()
Get Boundary object of parent McSystem.
Definition: SystemMove.h:88