25 size_t est_offset = 0;
26 size_t scalar_est_offset = 0;
36 scalar_est_offset = 0;
49 const std::string error_tag{
"EstimatorManager input:"};
52 if (cur_name ==
"estimators")
53 child = cur->xmlChildrenNode;
59 if (cname ==
"estimator")
63 if (atype.empty() && !aname.empty())
65 if (aname.empty() && !atype.empty())
67 if (atype ==
"localenergy" || atype ==
"elocal")
68 appendScalarEstimatorInput<LocalEnergyInput>(child);
69 else if (atype ==
"cslocalenergy")
71 appendScalarEstimatorInput<CSLocalEnergyInput>(child);
72 app_warning() <<
"CSLocalEnergyEstimator support is at best experimental with batch drivers" << std::endl;
74 else if (atype ==
"rmc")
76 appendScalarEstimatorInput<RMCLocalEnergyInput>(child);
77 app_warning() <<
"RMCLocalEnergyEstimator support is at best experimental with batch drivers" << std::endl;
79 else if (atype ==
"onebodydensitymatrices")
80 appendEstimatorInput<OneBodyDensityMatricesInput>(child);
81 else if (atype ==
"spindensity")
82 appendEstimatorInput<SpinDensityInput>(child);
83 else if (atype ==
"momentumdistribution")
84 appendEstimatorInput<MomentumDistributionInput>(child);
85 else if (atype ==
"selfhealingoverlap")
86 appendEstimatorInput<SelfHealingOverlapInput>(child);
87 else if (atype ==
"perparticlehamiltonianlogger")
88 appendEstimatorInput<PerParticleHamiltonianLoggerInput>(child);
89 else if (atype ==
"magnetizationdensity")
90 appendEstimatorInput<MagnetizationDensityInput>(child);
93 " in Estimators input.");
95 else if (cname !=
"text")
102 if (cur_name ==
"estimators")
106 app_summary() <<
"<estimator> nodes not contained in <estimators>...</estimators> is a deprecated input xml idiom" std::ostream & app_warning()
helper functions for EinsplineSetBuilder
declares the list supported estimator input types and declares the input type for EstimatorManagerNew...
std::ostream & app_summary()
void readXML(xmlNodePtr cur)
read <estimators> node or (<estimator> node for legacy support) This can be done multiple times with ...
EstimatorManagerInput emi(estimators_doc.getRoot())
void append(const EstimatorInput &ei)
typed appending of already parsed inputs.
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
EstimatorInputs estimator_inputs_
this is a vector of variants for typesafe access to the estimator inputs
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.
ScalarEstimatorInputs scalar_estimator_inputs_
std::string lowerCase(const std::string_view s)
++17
std::variant< std::monostate, MomentumDistributionInput, SpinDensityInput, OneBodyDensityMatricesInput, SelfHealingOverlapInput, MagnetizationDensityInput, PerParticleHamiltonianLoggerInput > EstimatorInput
char * castXMLCharToChar(xmlChar *c)
assign a value from a node. Use specialization for classes.
std::string getXMLAttributeValue(const xmlNodePtr cur, const std::string_view name)
get the value string for attribute name if name is unfound in cur you get an empty string back this i...
Input type for EstimatorManagerNew Parses Estimators level of input and and delegates child estimator...
EstimatorManagerInput()=default
std::variant< std::monostate, LocalEnergyInput, CSLocalEnergyInput, RMCLocalEnergyInput > ScalarEstimatorInput