QMCPACK
VMCDriverInput Class Reference

Input representation for VMC driver class runtime parameters. More...

+ Collaboration diagram for VMCDriverInput:

Public Types

using IndexType = QMCTraits::IndexType
 
using RealType = QMCTraits::RealType
 
using FullPrecisionRealType = QMCTraits::FullPrecRealType
 

Public Member Functions

 VMCDriverInput ()
 
 VMCDriverInput (bool use_drift)
 
void readXML (xmlNodePtr xml_input)
 
bool get_use_drift () const
 
IndexType get_samples () const
 

Protected Attributes

bool use_drift_ = true
 
Do not write out blocks of gets for variables like this there is are code_generation tools in QMCPACK_ROOT/utils/code_tools More...
 
IndexType samples_ = -1
 

Friends

std::ostream & operator<< (std::ostream &o_stream, const VMCDriverInput &vmci)
 

Detailed Description

Input representation for VMC driver class runtime parameters.

Definition at line 22 of file VMCDriverInput.h.

Member Typedef Documentation

◆ FullPrecisionRealType

◆ IndexType

Definition at line 25 of file VMCDriverInput.h.

◆ RealType

Definition at line 26 of file VMCDriverInput.h.

Constructor & Destructor Documentation

◆ VMCDriverInput() [1/2]

VMCDriverInput ( )
inline

Definition at line 28 of file VMCDriverInput.h.

28 {};

◆ VMCDriverInput() [2/2]

VMCDriverInput ( bool  use_drift)

Definition at line 16 of file VMCDriverInput.cpp.

16 : use_drift_(use_drift) {}
bool use_drift_
Do not write out blocks of gets for variables like this there is are code_generation tools in QMCPAC...

Member Function Documentation

◆ get_samples()

IndexType get_samples ( ) const
inline

Definition at line 45 of file VMCDriverInput.h.

References VMCDriverInput::samples_.

45 { return samples_; }

◆ get_use_drift()

bool get_use_drift ( ) const
inline

Definition at line 44 of file VMCDriverInput.h.

References VMCDriverInput::use_drift_.

Referenced by VMCBatched::advanceWalkers(), and qmcplusplus::TEST_CASE().

44 { return use_drift_; }
bool use_drift_
Do not write out blocks of gets for variables like this there is are code_generation tools in QMCPAC...

◆ readXML()

void readXML ( xmlNodePtr  xml_input)

Definition at line 18 of file VMCDriverInput.cpp.

References ParameterSet::add(), qmcplusplus::app_log(), qmcplusplus::node, ParameterSet::put(), VMCDriverInput::samples_, and VMCDriverInput::use_drift_.

Referenced by VMCFactoryNew::create(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), qmcplusplus::QMCWFOptLinearFactoryNew(), and qmcplusplus::TEST_CASE().

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 }
if(!okay) throw std xmlNodePtr node
std::ostream & app_log()
Definition: OutputManager.h:65
bool put(std::istream &is) override
read from std::istream
Definition: ParameterSet.h:42
class to handle a set of parameters
Definition: ParameterSet.h:27
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>

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o_stream,
const VMCDriverInput vmci 
)
friend

Definition at line 34 of file VMCDriverInput.cpp.

34 { return o_stream; }

Member Data Documentation

◆ samples_

IndexType samples_ = -1
protected

Definition at line 40 of file VMCDriverInput.h.

Referenced by VMCDriverInput::get_samples(), and VMCDriverInput::readXML().

◆ use_drift_

bool use_drift_ = true
protected


Do not write out blocks of gets for variables like this there is are code_generation tools in QMCPACK_ROOT/utils/code_tools

Definition at line 39 of file VMCDriverInput.h.

Referenced by VMCDriverInput::get_use_drift(), and VMCDriverInput::readXML().


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