QMCPACK
DMCFactoryNew.cpp
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) 2022 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #include "DMCFactoryNew.h"
15 #include "Concurrency/OpenMP.h"
16 
17 namespace qmcplusplus
18 {
19 std::unique_ptr<QMCDriverInterface> DMCFactoryNew::create(const ProjectData& project_data,
20  const std::optional<EstimatorManagerInput> global_emi,
22  MCPopulation&& pop,
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 }
48 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
class ProjectData
Definition: ProjectData.h:36
std::ostream & app_summary()
Definition: OutputManager.h:63
A set of light weight walkers that are carried between driver sections and restart.
Input representation for DMC driver class runtime parameters.
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.
Wrapping information on parallelism.
Definition: Communicate.h:68
Compilation units that construct QMCDriverInput need visibility to the actual input classes types in ...
This a subclass for runtime errors that will occur on all ranks.
void readXML(xmlNodePtr cur)
Reads qmc section xml node parameters.
Input representation for Driver base class runtime parameters.
void readXML(xmlNodePtr xml_input)