QMCPACK
VMCDriverInput.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) 2020 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 "VMCDriverInput.h"
13 
14 namespace qmcplusplus
15 {
16 VMCDriverInput::VMCDriverInput(bool use_drift) : use_drift_(use_drift) {}
17 
18 void VMCDriverInput::readXML(xmlNodePtr node)
19 {
20  ParameterSet parameter_set_;
21  std::string use_drift;
22  parameter_set_.add(use_drift, "usedrift", {"yes", "no"});
23  parameter_set_.add(use_drift, "use_drift", {"yes", "no"});
24  parameter_set_.add(samples_, "samples");
25  parameter_set_.put(node);
26 
27  use_drift_ = use_drift == "yes";
28  if (use_drift_)
29  app_log() << " Random walking with drift" << std::endl;
30  else
31  app_log() << " Random walking without drift" << std::endl;
32 }
33 
34 std::ostream& operator<<(std::ostream& o_stream, const VMCDriverInput& vmci) { return o_stream; }
35 
36 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
if(!okay) throw std xmlNodePtr node
Input representation for VMC driver class runtime parameters.
std::ostream & app_log()
Definition: OutputManager.h:65
bool put(std::istream &is) override
read from std::istream
Definition: ParameterSet.h:42
void readXML(xmlNodePtr xml_input)
class to handle a set of parameters
Definition: ParameterSet.h:27
std::ostream & operator<<(std::ostream &out, const AntiSymTensor< T, D > &rhs)
bool use_drift_
Do not write out blocks of gets for variables like this there is are code_generation tools in QMCPAC...
void add(PDT &aparam, const std::string &aname_in, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new parameter corresponding to an xmlNode <parameter>