QMCPACK
DMCFactoryNew Class Reference
+ Collaboration diagram for DMCFactoryNew:

Public Member Functions

 DMCFactoryNew (xmlNodePtr cur, const int dmc_mode)
 
std::unique_ptr< QMCDriverInterfacecreate (const ProjectData &project_data, const std::optional< EstimatorManagerInput > global_emi, WalkerConfigurations &wc, MCPopulation &&pop, Communicate *comm)
 create a DMCBatched driver. More...
 

Private Attributes

const int dmc_mode_
 
xmlNodePtr input_node_
 

Detailed Description

Definition at line 26 of file DMCFactoryNew.h.

Constructor & Destructor Documentation

◆ DMCFactoryNew()

DMCFactoryNew ( xmlNodePtr  cur,
const int  dmc_mode 
)
inline

Definition at line 33 of file DMCFactoryNew.h.

33 : dmc_mode_(dmc_mode), input_node_(cur) {}

Member Function Documentation

◆ create()

std::unique_ptr< QMCDriverInterface > create ( const ProjectData project_data,
const std::optional< EstimatorManagerInput global_emi,
WalkerConfigurations wc,
MCPopulation &&  pop,
Communicate comm 
)

create a DMCBatched driver.

Parameters
[in]project_datacontaining so basic options including DriverVersion and max_cpu_seconds
[in]global_emioptional global estimator manager input passed by value to insure copy, a global input should not be consumed by driver.

Definition at line 19 of file DMCFactoryNew.cpp.

References qmcplusplus::app_summary(), qmcplusplus::comm, DMCFactoryNew::dmc_mode_, qmcplusplus::Units::charge::e, DMCFactoryNew::input_node_, DMCDriverInput::readXML(), and QMCDriverInput::readXML().

Referenced by QMCDriverFactory::createQMCDriver().

24 {
25  app_summary() << "\n========================================"
26  "\n Reading DMC driver XML input section"
27  "\n========================================"
28  << std::endl;
29 
30  QMCDriverInput qmcdriver_input;
31  DMCDriverInput dmcdriver_input;
32  try
33  {
34  qmcdriver_input.readXML(input_node_);
35  dmcdriver_input.readXML(input_node_);
36  }
37  catch (const std::exception& e)
38  {
39  throw UniformCommunicateError(e.what());
40  }
41 
42  auto qmc = std::make_unique<DMCBatched>(project_data, std::move(qmcdriver_input), global_emi,
43  std::move(dmcdriver_input), wc, std::move(pop), comm);
44  // This can probably be eliminated completely since we only support PbyP
45  qmc->setUpdateMode(dmc_mode_ & 1);
46  return qmc;
47 }
std::ostream & app_summary()
Definition: OutputManager.h:63

Member Data Documentation

◆ dmc_mode_

const int dmc_mode_
private

Definition at line 29 of file DMCFactoryNew.h.

Referenced by DMCFactoryNew::create().

◆ input_node_

xmlNodePtr input_node_
private

Definition at line 30 of file DMCFactoryNew.h.

Referenced by DMCFactoryNew::create().


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