33 setIfInInput(
rstats_,
"rstats");
37 setIfInInput(
scale_,
"scale");
41 setIfInInput(
points_,
"points");
49 using namespace estimatorinput;
50 const std::string error_tag{
"OneBodyDensityMatrices input: "};
54 Real scale = get<Real>(
"scale");
55 if (scale > 1.0 + 1
e-10)
57 else if (scale < 0.0 - 1
e-10)
60 std::vector<std::string> basis_sets = get<std::vector<std::string>>(
"basis");
61 if (basis_sets.size() == 0 || basis_sets[0].size() == 0)
64 if (get<std::string>(
"integrator") !=
"density")
66 if (
has(
"acceptance_ratio") && get<bool>(
"acceptance_ratio") ==
true)
69 if (get<std::string>(
"integrator") ==
"uniform_grid")
73 "samples are set from points for uniform_grid integrator and are invalid input");
helper functions for EinsplineSetBuilder
bool write_acceptance_ratio_
QMCTraits::FullPrecRealType Real
Position center_
center_ does not have a default. The estimator sets if from input Lattice if it isn't set ...
#define LAMBDA_setIfInInput
If tag is present in input_secution set its variable.
void checkParticularValidity() override
do parse time checks of input
This a subclass for runtime errors that will occur on all ranks.
void readXML(xmlNodePtr cur)
Read variable values (initialize) from XML input, call checkValid.
OneBodyDensityMatricesInput(const OneBodyDensityMatricesInput &)=default
default copy constructor This is required due to OBDMI being part of a variant used as a vector eleme...
static std::any lookupAnyEnum(const std::string &enum_name, const std::string &enum_value, const std::unordered_map< std::string, std::any > &enum_map)
Assign any enum helper for InputSection derived class assumes enum lookup table of this form: inline ...
bool center_defined_
This flag is derived from input so if you construct an OBDMI directly with center it must be set...
static const std::unordered_map< std::string, std::any > lookup_input_enum_value
mapping for enumerated options of OneBodyDensityMatrices This data object is the basis of input enum ...
std::vector< std::string > basis_sets_
OneBodyDensityMatricesInputSection input_section_
bool has(const std::string &name) const
void checkCenterCorner(InputSection &input_section, const std::string &error_tag)
std::any assignAnyEnum(const std::string &name) const override
Derived class overrides this to get proper assignment of scoped enum values.