QMCPACK
VMCFactory Class Reference
+ Collaboration diagram for VMCFactory:

Public Member Functions

 VMCFactory (unsigned long vmode, xmlNodePtr cur)
 
std::unique_ptr< QMCDriverInterfacecreate (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, bool enable_profiling)
 

Private Attributes

unsigned long VMCMode
 
xmlNodePtr myNode
 

Detailed Description

Definition at line 23 of file VMCFactory.h.

Constructor & Destructor Documentation

◆ VMCFactory()

VMCFactory ( unsigned long  vmode,
xmlNodePtr  cur 
)
inline

Definition at line 30 of file VMCFactory.h.

30 : VMCMode(vmode), myNode(cur) {}
unsigned long VMCMode
Definition: VMCFactory.h:26

Member Function Documentation

◆ create()

std::unique_ptr< QMCDriverInterface > create ( const ProjectData project_data,
MCWalkerConfiguration w,
TrialWaveFunction psi,
QMCHamiltonian h,
Communicate comm,
bool  enable_profiling 
)

Definition at line 33 of file VMCFactory.cpp.

References RandomNumberControl::Children, qmcplusplus::comm, and VMCFactory::VMCMode.

Referenced by QMCDriverFactory::createQMCDriver().

39 {
40  //(SPACEWARP_MODE,MULTIPE_MODE,UPDATE_MODE)
41  std::unique_ptr<QMCDriverInterface> qmc;
42  if (VMCMode == 0 || VMCMode == 1) //(0,0,0) (0,0,1)
43  {
44  qmc = std::make_unique<VMC>(project_data, w, psi, h, RandomNumberControl::Children, comm, enable_profiling);
45  }
46  else if (VMCMode == 2 || VMCMode == 3)
47  {
48  qmc = std::make_unique<CSVMC>(project_data, w, psi, h, comm);
49  }
50  qmc->setUpdateMode(VMCMode & 1);
51  return qmc;
52 }
unsigned long VMCMode
Definition: VMCFactory.h:26
static UPtrVector< RandomBase< FullPrecRealType > > Children

Member Data Documentation

◆ myNode

xmlNodePtr myNode
private

Definition at line 27 of file VMCFactory.h.

◆ VMCMode

unsigned long VMCMode
private

Definition at line 26 of file VMCFactory.h.

Referenced by VMCFactory::create().


The documentation for this class was generated from the following files: