29 : UseHDF5(
input.get_use_hdf5()), refH(h), input_(
input)
43 int loc = h5desc.size();
45 using namespace std::string_literals;
46 h5desc.push_back({{
"LocalEnergy"s}});
47 h5desc.push_back({{
"LocalEnergy_sq"s}});
48 h5desc.push_back({{
"LocalPotential"s}});
49 std::vector<int> onedim(1, 1);
50 h5desc[loc++].set_dimensions(onedim,
FirstIndex);
51 h5desc[loc++].set_dimensions(onedim,
FirstIndex + 1);
52 h5desc[loc++].set_dimensions(onedim,
FirstIndex + 2);
56 for (
int i = loc; i < h5desc.size(); ++i)
66 record.
add(
"LocalEnergy");
67 record.
add(
"LocalEnergy_sq");
68 record.
add(
"LocalPotential");
std::string getObservableName(int i) const
return the name of the i-th observable
void registerObservables(std::vector< ObservableHelper > &h5dec, hdf_archive &file) override
add descriptors of observables to utilize hdf5
int startIndex() const
retrun the starting index
helper functions for EinsplineSetBuilder
Collection of Local Energy Operators.
Class to accumulate the local energy and components.
int FirstIndex
first index within an record of the first element handled by an object
std::vector< accumulator_type > scalars
scalars to be measured
TinyVector< T, 3 > lower_bound(const TinyVector< T, 3 > &a, const TinyVector< T, 3 > &b)
helper function to determine the lower bound of a domain (need to move up)
LocalEnergyEstimator * clone() override
clone the object
int add(const std::string &aname)
int sizeOfObservables() const
return the size of observables
std::vector< accumulator_type > scalars_saved
scalars saved
void clear()
clear the scalars to collect
const QMCHamiltonian & refH
void registerObservables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const
register obsevables so that their averages can be dumped to hdf5
void add2Record(RecordListType &record) override
add the local energy, variance and all the Hamiltonian components to the scalar record container ...
int LastIndex
last index within an record of the first element handled by an object
LocalEnergyEstimator(const QMCHamiltonian &h, bool use_hdf5)
constructor