12 #ifndef QMCPLUSPLUS_ESTIMATORMANAGERNEW_H 13 #define QMCPLUSPLUS_ESTIMATORMANAGERNEW_H 36 class EstimatorManagerNewTest;
37 class EstimatorManagerNewTestAccess;
113 void stopBlock(
unsigned long accept,
unsigned long reject,
RealType block_weight);
158 template<
typename EstInputType,
typename... Args>
164 template<
typename EstInputType,
typename... Args>
274 static constexpr std::string_view
error_tag_{
"EstimatorManagerNew "};
int addScalarEstimator(std::unique_ptr< ScalarEstimatorBase > &&estimator)
add an Estimator
std::unique_ptr< std::ofstream > Archive
file handler to write data
void zeroOperatorEstimators()
OperatorEstimators need to be zeroed out after the block is finished.
void makeBlockAverages(unsigned long accept, unsigned long reject)
collect data and write
helper functions for EinsplineSetBuilder
declares the list supported estimator input types and declares the input type for EstimatorManagerNew...
void writeOperatorEstimators()
Write OperatorEstimator data to *.stat.h5.
std::vector< std::unique_ptr< OperatorEstBase > > operator_ests_
OperatorEst Observables.
int max4ascii
number of maximum data for a scalar.dat
Class to manage a set of ScalarEstimators As a manager, this class handles the aggregation of data fr...
std::size_t getNumScalarEstimators()
Vector< RealType > AverageCache
cached block averages of the values
void addMainEstimator(std::unique_ptr< ScalarEstimatorBase > &&estimator)
std::vector< ObservableHelper > h5desc
convenient descriptors for hdf5
Collection of Local Energy Operators.
void stopDriverRun()
Stop the manager at the end of a driver run().
int weightInd
index for the block weight PropertyCache(weightInd)
static constexpr std::string_view error_tag_
std::unique_ptr< std::ofstream > DebugArchive
file handler to write data for debugging
Testing class breaking EstimatorManagerNew encapsultation.
int RecordCount
number of records in a block
EstimatorManagerInput emi(estimators_doc.getRoot())
void writeScalarH5()
write scalars to scalar.dat and h5
EstimatorManagerNew(const QMCHamiltonian &ham, Communicate *comm)
default constructor
void collectScalarEstimators(const std::vector< RefVector< ScalarEstimatorBase >> &scalar_ests)
Deals with possible free form scalar estimators.
void reduceOperatorEstimators()
do the rank wise reduction of the OperatorEstimators
bool createScalarEstimator(ScalarEstimatorInput &input, Args &&... args)
Construct scalar estimator of type matching the underlying ScalarEstimatorInput type Consumer and pus...
Wrapping information on parallelism.
Specialized paritlce class for atomistic simulations.
void makeConfigReport(std::ostream &os) const
Return a string with information about which estimators estimator manager is holding.
std::size_t getNumEstimators()
int acceptRatioInd
index for the accept counter PropertyCache(acceptInd)
void getApproximateEnergyVariance(RealType &e, RealType &var)
get the average of per-block energy and variance of all the blocks Note: this is not weighted average...
ScalarEstimatorBase::accumulator_type energyAccumulator
accumulator for the energy
~EstimatorManagerNew()
destructor
int cpuInd
index for the block cpu PropertyCache(cpuInd)
Vector< RealType > PropertyCache
cached block averages of properties, e.g. BlockCPU
Thread local estimator container/accumulator.
void stopBlock(unsigned long accept, unsigned long reject, RealType block_weight)
unified: stop a block
ScalarEstimatorBase::accumulator_type varAccumulator
accumulator for the variance
An abstract class for gridded estimators.
std::variant< std::monostate, MomentumDistributionInput, SpinDensityInput, OneBodyDensityMatricesInput, SelfHealingOverlapInput, MagnetizationDensityInput, PerParticleHamiltonianLoggerInput > EstimatorInput
void collectOperatorEstimators(const std::vector< RefVector< OperatorEstBase >> &op_ests)
Reduces OperatorEstimator data from Crowds to the manager's OperatorEstimator data.
void collectMainEstimators(const RefVector< ScalarEstimatorBase > &scalar_estimators)
At end of block collect the main scalar estimators for the entire rank.
std::unique_ptr< T > UPtr
auto & get_AverageCache()
bool createEstimator(EstimatorInput &input, Args &&... args)
Construct estimator of type matching the underlying EstimatorInput type Consumer and push its its uni...
UPtr< ScalarEstimatorBase > main_estimator_
main estimator i.e. some version of a local energy estimator.
RecordNamedProperty< RealType > BlockAverages
manager of scalar data
std::vector< std::reference_wrapper< T > > RefVector
std::vector< FullPrecRealType > FPRBuffer
Declaraton of Vector<T,Alloc> Manage memory through Alloc directly and allow referencing an existing ...
Timer block_timer_
block timer
Class to represent a many-body trial wave function.
void reset()
reset the estimator
Input type for EstimatorManagerNew Parses Estimators level of input and and delegates child estimator...
void startDriverRun()
Start the manager at the beginning of a driver run().
std::unique_ptr< hdf_archive > h_file
hdf5 handler
std::variant< std::monostate, LocalEnergyInput, CSLocalEnergyInput, RMCLocalEnergyInput > ScalarEstimatorInput
Communicate * my_comm_
communicator to handle communication
QTFull::RealType FullPrecRealType
QMCTraits::FullPrecRealType FullPrecRealType
int addEstOperator(OperatorEstBase &op_est)
add a "non" physical operator estimator
void addHeader(std::ostream &o)
add header to an std::ostream
bool put(QMCHamiltonian &H, const ParticleSet &pset, const TrialWaveFunction &twf, xmlNodePtr cur)
process xml tag associated with estimators
RecordNamedProperty< RealType > BlockProperties
manager of property data
bool areThereListeners() const
Do any of the instantiated estimators in operator_ests_ listen to per particle hamiltonian values...
A container class to represent a walker.
QMCTraits::FullPrecRealType RealType
This is to deal with vague expression of precision in legacy code. Don't use in new code...
Define a serialized buffer to store anonymous data.
std::vector< UPtr< ScalarEstimatorBase > > scalar_ests_
non main scalar estimators collecting simple scalars, are there any? with the removal of collectables...
void startBlock(int steps)
start a block