![]() |
QMCPACK
|
Public Types | |
enum | { ENERGY_INDEX, ENERGY_SQ_INDEX, WEIGHT_INDEX, LE_INDEX } |
![]() | |
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 > |
Public Member Functions | |
CSEnergyEstimator (const QMCHamiltonian &h, int hcopy=1) | |
constructor More... | |
CSEnergyEstimator (CSLocalEnergyInput &&input, const QMCHamiltonian &h) | |
std::string | getName () const override |
RealType | getUmbrellaWeight (int ipsi) |
void | accumulate (const Walker_t &awalker, RealType wgt) |
void | accumulate (const MCWalkerConfiguration &W, WalkerIterator first, WalkerIterator last, RealType wgt) override |
void | accumulate (const RefVector< MCPWalker > &walkers) override |
a virtual function to accumulate observables or collectables More... | |
void | add2Record (RecordNamedProperty< RealType > &record) override |
add the local energy, variance and all the Hamiltonian components to the scalar record container More... | |
void | registerObservables (std::vector< ObservableHelper > &h5dec, hdf_archive &gid) override |
add descriptors of observables to utilize hdf5 More... | |
CSEnergyEstimator * | clone () override |
clone the object More... | |
const std::string & | getSubTypeStr () const override |
String representation of the derived type of the ScalarEstimator. More... | |
void | evaluateDiff () |
bool | isMainEstimator () const override |
Is this estimator a main estimator i.e. the estimator required for a particular driver. More... | |
![]() | |
ScalarEstimatorBase () | |
virtual | ~ScalarEstimatorBase () |
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 | accumulate (const MCWalkerConfiguration &W, WalkerIterator first, WalkerIterator last, RealType wgt)=0 |
a virtual function to accumulate observables or collectables More... | |
virtual void | add2Record (RecordNamedProperty< RealType > &record)=0 |
add the content of the scalar estimator to the record More... | |
Public Attributes | |
int | NumCopies |
number of correlated systems More... | |
int | FirstHamiltonian |
index of the starting Hamiltonian component More... | |
int | LastHamiltonian |
index of the ending Hamiltonian component More... | |
std::vector< RealType > | uweights |
save umbrella weights More... | |
Matrix< RealType > | tmp_data |
temporary dat More... | |
std::vector< std::string > | h_components |
name of hamiltonian components More... | |
const CSLocalEnergyInput | input_ |
![]() | |
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... | |
Definition at line 28 of file CSEnergyEstimator.h.
anonymous enum |
Enumerator | |
---|---|
ENERGY_INDEX | |
ENERGY_SQ_INDEX | |
WEIGHT_INDEX | |
LE_INDEX |
Definition at line 31 of file CSEnergyEstimator.h.
CSEnergyEstimator | ( | const QMCHamiltonian & | h, |
int | hcopy = 1 |
||
) |
constructor
h | QMCHamiltonian to define the components |
hcopy | number of copies of QMCHamiltonians |
Definition at line 32 of file CSEnergyEstimator.cpp.
References CSEnergyEstimator::FirstHamiltonian, QMCHamiltonian::getObservableName(), CSEnergyEstimator::h_components, CSEnergyEstimator::LastHamiltonian, CSEnergyEstimator::NumCopies, ScalarEstimatorBase::scalars, ScalarEstimatorBase::scalars_saved, QMCHamiltonian::sizeOfObservables(), and QMCHamiltonian::startIndex().
Referenced by CSEnergyEstimator::clone().
CSEnergyEstimator | ( | CSLocalEnergyInput && | input, |
const QMCHamiltonian & | h | ||
) |
Definition at line 50 of file CSEnergyEstimator.cpp.
References CSEnergyEstimator::FirstHamiltonian, CSLocalEnergyInput::get_n_psi(), QMCHamiltonian::getObservableName(), CSEnergyEstimator::h_components, CSEnergyEstimator::input_, CSEnergyEstimator::LastHamiltonian, CSEnergyEstimator::NumCopies, ScalarEstimatorBase::scalars, ScalarEstimatorBase::scalars_saved, QMCHamiltonian::sizeOfObservables(), and QMCHamiltonian::startIndex().
Definition at line 126 of file CSEnergyEstimator.cpp.
References Matrix< T, Alloc >::cols(), copy(), Matrix< T, Alloc >::data(), CSEnergyEstimator::FirstHamiltonian, Walker< t_traits, p_traits >::getPropertyBase(), CSEnergyEstimator::LastHamiltonian, mean(), CSEnergyEstimator::NumCopies, ScalarEstimatorBase::scalars, CSEnergyEstimator::tmp_data, and CSEnergyEstimator::uweights.
Referenced by CSEnergyEstimator::accumulate().
|
inlineoverride |
Definition at line 70 of file CSEnergyEstimator.h.
References CSEnergyEstimator::accumulate().
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 81 of file CSEnergyEstimator.h.
References CSEnergyEstimator::accumulate(), qmcplusplus::walker, and qmcplusplus::hdf::walkers.
|
override |
add the local energy, variance and all the Hamiltonian components to the scalar record container
record | storage of scalar records (name,value) |
Definition at line 74 of file CSEnergyEstimator.cpp.
References RecordNamedProperty< T >::add(), ScalarEstimatorBase::clear(), ScalarEstimatorBase::FirstIndex, CSEnergyEstimator::h_components, ScalarEstimatorBase::LastIndex, CSEnergyEstimator::NumCopies, Matrix< T, Alloc >::resize(), RecordNamedProperty< T >::size(), CSEnergyEstimator::tmp_data, and CSEnergyEstimator::uweights.
|
overridevirtual |
clone the object
Implements ScalarEstimatorBase.
Definition at line 69 of file CSEnergyEstimator.cpp.
References CSEnergyEstimator::CSEnergyEstimator().
void evaluateDiff | ( | ) |
|
inlineoverridevirtual |
Implements ScalarEstimatorBase.
Definition at line 60 of file CSEnergyEstimator.h.
|
inlineoverridevirtual |
String representation of the derived type of the ScalarEstimator.
Implements ScalarEstimatorBase.
Definition at line 93 of file CSEnergyEstimator.h.
References CSLocalEnergyInput::get_type(), and CSEnergyEstimator::input_.
|
inline |
Definition at line 62 of file CSEnergyEstimator.h.
References CSEnergyEstimator::LE_INDEX, ScalarEstimatorBase::scalars_saved, and CSEnergyEstimator::WEIGHT_INDEX.
|
inlineoverridevirtual |
Is this estimator a main estimator i.e. the estimator required for a particular driver.
Reimplemented from ScalarEstimatorBase.
Definition at line 96 of file CSEnergyEstimator.h.
|
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 121 of file CSEnergyEstimator.cpp.
int FirstHamiltonian |
index of the starting Hamiltonian component
Definition at line 42 of file CSEnergyEstimator.h.
Referenced by CSEnergyEstimator::accumulate(), and CSEnergyEstimator::CSEnergyEstimator().
std::vector<std::string> h_components |
name of hamiltonian components
Definition at line 50 of file CSEnergyEstimator.h.
Referenced by CSEnergyEstimator::add2Record(), and CSEnergyEstimator::CSEnergyEstimator().
const CSLocalEnergyInput input_ |
Definition at line 51 of file CSEnergyEstimator.h.
Referenced by CSEnergyEstimator::CSEnergyEstimator(), and CSEnergyEstimator::getSubTypeStr().
int LastHamiltonian |
index of the ending Hamiltonian component
Definition at line 44 of file CSEnergyEstimator.h.
Referenced by CSEnergyEstimator::accumulate(), and CSEnergyEstimator::CSEnergyEstimator().
int NumCopies |
number of correlated systems
Definition at line 40 of file CSEnergyEstimator.h.
Referenced by CSEnergyEstimator::accumulate(), CSEnergyEstimator::add2Record(), and CSEnergyEstimator::CSEnergyEstimator().
temporary dat
Definition at line 48 of file CSEnergyEstimator.h.
Referenced by CSEnergyEstimator::accumulate(), and CSEnergyEstimator::add2Record().
std::vector<RealType> uweights |
save umbrella weights
Definition at line 46 of file CSEnergyEstimator.h.
Referenced by CSEnergyEstimator::accumulate(), and CSEnergyEstimator::add2Record().