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 //
10 // File created by: Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 #include "RMCFactory.h"
15 #include "QMCDrivers/RMC/RMC.h"
16 #include "Message/OpenMP.h"
17 
18 namespace qmcplusplus
19 {
create(MCWalkerConfiguration & w,TrialWaveFunction & psi,QMCHamiltonian & h,Communicate * comm)20 QMCDriver* RMCFactory::create(MCWalkerConfiguration& w,
21                               TrialWaveFunction& psi,
22                               QMCHamiltonian& h,
23                               Communicate* comm)
24 {
25   int np = omp_get_max_threads();
26   //(SPACEWARP_MODE,MULTIPE_MODE,UPDATE_MODE)
27   QMCDriver* qmc = 0;
28 #ifdef QMC_CUDA
29   APP_ABORT("RMCFactory::create. RMC is not supported on GPU.\n");
30 #endif
31 
32   if (RMCMode == 0 || RMCMode == 1) //(0,0,0) (0,0,1) pbyp and all electron
33   {
34     qmc = new RMC(w, psi, h, comm);
35   }
36 #if defined(QMC_BUILD_COMPLETE)
37 //else if(RMCMode == 2) //(0,1,0)
38 //{
39 //  qmc = new RMCMultiple(w,psi,h);
40 //}
41 //else if(RMCMode == 3) //(0,1,1)
42 //{
43 //  qmc = new RMCPbyPMultiple(w,psi,h);
44 //}
45 // else if(RMCMode ==2 || RMCMode ==3)
46 // {
47 //   qmc = new CSRMC(w,psi,h);
48 // }
49 // #if !defined(QMC_COMPLEX)
50 // else if(RMCMode == 6) //(1,1,0)
51 // {
52 //   qmc = new RMCMultipleWarp(w,psi,h, ptclpool);
53 // }
54 // else if(RMCMode == 7) //(1,1,1)
55 // {
56 //   qmc = new RMCPbyPMultiWarp(w,psi,h, ptclpool);
57 // }
58 // #endif
59 #endif
60   qmc->setUpdateMode(RMCMode & 1);
61   return qmc;
62 }
63 } // namespace qmcplusplus
64