13 #ifndef QMCPLUSPLUS_PER_PARTICLE_HAMILTONIAN_LOGGER_H 14 #define QMCPLUSPLUS_PER_PARTICLE_HAMILTONIAN_LOGGER_H 19 #include <unordered_map> 32 using CrowdLogValues = std::unordered_map<std::string, std::vector<Vector<Real>>>;
66 const std::string
name_{
"PerParticleHamiltonianLogger"};
std::unordered_map< std::string, std::vector< Vector< Real > >> CrowdLogValues
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
UPtr< OperatorEstBase > spawnCrowdClone() const override
Collection of Local Energy Operators.
PerParticleHamiltonianLogger *const rank_estimator_
PerParticleHamiltonianLogger(PerParticleHamiltonianLoggerInput &&input, int rank)
ListenerVector< Real >::ReportingFunction getLogger()
return lambda function to register as listener the purpose of this function is to factor out the prod...
A minimally functional wrapper for the since c++11 <random>
An abstract class for gridded estimators.
std::unique_ptr< T > UPtr
std::vector< std::reference_wrapper< T > > RefVector
std::function< void(const int walker_index, const std::string &name, const Vector< T > &values)> ReportingFunction
"Callback" function type for an operator to report a vector of values to a listener ...
Declaraton of Vector<T,Alloc> Manage memory through Alloc directly and allow referencing an existing ...
DataLocality
data locality with respect to walker buffer
void collect(const RefVector< OperatorEstBase > &type_erased_operator_estimators) override
Reduce estimator result data from crowds to rank.
std::fstream rank_fstream_
void write(CrowdLogValues &values, const std::vector< long > &walkers_ids)
PerParticleHamiltonianLoggerInput input_
void registerListeners(QMCHamiltonian &ham_leader) override
Register 0-many listeners with a leading QMCHamiltonian instance i.e.
Listener types that allow Estimators to register with QMCHamiltonian to have "trace" values from oper...
void accumulate(const RefVector< MCPWalker > &walkers, const RefVector< ParticleSet > &psets, const RefVector< TrialWaveFunction > &wfns, const RefVector< QMCHamiltonian > &hams, RandomBase< FullPrecRealType > &rng) override
Accumulate whatever it is you are accumulating with respect to walkers.
std::vector< long > walker_ids_
void startBlock(int steps) override