![]() |
QMCPACK
|
Handle an ensemble average of Hamiltonian components. More...
Public Member Functions | |
CollectablesEstimator (QMCHamiltonian &h) | |
constructor More... | |
CollectablesEstimator * | clone () override |
implement virtual function More... | |
void | registerObservables (std::vector< ObservableHelper > &h5dec, hdf_archive &file) override |
add descriptors of observables to utilize hdf5 More... | |
void | add2Record (RecordListType &record) override |
add the local energy, variance and all the Hamiltonian components to the scalar record container More... | |
void | accumulate (const MCWalkerConfiguration &W, WalkerIterator first, WalkerIterator last, RealType wgt) override |
do nothing with accumulate More... | |
void | accumulate (const RefVector< MCPWalker > &walkers) override |
a virtual function to accumulate observables or collectables More... | |
void | accumulate_all (const MCWalkerConfiguration::Buffer_t &data, RealType wgt) |
accumulate the collectables More... | |
std::string | getName () const override |
const std::string & | getSubTypeStr () const override |
String representation of the derived type of the ScalarEstimator. More... | |
![]() | |
ScalarEstimatorBase () | |
virtual | ~ScalarEstimatorBase () |
virtual bool | isMainEstimator () const |
Is this estimator a main estimator i.e. the estimator required for a particular driver. More... | |
RealType | average (int i=0) const |
return average of the More... | |
RealType | variance (int i=0) const |
return a variance More... | |
std::pair< RealType, RealType > | operator[] (int i) const |
retrun mean and variance More... | |
virtual int | size () const |
return the size of scalars it manages More... | |
void | clear () |
clear the scalars to collect More... | |
template<typename IT > | |
void | takeBlockAverage (IT first) |
take block average and write to a common container More... | |
template<typename IT > | |
void | takeBlockAverage (IT first, IT first_sq) |
take block average and write to common containers for values and squared values More... | |
template<typename IT > | |
void | addAccumulated (IT first) |
add the block accumulated scalars More... | |
virtual void | add2Record (RecordNamedProperty< RealType > &record)=0 |
add the content of the scalar estimator to the record More... | |
Public Attributes | |
const std::string | type_str = "ColletiblesEstimatorNotSupportedInBatchedVersion" |
![]() | |
int | FirstIndex |
first index within an record of the first element handled by an object More... | |
int | LastIndex |
last index within an record of the first element handled by an object More... | |
std::vector< accumulator_type > | scalars |
scalars to be measured More... | |
std::vector< accumulator_type > | scalars_saved |
scalars saved More... | |
Private Attributes | |
const QMCHamiltonian & | refH |
save the reference hamiltonian More... | |
Additional Inherited Members | |
![]() | |
using | RealType = QMCTraits::FullPrecRealType |
using | accumulator_type = accumulator_set< RealType > |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | MCPWalker = Walker< QMCTraits, PtclOnLatticeTraits > |
using | WalkerIterator = MCWalkerConfiguration::const_iterator |
using | RecordListType = RecordNamedProperty< RealType > |
Handle an ensemble average of Hamiltonian components.
Definition at line 24 of file CollectablesEstimator.h.
constructor
h | QMCHamiltonian to define the components |
Definition at line 20 of file CollectablesEstimator.cpp.
References ScalarEstimatorBase::scalars, ScalarEstimatorBase::scalars_saved, and QMCHamiltonian::sizeOfCollectables().
Referenced by CollectablesEstimator::clone().
|
inlineoverridevirtual |
do nothing with accumulate
Implements ScalarEstimatorBase.
Definition at line 43 of file CollectablesEstimator.h.
a virtual function to accumulate observables or collectables
global_walkers_ | walkers per ranks or walkers total? |
RefVector | of MCPWalkers |
wgt | weight or maybe norm |
Implements ScalarEstimatorBase.
Definition at line 45 of file CollectablesEstimator.h.
|
inline |
accumulate the collectables
Definition at line 48 of file CollectablesEstimator.h.
References ScalarEstimatorBase::scalars, and PooledData< T >::size().
|
override |
add the local energy, variance and all the Hamiltonian components to the scalar record container
record | storage of scalar records (name,value) |
Do not add Collectables to record
Definition at line 41 of file CollectablesEstimator.cpp.
References ScalarEstimatorBase::clear(), ScalarEstimatorBase::FirstIndex, ScalarEstimatorBase::LastIndex, ScalarEstimatorBase::scalars, and RecordNamedProperty< T >::size().
|
overridevirtual |
implement virtual function
Implements ScalarEstimatorBase.
Definition at line 34 of file CollectablesEstimator.cpp.
References CollectablesEstimator::CollectablesEstimator().
|
inlineoverridevirtual |
Implements ScalarEstimatorBase.
Definition at line 54 of file CollectablesEstimator.h.
|
inlineoverridevirtual |
String representation of the derived type of the ScalarEstimator.
Implements ScalarEstimatorBase.
Definition at line 57 of file CollectablesEstimator.h.
References CollectablesEstimator::type_str.
|
overridevirtual |
add descriptors of observables to utilize hdf5
h5desc | descriptor of a data stored in a h5 group |
file | file to which each statistical data will be stored |
Implements ScalarEstimatorBase.
Definition at line 26 of file CollectablesEstimator.cpp.
References ScalarEstimatorBase::FirstIndex, qmcplusplus::lower_bound(), CollectablesEstimator::refH, and QMCHamiltonian::registerCollectables().
|
private |
save the reference hamiltonian
Definition at line 27 of file CollectablesEstimator.h.
Referenced by CollectablesEstimator::registerObservables().
const std::string type_str = "ColletiblesEstimatorNotSupportedInBatchedVersion" |
Definition at line 56 of file CollectablesEstimator.h.
Referenced by CollectablesEstimator::getSubTypeStr().