Path Integral Quantum Monte Carlo
cmc.h
Go to the documentation of this file.
1 
9 #ifndef CMC_H
10 #define CMC_H
11 
12 #include "common.h"
13 #include "communicator.h"
14 #include "potential.h"
15 
16 // ========================================================================
17 // ClassicalMonteCarlo Class
18 // ========================================================================
27  public:
28  ClassicalMonteCarlo(PotentialBase *, PotentialBase *, MTRand &, const
29  Container *, Array <dVec,1> &);
31 
32  void run(uint32, bool);
33 
34  private:
35 
36  PotentialBase *externalPtr; // The external potential
37  PotentialBase *interactionPtr; // The interaction potential
38  MTRand &random; // A reference to the RNG
39  const Container *boxPtr; // A constant reference to the container class
40  Array <dVec,1> config; // The particle configurations
41 
42  double z; // The fugacity
43  double energy; // The total potential energy
44  double deltaV; // Change in potential energy
45  dVec sep; // A particle separation
46 
47 
48  int numParticles; // The current number of particles
49 
50  uint32 numMoveTotal; // Number of moves attempted
51  uint32 numMoveAccept; // Number of moves accepted
52 
53  uint32 numInsertTotal; // Number of inserts attempted
54  uint32 numInsertAccept; // Number of inserts accepted
55 
56  uint32 numDeleteTotal; // Number of deletes attempted
57  uint32 numDeleteAccept; // Number of deletes accepted
58 
59  /* Measured quantities */
60  double aveEnergy;
61  double aveNumParticles;
62  double aveEoN;
63 
64  /* Move, create and destroy particles */
65  void moveParticle();
66  void insertParticle();
67  void deleteParticle();
68 
69  /* Perform measurements */
70  void measure(int &);
71 
72  /* Compute the total potential energy */
73  double getTotalEnergy();
74 };
75 
76 #endif
77 
Pre-equilibration via classical Monte Carlo.
Definition: cmc.h:26
~ClassicalMonteCarlo()
Destructor.
Definition: cmc.cpp:61
ClassicalMonteCarlo(PotentialBase *, PotentialBase *, MTRand &, const Container *, Array< dVec, 1 > &)
Constructor.
Definition: cmc.cpp:24
void run(uint32, bool)
Perform the Monte Carlo equilibration.
Definition: cmc.cpp:88
The base class which holds details on the generalized box that our system will be simulated inside of...
Definition: container.h:24
The base class from which all specific potentials are derived from.
Definition: potential.h:32
Global common header with shared dependencies and methods.
unsigned long uint32
Unsigned integer type, at least 32 bits.
Definition: common.h:105
TinyVector< double, NDIM > dVec
A NDIM-vector of type double.
Definition: common.h:111
Class definitions for all file input/output.
All possible potential classes.