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: Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign 8 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign 9 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign 10 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory 11 // 12 // File created by: Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign 13 ////////////////////////////////////////////////////////////////////////////////////// 14 15 16 #ifndef QMCPLUSPLUS_DMC_CUDA_H 17 #define QMCPLUSPLUS_DMC_CUDA_H 18 #include "QMCDrivers/QMCDriver.h" 19 #include "QMCHamiltonians/NonLocalTOperator.h" 20 #include "Utilities/TimerManager.h" 21 #include "type_traits/CUDATypes.h" 22 23 namespace qmcplusplus 24 { 25 class QMCUpdateBase; 26 27 /** @ingroup QMCDrivers PbyP 28 *@brief Implements the DMC algorithm using particle-by-particle move. 29 */ 30 class DMCcuda : public QMCDriver 31 { 32 public: 33 /// Constructor. 34 DMCcuda(MCWalkerConfiguration& w, 35 TrialWaveFunction& psi, 36 QMCHamiltonian& h, 37 Communicate* comm, 38 bool enable_profiling); 39 bool run(); 40 bool put(xmlNodePtr cur); 41 void resetUpdateEngine(); 42 43 private: 44 using CTS = CUDAGlobalTypes; 45 std::string ScaleWeight; 46 /// tau/mass 47 RealType m_tauovermass; 48 ///steps before branching 49 int BranchInterval; 50 ///number of warmup steps 51 int myWarmupSteps; 52 ///period for walker dump 53 int myPeriod4WalkerDump; 54 ///update engine 55 QMCUpdateBase* Mover; 56 /// Copy Constructor (disabled) 57 DMCcuda(const DMCcuda&) = delete; 58 /// Copy operator (disabled). 59 DMCcuda& operator=(const DMCcuda&) = delete; 60 61 bool checkBounds(const PosType& newpos); 62 void checkBounds(std::vector<PosType>& newpos, std::vector<bool>& valid); 63 getRunType()64 QMCRunType getRunType() { return QMCRunType::DMC; } 65 66 ///hide initialization from the main function 67 void resetRun(); 68 NonLocalTOperator NLop; 69 ///use T-moves 70 int UseTMove; 71 72 NewTimer &ResizeTimer, &DriftDiffuseTimer, &BranchTimer, &HTimer; 73 }; 74 } // namespace qmcplusplus 75 76 #endif 77