![]() |
QMCPACK
|
Thread local estimator container/accumulator. More...
Public Types | |
using | MCPWalker = Walker< QMCTraits, PtclOnLatticeTraits > |
using | RealType = EstimatorManagerNew::RealType |
using | FullPrecRealType = EstimatorManagerNew::FullPrecRealType |
Public Member Functions | |
EstimatorManagerCrowd (EstimatorManagerNew &em) | |
EstimatorManagerCrowd are always spawn of an EstimatorManagerNew. More... | |
~EstimatorManagerCrowd () | |
destructor More... | |
int | size () const |
return the number of ScalarEstimators More... | |
void | startBlock (int steps) |
start a block More... | |
void | stopBlock () |
void | accumulate (const RefVector< MCPWalker > &walkers, const RefVector< ParticleSet > &psets, const RefVector< TrialWaveFunction > &wfns, const RefVector< QMCHamiltonian > &hams, RandomBase< FullPrecRealType > &rng) |
Accumulate over all scalar estimators and operator estimators over all walkers in crowd. More... | |
ScalarEstimatorBase & | get_main_estimator () |
RefVector< ScalarEstimatorBase > | get_scalar_estimators () |
RefVector< qmcplusplus::OperatorEstBase > | get_operator_estimators () |
RealType | get_block_num_samples () const |
RealType | get_block_weight () const |
void | registerListeners (const RefVectorWithLeader< QMCHamiltonian > &ham_list) |
This registers the crowd lever estimators that require listeners into the QMCHamiltonianMultiWalkerResources We really only need a QMCHamiltonian leader but resource acquisition and release works better this way. More... | |
Private Attributes | |
RealType | block_num_samples_ |
number of samples accumulated in a block More... | |
RealType | block_weight_ |
total weight accumulated in a block More... | |
UPtr< ScalarEstimatorBase > | main_estimator_ |
UPtrVector< ScalarEstimatorBase > | scalar_estimators_ |
estimators of simple scalars More... | |
UPtrVector< OperatorEstBase > | operator_ests_ |
Thread local estimator container/accumulator.
Stepping away from the CloneManger + clones design which creates EstimatorManagers Which operate differently based on internal switches.
see EstimatorManagerNew.h for full description of the new design.
Definition at line 38 of file EstimatorManagerCrowd.h.
Definition at line 43 of file EstimatorManagerCrowd.h.
using MCPWalker = Walker<QMCTraits, PtclOnLatticeTraits> |
Definition at line 41 of file EstimatorManagerCrowd.h.
Definition at line 42 of file EstimatorManagerCrowd.h.
EstimatorManagerCrowd are always spawn of an EstimatorManagerNew.
Definition at line 16 of file EstimatorManagerCrowd.cpp.
References EstimatorManagerCrowd::main_estimator_, EstimatorManagerNew::main_estimator_, EstimatorManagerCrowd::operator_ests_, EstimatorManagerNew::operator_ests_, EstimatorManagerCrowd::scalar_estimators_, and EstimatorManagerNew::scalar_ests_.
|
inline |
void accumulate | ( | const RefVector< MCPWalker > & | walkers, |
const RefVector< ParticleSet > & | psets, | ||
const RefVector< TrialWaveFunction > & | wfns, | ||
const RefVector< QMCHamiltonian > & | hams, | ||
RandomBase< FullPrecRealType > & | rng | ||
) |
Accumulate over all scalar estimators and operator estimators over all walkers in crowd.
Not all estimators make use of all these arguments
[in] | walkers | walkers in crowd |
[in] | psets | walker particle sets |
[in] | wfns | walker wavefunctions |
[in] | hams | walker Hamiltonians |
[in,out] | rng | crowd scope RandomGenerator |
walkers is especially questionable since its really just hiding the full sweep hamiltonian values from the most recent (maybe) QMCHamiltonian evaluate which are written into it by the QMCHamiltonians previous to the accumulate. walkers might additionally be useful because they hold another copy of the dynamic (electron) particle sets coords that could be inconsistent with psets.
As soon as the legacy Estimators are dropped this API should be reviewed with an eye to disentangling ParticleSet, Walker, and QMCHamiltonian.
Definition at line 25 of file EstimatorManagerCrowd.cpp.
References EstimatorManagerCrowd::block_num_samples_, EstimatorManagerCrowd::block_weight_, EstimatorManagerCrowd::main_estimator_, EstimatorManagerCrowd::operator_ests_, EstimatorManagerCrowd::scalar_estimators_, and qmcplusplus::hdf::walkers.
Referenced by Crowd::accumulate(), and qmcplusplus::TEST_CASE().
|
inline |
Definition at line 89 of file EstimatorManagerCrowd.h.
References EstimatorManagerCrowd::block_num_samples_.
|
inline |
Definition at line 90 of file EstimatorManagerCrowd.h.
References EstimatorManagerCrowd::block_weight_.
|
inline |
Definition at line 85 of file EstimatorManagerCrowd.h.
References EstimatorManagerCrowd::main_estimator_.
|
inline |
Definition at line 87 of file EstimatorManagerCrowd.h.
References qmcplusplus::convertUPtrToRefVector(), and EstimatorManagerCrowd::operator_ests_.
|
inline |
Definition at line 86 of file EstimatorManagerCrowd.h.
References qmcplusplus::convertUPtrToRefVector(), and EstimatorManagerCrowd::scalar_estimators_.
void registerListeners | ( | const RefVectorWithLeader< QMCHamiltonian > & | ham_list | ) |
This registers the crowd lever estimators that require listeners into the QMCHamiltonianMultiWalkerResources We really only need a QMCHamiltonian leader but resource acquisition and release works better this way.
Definition at line 42 of file EstimatorManagerCrowd.cpp.
References RefVectorWithLeader< T >::getLeader(), and EstimatorManagerCrowd::operator_ests_.
Referenced by Crowd::Crowd(), and qmcplusplus::TEST_CASE().
|
inline |
return the number of ScalarEstimators
Definition at line 53 of file EstimatorManagerCrowd.h.
References EstimatorManagerCrowd::scalar_estimators_.
void startBlock | ( | int | steps | ) |
start a block
steps | number of steps in a block |
Definition at line 49 of file EstimatorManagerCrowd.cpp.
References EstimatorManagerCrowd::block_num_samples_, EstimatorManagerCrowd::block_weight_, and EstimatorManagerCrowd::operator_ests_.
Referenced by Crowd::startBlock().
void stopBlock | ( | ) |
Definition at line 57 of file EstimatorManagerCrowd.cpp.
Referenced by Crowd::stopBlock().
|
private |
number of samples accumulated in a block
Definition at line 99 of file EstimatorManagerCrowd.h.
Referenced by EstimatorManagerCrowd::accumulate(), EstimatorManagerCrowd::get_block_num_samples(), and EstimatorManagerCrowd::startBlock().
|
private |
total weight accumulated in a block
Definition at line 101 of file EstimatorManagerCrowd.h.
Referenced by EstimatorManagerCrowd::accumulate(), EstimatorManagerCrowd::get_block_weight(), and EstimatorManagerCrowd::startBlock().
|
private |
Definition at line 103 of file EstimatorManagerCrowd.h.
Referenced by EstimatorManagerCrowd::accumulate(), EstimatorManagerCrowd::EstimatorManagerCrowd(), and EstimatorManagerCrowd::get_main_estimator().
|
private |
|
private |
estimators of simple scalars
Definition at line 105 of file EstimatorManagerCrowd.h.
Referenced by EstimatorManagerCrowd::accumulate(), EstimatorManagerCrowd::EstimatorManagerCrowd(), EstimatorManagerCrowd::get_scalar_estimators(), and EstimatorManagerCrowd::size().