![]() |
QMCPACK
|
class to handle a set of parameters More...
Public Member Functions | |
ParameterSet (const char *aname="parameter") | |
bool | get (std::ostream &os) const override |
write to a std::ostream More... | |
bool | put (std::istream &is) override |
read from std::istream More... | |
bool | put (xmlNodePtr cur) override |
assign parameters to the set More... | |
void | reset () override |
reset member data More... | |
template<class PDT > | |
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> More... | |
template<class PDT > | |
void | setValue (const std::string &aname_in, PDT aval) |
![]() | |
OhmmsElementBase (const char *aname="none") | |
constructor with a name More... | |
virtual | ~OhmmsElementBase () |
destructor More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
set name More... | |
void | setIOMode (int imode) |
set iomode More... | |
virtual bool | add (xmlNodePtr parent) |
add a xmlNode to the children list of parent More... | |
void | put (const std::string &s) |
read from string More... | |
virtual void | begin_node (std::ostream &os) const |
write the start of a node More... | |
virtual void | end_node (std::ostream &os) const |
write the end of a node More... | |
Public Attributes | |
std::map< std::string, std::unique_ptr< OhmmsElementBase > > | m_param |
Additional Inherited Members | |
![]() | |
enum | { useLIBXML = 0, useLIBXMLPP, usePLAIN } |
enumeration to choose the xml parser More... | |
![]() | |
int | myIOMode |
the type of IO mode: default is useLIBXML More... | |
std::string | myName |
the name of the node, corresponds to the xml tag More... | |
class to handle a set of parameters
Definition at line 27 of file ParameterSet.h.
|
inline |
Definition at line 33 of file ParameterSet.h.
template void add< float > | ( | 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>
aparam | reference the object which this parameter is assigned to. |
aname_in | the value of the name attribute |
candidate_values | candidate values to be checked against, the first element is the default value |
status | Tag status, See OhmmsParameter.h for more details |
Definition at line 58 of file ParameterSet.cpp.
References qmcplusplus::lowerCase(), and m_param.
Referenced by qmcplusplus::createDriftModifier(), RadialJastrowBuilder::createJ1(), qmcplusplus::createWalkerController(), CSUpdateBase::CSUpdateBase(), CSVMC::CSVMC(), DMC::DMC(), DriftModifierUNR::parseXML(), QMCFixedSampleLinearOptimizeBatched::process(), HybridEngine::processXML(), DescentEngine::processXML(), FiniteDiffErrData::put(), VMC::put(), DMC::put(), CSVMC::put(), RPAJastrow::put(), RMCUpdateAllWithDrift::put(), RMCUpdatePbyPWithDrift::put(), NonLocalTOperator::put(), QMCFixedSampleLinearOptimize::put(), ProjectData::put(), ForceCeperley::put(), WalkerControl::put(), QMCCostFunctionBase::put(), SymmetryBuilder::put(), ForceChiesaPBCAA::put(), WalkerControlBase::put(), PWParameterSet::PWParameterSet(), QMCDriver::QMCDriver(), QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), QMCFixedSampleLinearOptimizeBatched::QMCFixedSampleLinearOptimizeBatched(), WFOptDriverInput::readXML(), GradientTestInput::readXML(), VMCDriverInput::readXML(), DMCDriverInput::readXML(), QMCDriverInput::readXML(), SFNBranch::registerParameters(), SimpleFixedNodeBranch::registerParameters(), SimpleFixedNodeBranch::resetRun(), RMC::RMC(), WaveFunctionTester::runNodePlot(), QMCUpdateBase::setDefaults(), TEST_CASE(), VMC::VMC(), and WaveFunctionTester::WaveFunctionTester().
|
inlineoverridevirtual |
write to a std::ostream
Implements OhmmsElementBase.
Definition at line 35 of file ParameterSet.h.
References OhmmsElementBase::get(), and m_param.
Referenced by VMC::put(), and CSVMC::put().
|
inlineoverridevirtual |
read from std::istream
Implements OhmmsElementBase.
Definition at line 42 of file ParameterSet.h.
Referenced by qmcplusplus::createDriftModifier(), RadialJastrowBuilder::createJ1(), qmcplusplus::createWalkerController(), DriftModifierUNR::parseXML(), QMCFixedSampleLinearOptimizeBatched::process(), QMCFixedSampleLinearOptimize::processOptXML(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), HybridEngine::processXML(), DescentEngine::processXML(), FiniteDiffErrData::put(), VMC::put(), RMC::put(), DMC::put(), CSVMC::put(), RPAJastrow::put(), RMCUpdateAllWithDrift::put(), RMCUpdatePbyPWithDrift::put(), NonLocalTOperator::put(), QMCFixedSampleLinearOptimize::put(), ProjectData::put(), ForceCeperley::put(), PWParameterSet::put(), WalkerControl::put(), QMCCostFunctionBase::put(), SymmetryBuilder::put(), ForceChiesaPBCAA::put(), WalkerControlBase::put(), QMCUpdateBase::put(), SFNBranch::put(), SimpleFixedNodeBranch::put(), QMCDriver::putQMCInfo(), WFOptDriverInput::readXML(), GradientTestInput::readXML(), VMCDriverInput::readXML(), DMCDriverInput::readXML(), QMCDriverInput::readXML(), RMC::resetRun(), SimpleFixedNodeBranch::resetRun(), WaveFunctionTester::runNodePlot(), and TEST_CASE().
|
overridevirtual |
assign parameters to the set
cur | the xml node to work on |
Accept both
Implements OhmmsElementBase.
Definition at line 22 of file ParameterSet.cpp.
References castXMLCharToChar(), getXMLAttributeValue(), qmcplusplus::lowerCase(), m_param, and OhmmsElementBase::myName.
|
inlineoverridevirtual |
template void setValue< int > | ( | const std::string & | aname_in, |
PDT | aval | ||
) |
Definition at line 69 of file ParameterSet.cpp.
References qmcplusplus::lowerCase(), and m_param.
Referenced by QMCDriver::setValue().
std::map<std::string, std::unique_ptr<OhmmsElementBase> > m_param |
Definition at line 31 of file ParameterSet.h.
Referenced by add(), get(), put(), and setValue().