![]() |
QMCPACK
|
SkAllEstimator evaluate the structure factor of the target particleset. More...
Public Member Functions | |
SkAllEstimator (ParticleSet &ions, ParticleSet &elns) | |
std::string | getClassName () const override |
return class name More... | |
void | resetTargetParticleSet (ParticleSet &P) override |
Reset the data with the target ParticleSet. More... | |
Return_t | evaluate (ParticleSet &P) override |
Evaluate the local energy contribution of this component. More... | |
void | evaluateIonIon () |
void | addObservables (PropertySetType &plist) |
void | addObservables (PropertySetType &plist, BufferType &collectables) override |
named values to the property list Default implementaton uses addValue(plist_) More... | |
void | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override |
void | setObservables (PropertySetType &plist) override |
Set the values evaluated by this object to plist Default implementation is to assign Value which is updated by evaluate function using my_index_. More... | |
void | setParticlePropertyList (PropertySetType &plist, int offset) override |
bool | put (xmlNodePtr cur) override |
Read the input parameter. More... | |
bool | get (std::ostream &os) const override |
write about the class More... | |
std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) final |
![]() | |
OperatorBase () | |
Construct a new Operator Base object Default and unique empty constructor. More... | |
virtual | ~OperatorBase ()=default |
virtual bool | dependsOnWaveFunction () const |
return true if this operator depends on a wavefunction More... | |
std::bitset< 8 > & | getUpdateMode () noexcept |
get update_mode_ reference More... | |
Return_t | getValue () const noexcept |
get a copy of value_ More... | |
std::string | getName () const noexcept |
getter a copy of my_name_, rvalue small string optimization More... | |
void | setName (const std::string name) noexcept |
Set my_name member, uses small string optimization (pass by value) More... | |
TraceRequest & | getRequest () noexcept |
Get request_ member. More... | |
virtual void | registerObservables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
add to observable descriptor for hdf5 The default implementation is to register a scalar for this->value_ More... | |
virtual void | setHistories (Walker_t &ThisWalker) |
virtual Return_t | evaluateDeterministic (ParticleSet &P) |
Evaluate the local energy contribution of this component, deterministically based on current state. More... | |
virtual void | mw_evaluate (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const |
Evaluate the contribution of this component of multiple walkers. More... | |
virtual void | mw_evaluatePerParticle (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< RealType >> &listeners, const std::vector< ListenerVector< RealType >> &listeners_ions) const |
Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators. More... | |
virtual void | mw_evaluateWithParameterDerivatives (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< ParticleSet > &p_list, const opt_variables_type &optvars, const RecordArray< ValueType > &dlogpsi, RecordArray< ValueType > &dhpsioverpsi) const |
TODO: add docs. More... | |
virtual Return_t | rejectedMove (ParticleSet &P) |
TODO: add docs. More... | |
virtual Return_t | evaluateWithToperator (ParticleSet &P) |
Evaluate the local energy contribution of this component with Toperators updated if requested. More... | |
virtual void | mw_evaluateWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const |
Evaluate the contribution of this component of multiple walkers. More... | |
virtual void | mw_evaluatePerParticleWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< RealType >> &listeners, const std::vector< ListenerVector< RealType >> &listeners_ions) const |
Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators. More... | |
virtual Return_t | evaluateValueAndDerivatives (ParticleSet &P, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) |
Evaluate value and derivatives wrt the optimizables. More... | |
virtual Return_t | evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_term, ParticleSet::ParticlePos &pulay_term) |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
virtual Return_t | evaluateWithIonDerivsDeterministic (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_term, ParticleSet::ParticlePos &pulay_term) |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
virtual void | evaluateOneBodyOpMatrix (ParticleSet &P, const TWFFastDerivWrapper &psi, std::vector< ValueMatrix > &B) |
Evaluate "B" matrix for observable. More... | |
virtual void | evaluateOneBodyOpMatrixForceDeriv (ParticleSet &P, ParticleSet &source, const TWFFastDerivWrapper &psi, const int iat, std::vector< std::vector< ValueMatrix >> &Bforce) |
Evaluate "dB/dR" matrices for observable. More... | |
virtual void | updateSource (ParticleSet &s) |
Update data associated with a particleset. More... | |
virtual Return_t | getEnsembleAverage () |
Return an average value by collective operation. More... | |
virtual void | createResource (ResourceCollection &collection) const |
Initialize a shared resource and hand it to a collection. More... | |
virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const |
Acquire a shared resource from a collection. More... | |
virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const |
Return a shared resource to a collection. More... | |
virtual void | setRandomGenerator (RandomBase< FullPrecRealType > *rng) |
Set the Random Generator object TODO: add docs. More... | |
virtual void | add2Hamiltonian (ParticleSet &qp, TrialWaveFunction &psi, QMCHamiltonian &targetH) |
TODO: add docs. More... | |
virtual void | getRequiredTraces (TraceManager &tm) |
TODO: add docs. More... | |
virtual void | informOfPerParticleListener () |
bool | isClassical () const noexcept |
bool | isQuantum () const noexcept |
bool | isClassicalClassical () const noexcept |
bool | isQuantumClassical () const noexcept |
bool | isQuantumQuantum () const noexcept |
bool | getMode (const int i) const noexcept |
Return the mode i. More... | |
bool | isNonLocal () const noexcept |
TODO: add docs. More... | |
bool | hasListener () const noexcept |
void | contributeTraceQuantities () |
Make trace quantities available. More... | |
void | checkoutTraceQuantities (TraceManager &tm) |
Checkout trace arrays Derived classes must guard individual checkouts using request info. More... | |
void | collectScalarTraces () |
Collect scalar trace data. More... | |
void | deleteTraceQuantities () |
delete trace arrays More... | |
Protected Member Functions | |
void | resize () |
resize the internal data More... | |
![]() | |
virtual void | contributeScalarQuantities () |
virtual void | checkoutScalarQuantities (TraceManager &tm) |
virtual void | collectScalarQuantities () |
virtual void | deleteScalarQuantities () |
virtual void | contributeParticleQuantities () |
virtual void | checkoutParticleQuantities (TraceManager &tm) |
virtual void | deleteParticleQuantities () |
virtual void | setComputeForces (bool compute) |
void | setEnergyDomain (EnergyDomains edomain) |
Set the Energy Domain. More... | |
void | setQuantumDomain (QuantumDomains qdomain) |
set quantum domain More... | |
void | oneBodyQuantumDomain (const ParticleSet &P) |
set quantum domain for one-body operator More... | |
void | twoBodyQuantumDomain (const ParticleSet &P) |
set quantum domain for two-body operator More... | |
void | twoBodyQuantumDomain (const ParticleSet &P1, const ParticleSet &P2) |
set quantum domain for two-body operator More... | |
void | addValue (PropertySetType &plist) |
named values to the property list More... | |
Protected Attributes | |
ParticleSet * | elns |
ParticleSet * | ions |
int | NumSpecies |
number of species More... | |
int | NumeSpecies |
int | NumIonSpecies |
unsigned int | NumK |
number of kpoints More... | |
int | MaxKshell |
number of kshells More... | |
RealType | OneOverN |
normalization factor More... | |
std::vector< int > | Kshell |
kshell counters More... | |
std::vector< RealType > | Kmag |
instantaneous structure factor More... | |
std::vector< RealType > | OneOverDnk |
1.0/degenracy for a kshell More... | |
Vector< RealType > | RhokTot_r |
![]() ![]() | |
Vector< RealType > | RhokTot_i |
Vector< RealType > | values |
bool | hdf5_out |
![]() | |
std::bitset< 8 > | update_mode_ |
set the current update mode More... | |
Return_t | value_ |
current value More... | |
std::string | name_ |
name of this object More... | |
TraceRequest | request_ |
whether traces are being collected More... | |
int | my_index_ |
starting index of this object More... | |
Return_t | new_value_ |
a new value for a proposed move More... | |
Walker_t * | t_walker_ |
reference to the current walker More... | |
bool | streaming_particles_ |
bool | have_required_traces_ |
SkAllEstimator evaluate the structure factor of the target particleset.
<estimator name="sk" type="sk" debug="no">
Definition at line 29 of file SkAllEstimator.h.
SkAllEstimator | ( | ParticleSet & | ions, |
ParticleSet & | elns | ||
) |
Definition at line 26 of file SkAllEstimator.cpp.
References OperatorBase::COLLECTABLE, SkAllEstimator::elns, ParticleSet::getSimulationCell(), ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), ParticleSet::getTotalNum(), SkAllEstimator::hdf5_out, SkAllEstimator::ions, SkAllEstimator::Kmag, SkAllEstimator::Kshell, SkAllEstimator::MaxKshell, SkAllEstimator::NumeSpecies, SkAllEstimator::NumIonSpecies, SkAllEstimator::NumK, SkAllEstimator::OneOverDnk, SkAllEstimator::OneOverN, Vector< T, Alloc >::resize(), SkAllEstimator::RhokTot_i, SkAllEstimator::RhokTot_r, qmcplusplus::sqrt(), OperatorBase::update_mode_, and SkAllEstimator::values.
void addObservables | ( | PropertySetType & | plist | ) |
Definition at line 181 of file SkAllEstimator.cpp.
References RecordNamedProperty< T >::add(), OperatorBase::my_index_, SkAllEstimator::NumK, and RecordNamedProperty< T >::size().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
named values to the property list Default implementaton uses addValue(plist_)
plist | RecordNameProperty |
collectables | Observables that are accumulated by evaluate |
Reimplemented from OperatorBase.
Definition at line 141 of file SkAllEstimator.cpp.
References PooledData< T >::add(), RecordNamedProperty< T >::add(), SkAllEstimator::hdf5_out, OperatorBase::my_index_, SkAllEstimator::NumK, PooledData< T >::size(), and RecordNamedProperty< T >::size().
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 96 of file SkAllEstimator.cpp.
References qmcplusplus::accumulate_elements(), Vector< T, Alloc >::begin(), ParticleSet::Collectables, copy(), qmcplusplus::for(), ParticleSet::getSK(), SkAllEstimator::hdf5_out, OperatorBase::my_index_, SkAllEstimator::NumeSpecies, SkAllEstimator::NumK, StructFact::rhok_i, StructFact::rhok_r, SkAllEstimator::RhokTot_i, SkAllEstimator::RhokTot_r, OperatorBase::t_walker_, SkAllEstimator::values, and Walker< t_traits, p_traits >::Weight.
Referenced by qmcplusplus::TEST_CASE().
void evaluateIonIon | ( | ) |
Definition at line 58 of file SkAllEstimator.cpp.
References ParticleSet::getSimulationCell(), ParticleSet::getSK(), SkAllEstimator::ions, SkAllEstimator::NumIonSpecies, SkAllEstimator::NumK, StructFact::rhok_i, and StructFact::rhok_r.
Referenced by SkAllEstimator::put().
|
overridevirtual |
write about the class
Implements OperatorBase.
Definition at line 278 of file SkAllEstimator.cpp.
References qmcplusplus::app_log(), SkAllEstimator::MaxKshell, SkAllEstimator::NumeSpecies, SkAllEstimator::NumIonSpecies, and SkAllEstimator::NumK.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
|
finalvirtual |
Implements OperatorBase.
Definition at line 292 of file SkAllEstimator.cpp.
References SkAllEstimator::hdf5_out, and OperatorBase::my_index_.
|
overridevirtual |
Read the input parameter.
cur | xml node for a OperatorBase object |
Implements OperatorBase.
Definition at line 253 of file SkAllEstimator.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_log(), SkAllEstimator::evaluateIonIon(), SkAllEstimator::hdf5_out, and OhmmsAttributeSet::put().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 224 of file SkAllEstimator.cpp.
References ParticleSet::getSimulationCell(), SkAllEstimator::hdf5_out, SkAllEstimator::ions, OperatorBase::my_index_, OperatorBase::name_, and SkAllEstimator::NumK.
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 55 of file SkAllEstimator.cpp.
References SkAllEstimator::elns.
|
protected |
resize the internal data
The argument list is not completed
|
overridevirtual |
Set the values evaluated by this object to plist Default implementation is to assign Value which is updated by evaluate function using my_index_.
plist | RecordNameProperty |
Reimplemented from OperatorBase.
Definition at line 211 of file SkAllEstimator.cpp.
References RecordNamedProperty< T >::begin(), Vector< T, Alloc >::begin(), copy(), Vector< T, Alloc >::end(), SkAllEstimator::hdf5_out, OperatorBase::my_index_, and SkAllEstimator::values.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 217 of file SkAllEstimator.cpp.
References RecordNamedProperty< T >::begin(), Vector< T, Alloc >::begin(), copy(), Vector< T, Alloc >::end(), SkAllEstimator::hdf5_out, OperatorBase::my_index_, and SkAllEstimator::values.
|
protected |
Definition at line 52 of file SkAllEstimator.h.
Referenced by SkAllEstimator::resetTargetParticleSet(), and SkAllEstimator::SkAllEstimator().
|
protected |
Definition at line 79 of file SkAllEstimator.h.
Referenced by SkAllEstimator::addObservables(), SkAllEstimator::evaluate(), SkAllEstimator::makeClone(), SkAllEstimator::put(), SkAllEstimator::registerCollectables(), SkAllEstimator::setObservables(), SkAllEstimator::setParticlePropertyList(), and SkAllEstimator::SkAllEstimator().
|
protected |
Definition at line 53 of file SkAllEstimator.h.
Referenced by SkAllEstimator::evaluateIonIon(), SkAllEstimator::registerCollectables(), and SkAllEstimator::SkAllEstimator().
|
protected |
instantaneous structure factor
Definition at line 67 of file SkAllEstimator.h.
Referenced by SkAllEstimator::SkAllEstimator().
|
protected |
kshell counters
Definition at line 65 of file SkAllEstimator.h.
Referenced by SkAllEstimator::SkAllEstimator().
|
protected |
number of kshells
Definition at line 61 of file SkAllEstimator.h.
Referenced by SkAllEstimator::get(), and SkAllEstimator::SkAllEstimator().
|
protected |
Definition at line 56 of file SkAllEstimator.h.
Referenced by SkAllEstimator::evaluate(), SkAllEstimator::get(), and SkAllEstimator::SkAllEstimator().
|
protected |
Definition at line 57 of file SkAllEstimator.h.
Referenced by SkAllEstimator::evaluateIonIon(), SkAllEstimator::get(), and SkAllEstimator::SkAllEstimator().
|
protected |
number of kpoints
Definition at line 59 of file SkAllEstimator.h.
Referenced by SkAllEstimator::addObservables(), SkAllEstimator::evaluate(), SkAllEstimator::evaluateIonIon(), SkAllEstimator::get(), SkAllEstimator::registerCollectables(), and SkAllEstimator::SkAllEstimator().
|
protected |
number of species
Definition at line 55 of file SkAllEstimator.h.
|
protected |
1.0/degenracy for a kshell
Definition at line 69 of file SkAllEstimator.h.
Referenced by SkAllEstimator::SkAllEstimator().
|
protected |
normalization factor
Definition at line 63 of file SkAllEstimator.h.
Referenced by SkAllEstimator::SkAllEstimator().
Definition at line 71 of file SkAllEstimator.h.
Referenced by SkAllEstimator::evaluate(), and SkAllEstimator::SkAllEstimator().
for species index
Definition at line 71 of file SkAllEstimator.h.
Referenced by SkAllEstimator::evaluate(), and SkAllEstimator::SkAllEstimator().
Definition at line 72 of file SkAllEstimator.h.
Referenced by SkAllEstimator::evaluate(), SkAllEstimator::setObservables(), SkAllEstimator::setParticlePropertyList(), and SkAllEstimator::SkAllEstimator().