QMCPACK
RMC.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
8 // Raymond Clay III, j.k.rofling@gmail.com, Lawrence Livermore National Laboratory
9 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
10 //
11 // File created by: Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
12 //////////////////////////////////////////////////////////////////////////////////////
13 
14 
15 #ifndef QMCPLUSPLUS_RMC_H
16 #define QMCPLUSPLUS_RMC_H
17 #include "QMCDrivers/QMCDriver.h"
19 #include "Particle/Reptile.h"
20 namespace qmcplusplus
21 {
22 /** @ingroup QMCDrivers ParticleByParticle
23  * @brief Implements a RMC using threaded execution.
24  */
25 class RMC : public QMCDriver, public CloneManager
26 {
27 public:
28  /// Constructor.
31 
32  RMC(const ProjectData& project_data,
34  TrialWaveFunction& psi,
35  QMCHamiltonian& h,
36  Communicate* comm);
37  bool run() override;
38  bool put(xmlNodePtr cur) override;
39  QMCRunType getRunType() override { return QMCRunType::RMC; }
40 
41 private:
43  ///option to enable/disable drift equation for RMC
44  std::string rescaleDrift;
45  ///projection time of reptile
47  ///period for walker dump
49  ///number of beads on the reptile, beta/tau
50  int beads;
51  //number of reptiles.
52  int nReptiles;
53  ///rescale for time step studies. some int>2 and new beads are inserted in between the old ones.
55 
56  //Calculating the reptiles from scratch or from a previous VMC/DMC/RMC run.
58  // vector of indices for the action and transprob
59  std::vector<int> Action;
60  std::vector<int> TransProb;
61 
62  ///check the run-time environments
63  inline void resetVars()
64  {
65  prestepsVMC = -1;
66  beads = -1;
67  beta = -1;
68  nReptiles = -1;
69  };
70  void resetRun();
71  //This will resize the MCWalkerConfiguration and initialize the ReptileList. Does not care for previous runs.
72  void resetReptiles(int nReptiles, int nbeads, RealType tau);
73  //This will resize the MCWalkerConfiguration and initialize Reptile list. It will then reinitialize the MCWC with a list of Reptile coordinates
74  void resetReptiles(std::vector<ReptileConfig_t>& reptile_samps, RealType tau);
75  //For # of walker samples, create that many reptiles with nbeads each. Initialize each reptile to have the value of the walker "seed".
76  void resetReptiles(std::vector<ParticlePos>& walker_samps, int nbeads, RealType tau);
77  ///copy constructor (disabled)
78  RMC(const RMC&) = delete;
79  /// Copy operator (disabled).
80  RMC& operator=(const RMC&) = delete;
81 };
82 } // namespace qmcplusplus
83 
84 #endif
bool run() override
Definition: RMC.cpp:68
int prestepsVMC
Definition: RMC.h:42
A set of walkers that are to be advanced by Metropolis Monte Carlo.
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::RealType RealType
Definition: Configuration.h:58
Manager clones for threaded applications.
Definition: CloneManager.h:34
class ProjectData
Definition: ProjectData.h:36
Collection of Local Energy Operators.
bool fromScratch
Definition: RMC.h:57
abstract base class for QMC engines
Definition: QMCDriver.h:71
Attaches a unit to a Vector for IO.
int nReptiles
Definition: RMC.h:52
Wrapping information on parallelism.
Definition: Communicate.h:68
Declaration of QMCDriver.
int myPeriod4WalkerDump
period for walker dump
Definition: RMC.h:48
Implements a RMC using threaded execution.
Definition: RMC.h:25
void resetReptiles(int nReptiles, int nbeads, RealType tau)
Definition: RMC.cpp:312
RMC type: rmc, rmc-ptcl.
void resetRun()
Definition: RMC.cpp:143
Class to represent a many-body trial wave function.
int resizeReptile
rescale for time step studies. some int>2 and new beads are inserted in between the old ones...
Definition: RMC.h:54
RMC(const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm)
Constructor.
Definition: RMC.cpp:38
ParticleAttrib< SingleParticlePos > ParticlePos
Definition: Configuration.h:92
Manager class to handle multiple threads.
QMCRunType getRunType() override
Definition: RMC.h:39
std::vector< int > Action
Definition: RMC.h:59
bool put(xmlNodePtr cur) override
Definition: RMC.cpp:305
std::vector< Walker_t::ParticlePos > ReptileConfig_t
Definition: Reptile.h:45
RealType beta
projection time of reptile
Definition: RMC.h:46
RMC & operator=(const RMC &)=delete
Copy operator (disabled).
Reptile::ReptileConfig_t ReptileConfig_t
Definition: RMC.h:30
void resetVars()
check the run-time environments
Definition: RMC.h:63
std::vector< int > TransProb
Definition: RMC.h:60
int beads
number of beads on the reptile, beta/tau
Definition: RMC.h:50
std::string rescaleDrift
option to enable/disable drift equation for RMC
Definition: RMC.h:44