![]() |
QMCPACK
|
QMCHamiltonian and its component, OperatorBase. More...
Classes | |
class | BareKineticEnergy |
Evaluate the kinetic energy with a single mass. More... | |
struct | CoulombPBCAA |
Calculates the AA Coulomb potential using PBCs. More... | |
class | CoulombPBCAB |
Calculates the AA Coulomb potential using PBCs. More... | |
struct | L2Potential |
Evaluate the L2 potentials around each ion. More... | |
struct | LocalECPotential |
Evaluate the local potentials (either pseudo or full core) around each ion. More... | |
class | MPC |
Calculates the Model Periodic Coulomb potential using PBCs. More... | |
class | NonLocalECPotential |
Evaluate the semi local potentials. More... | |
class | OperatorBase |
An abstract class for Local Energy operators. More... | |
struct | Pressure |
Evaluate the Bare Pressure. More... | |
class | SpaceWarpTransformation |
This implements the differential space warp transformation for ZVZB estimators given by Sorella & Capriotti J. More... | |
QMCHamiltonian and its component, OperatorBase.
class qmcplusplus::BareKineticEnergy |
Evaluate the kinetic energy with a single mass.
The unit of the mass is AU, i.e., the electron mass . To evaluate the Bare Kinetic part of the local energy
it is useful to use the following trick
Definition at line 43 of file BareKineticEnergy.h.
Public Member Functions | |
BareKineticEnergy (ParticleSet &p, TrialWaveFunction &psi) | |
constructor with particleset More... | |
~BareKineticEnergy () override | |
destructor More... | |
bool | dependsOnWaveFunction () const override |
return true if this operator depends on a wavefunction More... | |
std::string | getClassName () const override |
return class name More... | |
void | resetTargetParticleSet (ParticleSet &p) override |
Reset the data with the target ParticleSet. More... | |
void | contributeParticleQuantities () override |
void | checkoutParticleQuantities (TraceManager &tm) override |
void | deleteParticleQuantities () override |
Return_t | evaluate (ParticleSet &P) override |
Evaluate the local energy contribution of this component. More... | |
Return_t | evaluateValueAndDerivatives (ParticleSet &P, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
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 override |
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 >> &ion_listeners) const override |
Evaluate the contribution of this component for multiple walkers reporting to registered listeners from Estimators. More... | |
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 >> &ion_listeners) const override |
For BareKineticEnergy since it does override any Toperator evals this needs to decay to mw_evaluatePerParticle. More... | |
Return_t | evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override |
Function to compute the value, direct ionic gradient terms, and pulay terms for the local kinetic energy. More... | |
void | evaluateOneBodyOpMatrix (ParticleSet &P, const TWFFastDerivWrapper &psi, std::vector< ValueMatrix > &B) override |
Evaluate "B" matrix for observable. More... | |
void | evaluateOneBodyOpMatrixForceDeriv (ParticleSet &P, ParticleSet &source, const TWFFastDerivWrapper &psi, const int iat, std::vector< std::vector< ValueMatrix >> &Bforce) override |
Evaluate "dB/dR" matrices for observable. More... | |
Return_t | evaluate_sp (ParticleSet &P) |
Return_t | evaluate_orig (ParticleSet &P) |
bool | put (xmlNodePtr) override |
implements the virtual function. More... | |
bool | get (std::ostream &os) const override |
write about the class More... | |
std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) final |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to a collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
acquire a shared resource from a collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
return a shared resource to a collection More... | |
![]() | |
OperatorBase () | |
Construct a new Operator Base object Default and unique empty constructor. More... | |
virtual | ~OperatorBase ()=default |
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 | addObservables (PropertySetType &plist, BufferType &collectables) |
named values to the property list Default implementaton uses addValue(plist_) 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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
virtual void | setObservables (PropertySetType &plist) |
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... | |
virtual void | setParticlePropertyList (PropertySetType &plist, int offset) |
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 | 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 | updateSource (ParticleSet &s) |
Update data associated with a particleset. More... | |
virtual Return_t | getEnsembleAverage () |
Return an average value by collective operation. 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... | |
Private Attributes | |
bool | same_mass_ |
true, if all the species have the same mass More... | |
FullPrecRealType | particle_mass_ |
mass of the particle More... | |
FullPrecRealType | one_over_2m_ |
![]() | |
std::vector< FullPrecRealType > | minus_over_2m_ |
minus_over_2m_[i] = ![]() | |
Array< TraceReal, 1 > * | t_sample_ |
Array< TraceComp, 1 > * | t_sample_comp_ |
Array< TraceComp, 2 > * | p_sample_ |
ParticleSet & | ps_ |
ResourceHandle< MultiWalkerResource > | mw_res_ |
TrialWaveFunction & | psi_ |
Additional Inherited Members | |
![]() | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
virtual void | contributeScalarQuantities () |
virtual void | checkoutScalarQuantities (TraceManager &tm) |
virtual void | collectScalarQuantities () |
virtual void | deleteScalarQuantities () |
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... | |
![]() | |
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_ |
BareKineticEnergy | ( | ParticleSet & | p, |
TrialWaveFunction & | psi | ||
) |
constructor with particleset
target | particleset |
Store mass per species and use SameMass to choose the methods. if SameMass, probably faster and easy to vectorize but no impact on the performance.
Definition at line 47 of file BareKineticEnergy.cpp.
References qmcplusplus::abs(), qmcplusplus::Units::charge::e, ParticleSet::getSpeciesSet(), OperatorBase::KINETIC, BareKineticEnergy::minus_over_2m_, BareKineticEnergy::one_over_2m_, OperatorBase::oneBodyQuantumDomain(), OperatorBase::OPTIMIZABLE, BareKineticEnergy::particle_mass_, BareKineticEnergy::same_mass_, OperatorBase::setEnergyDomain(), and OperatorBase::update_mode_.
|
overridedefault |
destructor
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from OperatorBase.
Definition at line 446 of file BareKineticEnergy.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), ResourceCollection::lendResource(), and BareKineticEnergy::mw_res_.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 82 of file BareKineticEnergy.cpp.
References TraceManager::checkout_complex(), TraceManager::checkout_real(), QMCTraits::DIM, OperatorBase::name_, BareKineticEnergy::p_sample_, BareKineticEnergy::ps_, OperatorBase::request_, TraceRequest::streaming_array(), OperatorBase::streaming_particles_, BareKineticEnergy::t_sample_, and BareKineticEnergy::t_sample_comp_.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 75 of file BareKineticEnergy.cpp.
References TraceRequest::contribute_array(), OperatorBase::name_, and OperatorBase::request_.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from OperatorBase.
Definition at line 440 of file BareKineticEnergy.cpp.
References ResourceCollection::addResource().
Referenced by qmcplusplus::testElecCase().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 94 of file BareKineticEnergy.cpp.
References BareKineticEnergy::p_sample_, OperatorBase::streaming_particles_, BareKineticEnergy::t_sample_, and BareKineticEnergy::t_sample_comp_.
|
overridevirtual |
return true if this operator depends on a wavefunction
Reimplemented from OperatorBase.
Definition at line 68 of file BareKineticEnergy.cpp.
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 106 of file BareKineticEnergy.cpp.
References qmcplusplus::CplxDot(), qmcplusplus::CplxSum(), qmcplusplus::Dot(), BareKineticEnergy::evaluate_sp(), ParticleSet::first(), ParticleSet::G, ParticleSet::L, qmcplusplus::laplacian(), ParticleSet::last(), BareKineticEnergy::minus_over_2m_, BareKineticEnergy::one_over_2m_, BareKineticEnergy::same_mass_, OperatorBase::streaming_particles_, qmcplusplus::Sum(), and OperatorBase::value_.
Referenced by BareKineticEnergy::evaluateValueAndDerivatives(), and qmcplusplus::TEST_CASE().
Return_t evaluate_orig | ( | ParticleSet & | P | ) |
Definition at line 599 of file BareKineticEnergy.cpp.
References qmcplusplus::Dot(), ParticleSet::first(), ParticleSet::G, ParticleSet::L, qmcplusplus::laplacian(), ParticleSet::last(), BareKineticEnergy::minus_over_2m_, BareKineticEnergy::one_over_2m_, BareKineticEnergy::same_mass_, qmcplusplus::Sum(), and OperatorBase::value_.
Referenced by BareKineticEnergy::evaluate_sp().
Return_t evaluate_sp | ( | ParticleSet & | P | ) |
Definition at line 537 of file BareKineticEnergy.cpp.
References qmcplusplus::abs(), APP_ABORT, qmcplusplus::app_log(), QMCTraits::DIM, qmcplusplus::dot(), BareKineticEnergy::evaluate_orig(), ParticleSet::first(), ParticleSet::G, ParticleSet::getTotalNum(), ParticleSet::L, ParticleSet::last(), BareKineticEnergy::minus_over_2m_, BareKineticEnergy::one_over_2m_, BareKineticEnergy::p_sample_, qmcplusplus::real(), qmcplusplus::Units::time::s, BareKineticEnergy::same_mass_, Array< T, D, ALLOC >::sum(), BareKineticEnergy::t_sample_, BareKineticEnergy::t_sample_comp_, TraceManager::trace_tol, and OperatorBase::value_.
Referenced by BareKineticEnergy::evaluate().
|
overridevirtual |
Evaluate "B" matrix for observable.
Filippi scheme for computing fast derivatives.
[in] | P | target particle set (electrons) |
[in] | psi,Trial | Wavefunction wrapper for fast derivatives. |
[in,out] | B. | List of B matrices for each species. |
Reimplemented from OperatorBase.
Definition at line 285 of file BareKineticEnergy.cpp.
References B(), qmcplusplus::dot(), TWFFastDerivWrapper::evaluateJastrowVGL(), ParticleSet::first(), TWFFastDerivWrapper::getEGradELaplM(), ParticleSet::getTotalNum(), TWFFastDerivWrapper::getTWFGroupIndex(), ParticleSet::groups(), ParticleSet::last(), BareKineticEnergy::minus_over_2m_, TWFFastDerivWrapper::numOrbitals(), and Vector< T, Alloc >::resize().
|
overridevirtual |
Evaluate "dB/dR" matrices for observable.
Filippi scheme for computing fast derivatives.
[in] | P,target | particle set (electrons) |
[in] | source,ion | particle set |
[in] | psi,Trial | Wavefunction wrapper for fast derivatives. |
[in] | iat |
Reimplemented from OperatorBase.
Definition at line 344 of file BareKineticEnergy.cpp.
References qmcplusplus::dot(), TWFFastDerivWrapper::evaluateJastrowGradSource(), TWFFastDerivWrapper::evaluateJastrowVGL(), ParticleSet::first(), TWFFastDerivWrapper::getEGradELaplM(), TWFFastDerivWrapper::getIonGradIonGradELaplM(), ParticleSet::getTotalNum(), TWFFastDerivWrapper::getTWFGroupIndex(), ParticleSet::groups(), ParticleSet::last(), BareKineticEnergy::minus_over_2m_, TWFFastDerivWrapper::numOrbitals(), OHMMS_DIM, and Vector< T, Alloc >::resize().
|
override |
Definition at line 139 of file BareKineticEnergy.cpp.
References BareKineticEnergy::evaluate(), TrialWaveFunction::evaluateDerivatives(), and BareKineticEnergy::psi_.
|
overridevirtual |
Function to compute the value, direct ionic gradient terms, and pulay terms for the local kinetic energy.
This general function represents the OperatorBase interface for computing. For an operator {O}, this function will return {{O}}{}, {({O})}{}, and {{O}}{} - {{O}}{}{ }{}. These are referred to as Value, HF term, and pulay term respectively.
P | electron particle set. |
ions | ion particle set |
psi | Trial wave function object. |
hf_terms | 3Nion dimensional object. All direct force terms, or ionic gradient of operator itself. Contribution of this operator is ADDED onto hf_terms. |
pulay_terms | The terms coming from ionic gradients of trial wavefunction. Contribution of this operator is ADDED onto pulay_terms. |
Reimplemented from OperatorBase.
Definition at line 183 of file BareKineticEnergy.cpp.
References qmcplusplus::convertToReal(), qmcplusplus::dlaplacian(), qmcplusplus::Dot(), TrialWaveFunction::evalGradSource(), TrialWaveFunction::evaluateLog(), ParticleSet::first(), ParticleSet::G, ParticleSet::getTotalNum(), ParticleSet::L, qmcplusplus::laplacian(), ParticleSet::last(), BareKineticEnergy::minus_over_2m_, OHMMS_DIM, BareKineticEnergy::one_over_2m_, BareKineticEnergy::same_mass_, qmcplusplus::Sum(), and OperatorBase::value_.
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
write about the class
Implements OperatorBase.
Definition at line 626 of file BareKineticEnergy.cpp.
|
overridevirtual |
|
finalvirtual |
Implements OperatorBase.
Definition at line 632 of file BareKineticEnergy.cpp.
|
override |
Evaluate the contribution of this component for multiple walkers reporting to registered listeners from Estimators.
Definition at line 460 of file BareKineticEnergy.cpp.
References qmcplusplus::dot(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), OperatorBase::name_, BareKineticEnergy::one_over_2m_, qmcplusplus::pset, qmcplusplus::real(), Vector< T, Alloc >::resize(), qmcplusplus::Units::time::s, and OperatorBase::value_.
Referenced by BareKineticEnergy::mw_evaluatePerParticleWithToperator().
|
override |
For BareKineticEnergy since it does override any Toperator evals this needs to decay to mw_evaluatePerParticle.
This method must be overrideen since the default behavior is to decay to mw_evaluateWithToperator and its default behavior is to call mw_evaluate.
Definition at line 526 of file BareKineticEnergy.cpp.
References BareKineticEnergy::mw_evaluatePerParticle().
|
override |
Definition at line 150 of file BareKineticEnergy.cpp.
References RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), OperatorBase::mw_evaluate(), TrialWaveFunction::mw_evaluateParameterDerivatives(), and BareKineticEnergy::psi_.
|
overridevirtual |
implements the virtual function.
Nothing is done but should check the mass
Implements OperatorBase.
Definition at line 624 of file BareKineticEnergy.cpp.
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
return a shared resource to a collection
Reimplemented from OperatorBase.
Definition at line 453 of file BareKineticEnergy.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), and ResourceCollection::takebackResource().
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 72 of file BareKineticEnergy.cpp.
|
private |
minus_over_2m_[i] = for the ith species
Definition at line 169 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::BareKineticEnergy(), BareKineticEnergy::evaluate(), BareKineticEnergy::evaluate_orig(), BareKineticEnergy::evaluate_sp(), BareKineticEnergy::evaluateOneBodyOpMatrix(), BareKineticEnergy::evaluateOneBodyOpMatrixForceDeriv(), and BareKineticEnergy::evaluateWithIonDerivs().
|
private |
Definition at line 179 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::acquireResource().
|
private |
Definition at line 174 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::checkoutParticleQuantities(), BareKineticEnergy::deleteParticleQuantities(), and BareKineticEnergy::evaluate_sp().
|
private |
mass of the particle
Definition at line 164 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::BareKineticEnergy().
|
private |
Definition at line 177 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::checkoutParticleQuantities().
|
private |
Definition at line 182 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::evaluateValueAndDerivatives(), and BareKineticEnergy::mw_evaluateWithParameterDerivatives().
|
private |
true, if all the species have the same mass
Definition at line 161 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::BareKineticEnergy(), BareKineticEnergy::evaluate(), BareKineticEnergy::evaluate_orig(), BareKineticEnergy::evaluate_sp(), and BareKineticEnergy::evaluateWithIonDerivs().
Definition at line 172 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::checkoutParticleQuantities(), BareKineticEnergy::deleteParticleQuantities(), and BareKineticEnergy::evaluate_sp().
Definition at line 173 of file BareKineticEnergy.h.
Referenced by BareKineticEnergy::checkoutParticleQuantities(), BareKineticEnergy::deleteParticleQuantities(), and BareKineticEnergy::evaluate_sp().
struct qmcplusplus::CoulombPBCAA |
Calculates the AA Coulomb potential using PBCs.
Functionally identical to CoulombPBCAA but uses a templated version of LRHandler.
Definition at line 38 of file CoulombPBCAA.h.
Public Types | |
using | LRHandlerType = LRCoulombSingleton::LRHandlerType |
using | GridType = LRCoulombSingleton::GridType |
using | RadFunctorType = LRCoulombSingleton::RadFunctorType |
using | mRealType = LRHandlerType::mRealType |
using | OffloadSpline = OneDimCubicSplineLinearGrid< LRCoulombSingleton::pRealType > |
![]() | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | Real = QMCTraits::RealType |
cheat, need to use virtual inheriance to clean up More... | |
Public Member Functions | |
CoulombPBCAA (ParticleSet &ref, bool active, bool computeForces, bool use_offload) | |
constructor More... | |
~CoulombPBCAA () override | |
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 | mw_evaluate (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const override |
Evaluate the contribution of this component of multiple walkers. More... | |
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 >> &ion_listeners) const override |
Evaluate the contribution of this component of multiple walkers per particle reporting to registered listeners from Estimators. More... | |
Return_t | evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
void | updateSource (ParticleSet &s) override |
Update data associated with a particleset. More... | |
bool | put (xmlNodePtr cur) override |
Do nothing. More... | |
bool | get (std::ostream &os) const override |
write about the class More... | |
std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) override |
void | informOfPerParticleListener () override |
Inform objects associated with this operator of per particle listeners. More... | |
void | contributeParticleQuantities () override |
void | checkoutParticleQuantities (TraceManager &tm) override |
Return_t | evaluate_sp (ParticleSet &P) |
void | deleteParticleQuantities () override |
Return_t | evalSR (ParticleSet &P) |
Return_t | evalLR (ParticleSet &P) |
Return_t | evalSRwithForces (ParticleSet &P) |
Return_t | evalLRwithForces (ParticleSet &P) |
Return_t | evalConsts (bool report=true) |
void | addObservables (PropertySetType &plist, BufferType &collectables) override |
named values to the property list Default implementaton uses addValue(plist_) More... | |
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 |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to a collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
acquire a shared resource from a collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
return a shared resource to a collection More... | |
RealType | get_madelung_constant () const |
![]() | |
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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
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_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 | 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 Return_t | getEnsembleAverage () |
Return an average value by collective operation. 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... | |
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... | |
![]() | |
Real | g (Real r) |
void | initVarReduction (Real rcut, int m, int numFuncs) |
ForceBase (ParticleSet &ions, ParticleSet &elns) | |
virtual | ~ForceBase () |
void | registerObservablesF (std::vector< ObservableHelper > &h5list, hdf_archive &file) const |
void | addObservablesF (QMCTraits::PropertySetType &plist) |
void | addObservablesStress (QMCTraits::PropertySetType &plist) |
void | setObservablesF (QMCTraits::PropertySetType &plist) |
void | setObservablesStress (QMCTraits::PropertySetType &plist) |
void | setParticleSetF (QMCTraits::PropertySetType &plist, int offset) |
void | setParticleSetStress (QMCTraits::PropertySetType &plist, int offset) |
bool | getAddIonIon () const noexcept |
void | setAddIonIon (bool val) noexcept |
const ParticleSet::ParticlePos & | getForces () const noexcept |
void | setForces (const ParticleSet::ParticlePos &forces) |
void | setForces (Real val) |
const ParticleSet::ParticlePos & | getForcesIonIon () const noexcept |
void | setForcesIonIon (const ParticleSet::ParticlePos &forces_ion_ion) |
const SymTensor< Real, OHMMS_DIM > & | getStressIonIon () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressEE () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressEI () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressKin () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStress () const noexcept |
Static Public Member Functions | |
static std::vector< Return_t > | mw_evalSR_offload (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< ParticleSet > &p_list) |
Public Attributes | |
std::shared_ptr< LRHandlerType > | AA |
energy-optimized long range handle. Should be const LRHandlerType eventually More... | |
std::shared_ptr< const RadFunctorType > | rVs |
energy-optimized short range pair potential More... | |
std::shared_ptr< const OffloadSpline > | rVs_offload |
the same as rVs but can be used inside OpenMP offload regions More... | |
std::shared_ptr< const LRHandlerType > | dAA |
force-optimized long range handle More... | |
std::shared_ptr< const RadFunctorType > | rVsforce |
force-optimized short range pair potential More... | |
bool | is_active |
bool | FirstTime |
int | SourceID |
int | NumSpecies |
int | ChargeAttribIndx |
int | MemberAttribIndx |
int | NumCenters |
Return_t | myConst |
RealType | myRcut |
cutoff radius of the short-range part More... | |
std::string | PtclRefName |
std::vector< RealType > | Zat |
std::vector< RealType > | Zspec |
std::shared_ptr< Vector< RealType, OffloadPinnedAllocator< RealType > > > | Zat_offload |
std::vector< int > | NofSpecies |
std::vector< int > | SpeciesID |
Matrix< RealType > | SR2 |
Vector< RealType > | dSR |
Vector< ComplexType > | del_eikr |
bool | ComputeForces |
Flag for whether to compute forces or not. More... | |
const bool | quasi2d |
Flag for whether to use quasi-2D Ewald. More... | |
Array< TraceReal, 1 > * | V_sample |
Array< TraceReal, 1 > | V_const |
ParticleSet & | Ps |
Private Member Functions | |
void | initBreakup (ParticleSet &P) |
constructor code factored out More... | |
void | evalPerParticleConsts (Vector< RealType > &pp_consts) const |
Compute the const part of the per particle coulomb self interaction potential. More... | |
Private Attributes | |
RealType | madelung_constant_ |
const bool | use_offload_ |
if true use offload More... | |
const int | d_aa_ID |
AA table ID. More... | |
NewTimer & | evalLR_timer_ |
Timer for long range. More... | |
NewTimer & | evalSR_timer_ |
Timer for long range. More... | |
NewTimer & | offload_timer_ |
Timer for offload part. More... | |
ResourceHandle< CoulombPBCAAMultiWalkerResource > | mw_res_handle_ |
Additional Inherited Members | |
![]() | |
virtual void | contributeScalarQuantities () |
virtual void | checkoutScalarQuantities (TraceManager &tm) |
virtual void | collectScalarQuantities () |
virtual void | deleteScalarQuantities () |
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... | |
![]() | |
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_ |
![]() | |
int | first_force_index_ |
int | n_nuc_ |
int | n_el_ |
int | tries_ |
bool | first_time_ |
bool | add_ion_ion_ |
Determines if ion-ion force will be added to electron-ion force in derived force estimators. If false, forces_ion_ion_=0.0. More... | |
ParticleSet & | ions_ |
ParticleSet::ParticlePos | forces_ |
ParticleSet::ParticlePos | forces_ion_ion_ |
SymTensor< Real, OHMMS_DIM > | stress_ion_ion_ |
SymTensor< Real, OHMMS_DIM > | stress_ee_ |
SymTensor< Real, OHMMS_DIM > | stress_ei_ |
SymTensor< Real, OHMMS_DIM > | stress_kin_ |
SymTensor< Real, OHMMS_DIM > | stress_ |
std::string | prefix_ |
std::string | pair_name_ |
Real | rcut_ |
int | m_ |
std::vector< Real > | ck_ |
using GridType = LRCoulombSingleton::GridType |
Definition at line 41 of file CoulombPBCAA.h.
Definition at line 40 of file CoulombPBCAA.h.
using mRealType = LRHandlerType::mRealType |
Definition at line 43 of file CoulombPBCAA.h.
using OffloadSpline = OneDimCubicSplineLinearGrid<LRCoulombSingleton::pRealType> |
Definition at line 44 of file CoulombPBCAA.h.
Definition at line 42 of file CoulombPBCAA.h.
CoulombPBCAA | ( | ParticleSet & | ref, |
bool | active, | ||
bool | computeForces, | ||
bool | use_offload | ||
) |
constructor
Definition at line 47 of file CoulombPBCAA.cpp.
References qmcplusplus::Units::distance::A, CoulombPBCAA::AA, qmcplusplus::abs(), qmcplusplus::ALL_OFF, qmcplusplus::app_log(), CoulombPBCAA::ComputeForces, CoulombPBCAA::d_aa_ID, qmcplusplus::DC_POS_OFFLOAD, qmcplusplus::ewaldref::ewaldEnergy(), ParticleSet::getCoordinates(), ParticleSet::getDistTable(), DynamicCoordinates::getKind(), ParticleSet::getLattice(), OhmmsElementBase::getName(), CoulombPBCAA::initBreakup(), CoulombPBCAA::is_active, CoulombPBCAA::madelung_constant_, qmcplusplus::NEED_FULL_TABLE_ON_HOST_AFTER_DONEPBYP, CoulombPBCAA::NumCenters, OperatorBase::POTENTIAL, ForceBase::prefix_, CoulombPBCAA::Ps, CoulombPBCAA::PtclRefName, CoulombPBCAA::quasi2d, ParticleSet::R, OperatorBase::setEnergyDomain(), ParticleSet::turnOnPerParticleSK(), OperatorBase::twoBodyQuantumDomain(), ParticleSet::update(), CoulombPBCAA::updateSource(), CoulombPBCAA::use_offload_, OperatorBase::value_, and CoulombPBCAA::Zat.
|
overridedefault |
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from OperatorBase.
|
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 137 of file CoulombPBCAA.cpp.
References ForceBase::addObservablesF(), OperatorBase::addValue(), and CoulombPBCAA::ComputeForces.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 174 of file CoulombPBCAA.cpp.
References TraceManager::checkout_real(), CoulombPBCAA::evaluate_sp(), CoulombPBCAA::is_active, OperatorBase::name_, CoulombPBCAA::Ps, OperatorBase::request_, TraceRequest::streaming_array(), OperatorBase::streaming_particles_, ParticleSet::turnOnPerParticleSK(), and CoulombPBCAA::V_sample.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 172 of file CoulombPBCAA.cpp.
References TraceRequest::contribute_array(), OperatorBase::name_, and OperatorBase::request_.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from OperatorBase.
Referenced by qmcplusplus::TEST_CASE(), and qmcplusplus::test_CoulombPBCAA_3p().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 186 of file CoulombPBCAA.cpp.
References OperatorBase::streaming_particles_, and CoulombPBCAA::V_sample.
Return_t evalConsts | ( | bool | report = true | ) |
Referenced by CoulombPBCAA::initBreakup(), and qmcplusplus::TEST_CASE().
Return_t evalLR | ( | ParticleSet & | P | ) |
CoulombPBCAA::Return_t evalLRwithForces | ( | ParticleSet & | P | ) |
Definition at line 483 of file CoulombPBCAA.cpp.
References CoulombPBCAA::dAA, CoulombPBCAA::evalLR(), ForceBase::forces_, ParticleSet::getTotalNum(), CoulombPBCAA::NumSpecies, CoulombPBCAA::Zat, and CoulombPBCAA::Zspec.
Referenced by CoulombPBCAA::updateSource().
Compute the const part of the per particle coulomb self interaction potential.
[out] | pp_consts | constant values for the particles self interaction |
Return_t evalSR | ( | ParticleSet & | P | ) |
Referenced by CoulombPBCAA::evaluate(), CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::updateSource().
CoulombPBCAA::Return_t evalSRwithForces | ( | ParticleSet & | P | ) |
Definition at line 501 of file CoulombPBCAA.cpp.
References CoulombPBCAA::d_aa_ID, ForceBase::forces_, ParticleSet::getDistTableAA(), CoulombPBCAA::NumCenters, CoulombPBCAA::rVs, CoulombPBCAA::rVsforce, and CoulombPBCAA::Zat.
Referenced by CoulombPBCAA::updateSource().
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 201 of file CoulombPBCAA.cpp.
References CoulombPBCAA::evalLR(), CoulombPBCAA::evalSR(), CoulombPBCAA::evaluate_sp(), CoulombPBCAA::is_active, CoulombPBCAA::myConst, OperatorBase::streaming_particles_, and OperatorBase::value_.
Referenced by qmcplusplus::TEST_CASE().
CoulombPBCAA::Return_t evaluate_sp | ( | ParticleSet & | P | ) |
Definition at line 343 of file CoulombPBCAA.cpp.
References CoulombPBCAA::AA, qmcplusplus::abs(), APP_ABORT, qmcplusplus::app_log(), CoulombPBCAA::d_aa_ID, CoulombPBCAA::evalLR(), CoulombPBCAA::evalSR(), ParticleSet::getDistTableAA(), ParticleSet::getSimulationCell(), ParticleSet::getSK(), CoulombPBCAA::myConst, CoulombPBCAA::NumCenters, CoulombPBCAA::NumSpecies, CoulombPBCAA::rVs, qmcplusplus::Units::time::s, Array< T, D, ALLOC >::size(), Array< T, D, ALLOC >::sum(), qmcplusplus::SUPERCELL_SLAB, TraceManager::trace_tol, CoulombPBCAA::V_const, CoulombPBCAA::V_sample, OperatorBase::value_, CoulombPBCAA::Zat, and CoulombPBCAA::Zspec.
Referenced by CoulombPBCAA::checkoutParticleQuantities(), and CoulombPBCAA::evaluate().
|
overridevirtual |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase.
P | target particle set (electrons) |
ions | source particle set (ions) |
psi | Trial wave function |
hf_terms | Adds OperatorBase's contribution to Re [(dH)Psi]/Psi |
pulay_terms | Adds OperatorBase's contribution to Re [(H-E_L)dPsi]/Psi |
Reimplemented from OperatorBase.
Definition at line 330 of file CoulombPBCAA.cpp.
References CoulombPBCAA::ComputeForces, ForceBase::forces_, CoulombPBCAA::is_active, and OperatorBase::value_.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
write about the class
Implements OperatorBase.
Definition at line 127 of file CoulombPBCAA.h.
References CoulombPBCAA::PtclRefName.
|
inline |
Definition at line 185 of file CoulombPBCAA.h.
References CoulombPBCAA::madelung_constant_.
Referenced by qmcplusplus::TEST_CASE(), and qmcplusplus::test_CoulombPBCAA_3p().
|
inlineoverridevirtual |
|
overridevirtual |
Inform objects associated with this operator of per particle listeners.
i.e. turnOnPerParticleSK of particleset qp.
Reimplemented from OperatorBase.
Definition at line 193 of file CoulombPBCAA.cpp.
References OperatorBase::informOfPerParticleListener(), CoulombPBCAA::Ps, and ParticleSet::turnOnPerParticleSK().
Referenced by qmcplusplus::TEST_CASE().
|
private |
constructor code factored out
Definition at line 423 of file CoulombPBCAA.cpp.
References CoulombPBCAA::AA, qmcplusplus::app_log(), CoulombPBCAA::ChargeAttribIndx, CoulombPBCAA::ComputeForces, LRCoulombSingleton::createSpline4RbyVs(), CoulombPBCAA::dAA, CoulombPBCAA::evalConsts(), LRCoulombSingleton::getDerivHandler(), LRCoulombSingleton::getHandler(), ParticleSet::getLattice(), ParticleSet::getSpeciesSet(), ParticleSet::getTotalNum(), ParticleSet::GroupID, ParticleSet::groupsize(), CoulombPBCAA::myConst, CoulombPBCAA::myRcut, CoulombPBCAA::NofSpecies, CoulombPBCAA::NumCenters, CoulombPBCAA::NumSpecies, Array< T, D, ALLOC >::resize(), CoulombPBCAA::rVs, CoulombPBCAA::rVs_offload, CoulombPBCAA::rVsforce, LinearGrid< T, CT >::set(), CoulombPBCAA::SpeciesID, CoulombPBCAA::V_const, CoulombPBCAA::Zat, CoulombPBCAA::Zat_offload, and CoulombPBCAA::Zspec.
Referenced by CoulombPBCAA::CoulombPBCAA().
|
overridevirtual |
Implements OperatorBase.
|
static |
Referenced by CoulombPBCAA::mw_evaluate().
|
overridevirtual |
Evaluate the contribution of this component of multiple walkers.
Take o_list and p_list update evaluation result variables in o_list? really should reduce vector of local_energies. matching the ordering and size of o list the this can be call for 1 or more QMCHamiltonians
o_list | |
wf_list | |
p_list |
Temporary raw omp pragma for simple thread parallelism ignoring the driver level concurrency
TODO: replace this with a proper abstraction. It should adequately describe the behavior and strictly limit the activation of this level concurrency to when it is intended. It is unlikely to belong in this function.
This implicitly depends on openmp work division logic. Essentially adhoc runtime crowds over which we have given up control of thread/global scope. How many walkers per thread? How to handle their data movement if any of these hamiltonians should be accelerated? We can neither reason about or describe it in C++
As I understand it it should only be required for as long as the AMD openmp offload compliler is incapable of running multiple threads. They should/must fix their compiler before delivery of frontier and it should be removed at that point at latest
If you want 16 threads of 1 walker that should be 16 crowds of 1 not one crowd of 16 with openmp thrown in at hamiltonian level. If this must be different from the other crowd batching. Make this a reasoned about and controlled level of concurency blocking at the driver level.
This is only thread safe only if each walker has a complete set of anything involved in an Operator.evaluate.
Reimplemented from OperatorBase.
Definition at line 215 of file CoulombPBCAA.cpp.
References RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), CoulombPBCAA::mw_evalSR_offload(), OperatorBase::mw_evaluate(), CoulombPBCAA::myConst, CoulombPBCAA::use_offload_, and OperatorBase::value_.
Referenced by qmcplusplus::test_CoulombPBCAA_3p().
|
overridevirtual |
Evaluate the contribution of this component of multiple walkers per particle reporting to registered listeners from Estimators.
Reimplemented from OperatorBase.
Definition at line 243 of file CoulombPBCAA.cpp.
References APP_ABORT, RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), CoulombPBCAA::myConst, qmcplusplus::pset, qmcplusplus::Units::time::s, qmcplusplus::SUPERCELL_SLAB, and OperatorBase::value_.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
|
overridevirtual |
return a shared resource to a collection
Reimplemented from OperatorBase.
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 161 of file CoulombPBCAA.cpp.
References CoulombPBCAA::AA, CoulombPBCAA::d_aa_ID, ParticleSet::getDistTable(), CoulombPBCAA::is_active, and CoulombPBCAA::PtclRefName.
|
inlineoverridevirtual |
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 159 of file CoulombPBCAA.h.
References CoulombPBCAA::ComputeForces, OperatorBase::setObservables(), and ForceBase::setObservablesF().
|
inlineoverridevirtual |
Reimplemented from OperatorBase.
Definition at line 166 of file CoulombPBCAA.h.
References CoulombPBCAA::ComputeForces, OperatorBase::setParticlePropertyList(), and ForceBase::setParticleSetF().
|
overridevirtual |
Update data associated with a particleset.
Default implementation does nothing. Only A-A interactions for s needs to implement its own method.
s | source particle set |
Reimplemented from OperatorBase.
Definition at line 144 of file CoulombPBCAA.cpp.
References CoulombPBCAA::ComputeForces, CoulombPBCAA::evalLR(), CoulombPBCAA::evalLRwithForces(), CoulombPBCAA::evalSR(), CoulombPBCAA::evalSRwithForces(), ForceBase::forces_, CoulombPBCAA::myConst, OperatorBase::new_value_, qmcplusplus::Units::time::s, and OperatorBase::value_.
Referenced by CoulombPBCAA::CoulombPBCAA().
std::shared_ptr<LRHandlerType> AA |
energy-optimized long range handle. Should be const LRHandlerType eventually
Definition at line 47 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA(), CoulombPBCAA::evaluate_sp(), CoulombPBCAA::initBreakup(), and CoulombPBCAA::resetTargetParticleSet().
int ChargeAttribIndx |
Definition at line 61 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::initBreakup().
bool ComputeForces |
Flag for whether to compute forces or not.
Definition at line 79 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::addObservables(), CoulombPBCAA::CoulombPBCAA(), CoulombPBCAA::evaluateWithIonDerivs(), CoulombPBCAA::initBreakup(), CoulombPBCAA::setObservables(), CoulombPBCAA::setParticlePropertyList(), and CoulombPBCAA::updateSource().
|
private |
AA table ID.
Definition at line 193 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA(), CoulombPBCAA::evalSRwithForces(), CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::resetTargetParticleSet().
std::shared_ptr<const LRHandlerType> dAA |
force-optimized long range handle
Definition at line 53 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::evalLRwithForces(), and CoulombPBCAA::initBreakup().
Vector<ComplexType> del_eikr |
Definition at line 77 of file CoulombPBCAA.h.
Definition at line 76 of file CoulombPBCAA.h.
|
private |
Timer for long range.
Definition at line 195 of file CoulombPBCAA.h.
|
private |
Timer for long range.
Definition at line 197 of file CoulombPBCAA.h.
bool FirstTime |
Definition at line 58 of file CoulombPBCAA.h.
bool is_active |
Definition at line 57 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::checkoutParticleQuantities(), CoulombPBCAA::CoulombPBCAA(), CoulombPBCAA::evaluate(), CoulombPBCAA::evaluateWithIonDerivs(), and CoulombPBCAA::resetTargetParticleSet().
|
private |
Definition at line 188 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA(), and CoulombPBCAA::get_madelung_constant().
int MemberAttribIndx |
Definition at line 62 of file CoulombPBCAA.h.
|
private |
Definition at line 202 of file CoulombPBCAA.h.
Return_t myConst |
Definition at line 64 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::evaluate(), CoulombPBCAA::evaluate_sp(), CoulombPBCAA::initBreakup(), CoulombPBCAA::mw_evaluate(), CoulombPBCAA::mw_evaluatePerParticle(), qmcplusplus::TEST_CASE(), and CoulombPBCAA::updateSource().
RealType myRcut |
cutoff radius of the short-range part
Definition at line 66 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::initBreakup().
std::vector<int> NofSpecies |
Definition at line 72 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::initBreakup().
int NumCenters |
Definition at line 63 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA(), CoulombPBCAA::evalSRwithForces(), CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::initBreakup().
int NumSpecies |
Definition at line 60 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::evalLRwithForces(), CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::initBreakup().
|
private |
Timer for offload part.
Definition at line 199 of file CoulombPBCAA.h.
ParticleSet& Ps |
Definition at line 88 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::checkoutParticleQuantities(), CoulombPBCAA::CoulombPBCAA(), and CoulombPBCAA::informOfPerParticleListener().
std::string PtclRefName |
Definition at line 67 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA(), CoulombPBCAA::get(), and CoulombPBCAA::resetTargetParticleSet().
const bool quasi2d |
Flag for whether to use quasi-2D Ewald.
Definition at line 81 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA().
std::shared_ptr<const RadFunctorType> rVs |
energy-optimized short range pair potential
Definition at line 49 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::evalSRwithForces(), CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::initBreakup().
std::shared_ptr<const OffloadSpline> rVs_offload |
the same as rVs but can be used inside OpenMP offload regions
Definition at line 51 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::initBreakup().
std::shared_ptr<const RadFunctorType> rVsforce |
force-optimized short range pair potential
Definition at line 55 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::evalSRwithForces(), and CoulombPBCAA::initBreakup().
int SourceID |
Definition at line 59 of file CoulombPBCAA.h.
std::vector<int> SpeciesID |
Definition at line 73 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::initBreakup().
Definition at line 75 of file CoulombPBCAA.h.
|
private |
if true use offload
Definition at line 191 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA(), and CoulombPBCAA::mw_evaluate().
Definition at line 86 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::initBreakup().
Definition at line 85 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::checkoutParticleQuantities(), CoulombPBCAA::deleteParticleQuantities(), and CoulombPBCAA::evaluate_sp().
std::vector<RealType> Zat |
Definition at line 69 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::CoulombPBCAA(), CoulombPBCAA::evalLRwithForces(), CoulombPBCAA::evalSRwithForces(), CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::initBreakup().
std::shared_ptr<Vector<RealType, OffloadPinnedAllocator<RealType> > > Zat_offload |
Definition at line 70 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::initBreakup().
std::vector<RealType> Zspec |
Definition at line 69 of file CoulombPBCAA.h.
Referenced by CoulombPBCAA::evalLRwithForces(), CoulombPBCAA::evaluate_sp(), and CoulombPBCAA::initBreakup().
class qmcplusplus::CoulombPBCAB |
Calculates the AA Coulomb potential using PBCs.
Functionally identical to CoulombPBCAB but uses a templated version of LRHandler.
Definition at line 38 of file CoulombPBCAB.h.
Public Types | |
using | LRHandlerType = LRCoulombSingleton::LRHandlerType |
using | GridType = LRCoulombSingleton::GridType |
using | RadFunctorType = LRCoulombSingleton::RadFunctorType |
using | mRealType = LRHandlerType::mRealType |
![]() | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | Real = QMCTraits::RealType |
cheat, need to use virtual inheriance to clean up More... | |
Public Member Functions | |
CoulombPBCAB (ParticleSet &ions, ParticleSet &elns, bool computeForces=false) | |
~CoulombPBCAB () override | |
void | resetTargetParticleSet (ParticleSet &P) override |
Reset the data with the target ParticleSet. More... | |
std::string | getClassName () const override |
return class name More... | |
void | contributeParticleQuantities () override |
void | checkoutParticleQuantities (TraceManager &tm) override |
Return_t | evaluate_sp (ParticleSet &P) |
void | deleteParticleQuantities () override |
Return_t | evaluate (ParticleSet &P) override |
Evaluate the local energy contribution of this component. More... | |
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 >> &ion_listeners) const override |
Evaluate the contribution of this component of multiple walkers per particle reporting to registered listeners from Estimators. More... | |
Return_t | evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
bool | put (xmlNodePtr cur) override |
Do nothing. More... | |
bool | get (std::ostream &os) const override |
write about the class More... | |
std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) override |
Return_t | evalSR (ParticleSet &P) |
Computes the short-range contribution to the coulomb energy. More... | |
Return_t | evalLR (ParticleSet &P) |
Computes the long-range contribution to the coulomb energy. More... | |
Return_t | evalSRwithForces (ParticleSet &P) |
Computes the short-range contribution to the coulomb energy and forces. More... | |
Return_t | evalLRwithForces (ParticleSet &P) |
Computes the long-range contribution to the coulomb energy and forces. More... | |
Return_t | evalConsts (const ParticleSet &P, bool report=true) |
Evaluates madelung and background contributions to total energy. More... | |
void | add (int groupID, std::unique_ptr< RadFunctorType > &&ppot) |
Adds a local pseudopotential channel "ppot" to all source species of type "groupID". More... | |
void | addObservables (PropertySetType &plist, BufferType &collectables) override |
named values to the property list Default implementaton uses addValue(plist_) More... | |
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 |
const ParticleSet & | getSourcePSet () const |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to a collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
acquire a shared resource from a collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
return a shared resource to a collection More... | |
void | informOfPerParticleListener () override |
Call to inform objects associated with this operator of per particle listeners. More... | |
![]() | |
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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
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_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 | 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 | 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... | |
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... | |
![]() | |
Real | g (Real r) |
void | initVarReduction (Real rcut, int m, int numFuncs) |
ForceBase (ParticleSet &ions, ParticleSet &elns) | |
virtual | ~ForceBase () |
void | registerObservablesF (std::vector< ObservableHelper > &h5list, hdf_archive &file) const |
void | addObservablesF (QMCTraits::PropertySetType &plist) |
void | addObservablesStress (QMCTraits::PropertySetType &plist) |
void | setObservablesF (QMCTraits::PropertySetType &plist) |
void | setObservablesStress (QMCTraits::PropertySetType &plist) |
void | setParticleSetF (QMCTraits::PropertySetType &plist, int offset) |
void | setParticleSetStress (QMCTraits::PropertySetType &plist, int offset) |
bool | getAddIonIon () const noexcept |
void | setAddIonIon (bool val) noexcept |
const ParticleSet::ParticlePos & | getForces () const noexcept |
void | setForces (const ParticleSet::ParticlePos &forces) |
void | setForces (Real val) |
const ParticleSet::ParticlePos & | getForcesIonIon () const noexcept |
void | setForcesIonIon (const ParticleSet::ParticlePos &forces_ion_ion) |
const SymTensor< Real, OHMMS_DIM > & | getStressIonIon () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressEE () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressEI () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressKin () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStress () const noexcept |
Public Attributes | |
std::shared_ptr< LRHandlerType > | AB |
long-range Handler. Should be const LRHandlerType eventually More... | |
std::shared_ptr< const LRHandlerType > | dAB |
long-range derivative handler More... | |
const int | myTableIndex |
locator of the distance table More... | |
int | NumSpeciesA |
number of species of A particle set More... | |
int | NumSpeciesB |
number of species of B particle set More... | |
int | NptclA |
number of particles of A More... | |
int | NptclB |
number of particles of B More... | |
Return_t | myConst |
const energy after breakup More... | |
RealType | myRcut |
cutoff radius of the short-range part More... | |
std::shared_ptr< const RadFunctorType > | V0 |
Always mave a radial functor for the bare coulomb. More... | |
std::shared_ptr< const RadFunctorType > | fV0 |
Radial functor for bare coulomb, optimized for forces. More... | |
std::shared_ptr< const RadFunctorType > | dfV0 |
Radial functor for derivative of bare coulomb, optimized for forces. More... | |
bool | ComputeForces |
Flag for whether to compute forces or not. More... | |
std::vector< int > | NofSpeciesA |
number of particles per species of A More... | |
std::vector< int > | NofSpeciesB |
number of particles per species of B More... | |
std::vector< RealType > | Zat |
Zat[iat] charge for the iat-th particle of A. More... | |
std::vector< RealType > | Qat |
Qat[iat] charge for the iat-th particle of B. More... | |
std::vector< RealType > | Zspec |
Zspec[spec] charge for the spec-th species of A. More... | |
std::vector< RealType > | Qspec |
Qspec[spec] charge for the spec-th species of B. More... | |
std::vector< const RadFunctorType * > | Vat |
Short-range potential for each ion. More... | |
std::vector< std::shared_ptr< RadFunctorType > > | Vspec |
Short-range potential for each species. More... | |
std::vector< const RadFunctorType * > | fVat |
Short-range potential (r*V) and potential derivative d/dr(rV) derivative for each ion Required for force evaluations. More... | |
std::vector< const RadFunctorType * > | fdVat |
std::vector< std::shared_ptr< const RadFunctorType > > | fVspec |
std::vector< std::shared_ptr< const RadFunctorType > > | fdVspec |
bool | kcdifferent |
RealType | minkc |
Array< TraceReal, 1 > * | Ve_sample |
Array< TraceReal, 1 > * | Vi_sample |
Array< TraceReal, 1 > | Ve_const |
Array< TraceReal, 1 > | Vi_const |
ParticleSet & | Peln |
RealType | SRtmp |
short-range part for the moved particle More... | |
RealType | LRtmp |
long-range part for the moved particle More... | |
Vector< RealType > | SRpart |
short-range per particle More... | |
Vector< RealType > | LRpart |
long-range per particle More... | |
Protected Member Functions | |
void | initBreakup (ParticleSet &P) |
Creates the long-range handlers, then splines and stores it by particle and species for quick evaluation. More... | |
![]() | |
virtual void | contributeScalarQuantities () |
virtual void | checkoutScalarQuantities (TraceManager &tm) |
virtual void | collectScalarQuantities () |
virtual void | deleteScalarQuantities () |
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... | |
Private Member Functions | |
void | evalPerParticleConsts (Vector< RealType > &pp_consts_src, Vector< RealType > &pp_consts_trg) const |
Compute the const part of the per particle coulomb AB potential. More... | |
Private Attributes | |
ParticleSet & | pset_ions_ |
source particle set More... | |
ResourceHandle< CoulombPBCABMultiWalkerResource > | mw_res_handle_ |
Additional Inherited Members | |
![]() | |
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_ |
![]() | |
int | first_force_index_ |
int | n_nuc_ |
int | n_el_ |
int | tries_ |
bool | first_time_ |
bool | add_ion_ion_ |
Determines if ion-ion force will be added to electron-ion force in derived force estimators. If false, forces_ion_ion_=0.0. More... | |
ParticleSet & | ions_ |
ParticleSet::ParticlePos | forces_ |
ParticleSet::ParticlePos | forces_ion_ion_ |
SymTensor< Real, OHMMS_DIM > | stress_ion_ion_ |
SymTensor< Real, OHMMS_DIM > | stress_ee_ |
SymTensor< Real, OHMMS_DIM > | stress_ei_ |
SymTensor< Real, OHMMS_DIM > | stress_kin_ |
SymTensor< Real, OHMMS_DIM > | stress_ |
std::string | prefix_ |
std::string | pair_name_ |
Real | rcut_ |
int | m_ |
std::vector< Real > | ck_ |
using GridType = LRCoulombSingleton::GridType |
Definition at line 42 of file CoulombPBCAB.h.
Definition at line 41 of file CoulombPBCAB.h.
using mRealType = LRHandlerType::mRealType |
Definition at line 44 of file CoulombPBCAB.h.
Definition at line 43 of file CoulombPBCAB.h.
CoulombPBCAB | ( | ParticleSet & | ions, |
ParticleSet & | elns, | ||
bool | computeForces = false |
||
) |
Definition at line 43 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, qmcplusplus::app_log(), CoulombPBCAB::ComputeForces, CoulombPBCAB::initBreakup(), CoulombPBCAB::myRcut, OperatorBase::POTENTIAL, ForceBase::prefix_, CoulombPBCAB::pset_ions_, OperatorBase::setEnergyDomain(), ParticleSet::turnOnPerParticleSK(), and OperatorBase::twoBodyQuantumDomain().
|
overridedefault |
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from OperatorBase.
Definition at line 749 of file CoulombPBCAB.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), ResourceCollection::lendResource(), and CoulombPBCAB::mw_res_handle_.
void add | ( | int | groupID, |
std::unique_ptr< RadFunctorType > && | ppot | ||
) |
Adds a local pseudopotential channel "ppot" to all source species of type "groupID".
add a local pseudo potential
groupID | species index |
ppot | radial functor for ![]() |
Definition at line 561 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, qmcplusplus::app_log(), CoulombPBCAB::ComputeForces, OHMMS::Controller, CoulombPBCAB::dAB, qmcplusplus::Units::charge::e, CoulombPBCAB::fdVat, CoulombPBCAB::fdVspec, CoulombPBCAB::fVat, CoulombPBCAB::fVspec, ParticleSet::GroupID, omptarget::min(), CoulombPBCAB::myRcut, CoulombPBCAB::NptclA, CoulombPBCAB::pset_ions_, qmcplusplus::rank, LinearGrid< T, CT >::set(), CoulombPBCAB::V0, CoulombPBCAB::Vat, and CoulombPBCAB::Vspec.
|
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 80 of file CoulombPBCAB.cpp.
References RecordNamedProperty< T >::add(), ForceBase::addObservablesF(), CoulombPBCAB::ComputeForces, OperatorBase::my_index_, and OperatorBase::name_.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 91 of file CoulombPBCAB.cpp.
References TraceManager::checkout_real(), OperatorBase::name_, CoulombPBCAB::Peln, CoulombPBCAB::pset_ions_, OperatorBase::request_, TraceRequest::streaming_array(), OperatorBase::streaming_particles_, ParticleSet::turnOnPerParticleSK(), CoulombPBCAB::Ve_sample, and CoulombPBCAB::Vi_sample.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 89 of file CoulombPBCAB.cpp.
References TraceRequest::contribute_array(), OperatorBase::name_, and OperatorBase::request_.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from OperatorBase.
Definition at line 742 of file CoulombPBCAB.cpp.
References ResourceCollection::addResource(), and CoulombPBCAB::evalPerParticleConsts().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 111 of file CoulombPBCAB.cpp.
References OperatorBase::streaming_particles_, CoulombPBCAB::Ve_sample, and CoulombPBCAB::Vi_sample.
CoulombPBCAB::Return_t evalConsts | ( | const ParticleSet & | Peln, |
bool | report = true |
||
) |
Evaluates madelung and background contributions to total energy.
Evaluate the background term.
Other constants are handled by AA potentials.
Definition at line 390 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, qmcplusplus::app_log(), ParticleSet::getTotalNum(), CoulombPBCAB::NofSpeciesA, CoulombPBCAB::NofSpeciesB, CoulombPBCAB::NumSpeciesA, CoulombPBCAB::NumSpeciesB, CoulombPBCAB::Peln, CoulombPBCAB::pset_ions_, CoulombPBCAB::Qat, CoulombPBCAB::Qspec, Array< T, D, ALLOC >::resize(), qmcplusplus::Units::time::s, CoulombPBCAB::Ve_const, CoulombPBCAB::Vi_const, CoulombPBCAB::Zat, and CoulombPBCAB::Zspec.
Referenced by CoulombPBCAB::initBreakup(), and qmcplusplus::TEST_CASE().
CoulombPBCAB::Return_t evalLR | ( | ParticleSet & | P | ) |
Computes the long-range contribution to the coulomb energy.
Definition at line 449 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, ParticleSet::getSimulationCell(), ParticleSet::getSK(), CoulombPBCAB::NumSpeciesA, CoulombPBCAB::NumSpeciesB, CoulombPBCAB::pset_ions_, CoulombPBCAB::Qspec, qmcplusplus::SUPERCELL_SLAB, and CoulombPBCAB::Zspec.
Referenced by CoulombPBCAB::evalLRwithForces(), CoulombPBCAB::evaluate(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::evaluateWithIonDerivs().
CoulombPBCAB::Return_t evalLRwithForces | ( | ParticleSet & | P | ) |
Computes the long-range contribution to the coulomb energy and forces.
Definition at line 665 of file CoulombPBCAB.cpp.
References CoulombPBCAB::dAB, CoulombPBCAB::evalLR(), ForceBase::forces_, ParticleSet::getTotalNum(), CoulombPBCAB::NumSpeciesB, CoulombPBCAB::pset_ions_, CoulombPBCAB::Qspec, and CoulombPBCAB::Zat.
Referenced by CoulombPBCAB::evaluate(), and CoulombPBCAB::evaluateWithIonDerivs().
|
private |
Compute the const part of the per particle coulomb AB potential.
[out] | pp_consts_src | constant values for the source particles aka ions aka A |
[out] | pp_consts_trg | constant values for the target particles aka electrons aka B |
Definition at line 715 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, ParticleSet::getTotalNum(), CoulombPBCAB::NofSpeciesA, CoulombPBCAB::NofSpeciesB, CoulombPBCAB::NumSpeciesA, CoulombPBCAB::NumSpeciesB, CoulombPBCAB::Peln, CoulombPBCAB::pset_ions_, CoulombPBCAB::Qat, CoulombPBCAB::Qspec, Vector< T, Alloc >::resize(), qmcplusplus::Units::time::s, CoulombPBCAB::Zat, and CoulombPBCAB::Zspec.
Referenced by CoulombPBCAB::createResource().
CoulombPBCAB::Return_t evalSR | ( | ParticleSet & | P | ) |
Computes the short-range contribution to the coulomb energy.
Definition at line 431 of file CoulombPBCAB.cpp.
References BLAS::czero, ParticleSet::getDistTableAB(), CoulombPBCAB::myTableIndex, CoulombPBCAB::NptclA, CoulombPBCAB::NptclB, CoulombPBCAB::Qat, CoulombPBCAB::Vat, and CoulombPBCAB::Zat.
Referenced by CoulombPBCAB::evaluate(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::evaluateWithIonDerivs().
CoulombPBCAB::Return_t evalSRwithForces | ( | ParticleSet & | P | ) |
Computes the short-range contribution to the coulomb energy and forces.
Definition at line 681 of file CoulombPBCAB.cpp.
References BLAS::czero, CoulombPBCAB::fdVat, ForceBase::forces_, CoulombPBCAB::fVat, ParticleSet::getDistTableAB(), CoulombPBCAB::myTableIndex, CoulombPBCAB::NptclA, CoulombPBCAB::NptclB, CoulombPBCAB::Qat, CoulombPBCAB::Vat, and CoulombPBCAB::Zat.
Referenced by CoulombPBCAB::evaluate(), and CoulombPBCAB::evaluateWithIonDerivs().
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 122 of file CoulombPBCAB.cpp.
References CoulombPBCAB::ComputeForces, CoulombPBCAB::evalLR(), CoulombPBCAB::evalLRwithForces(), CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), CoulombPBCAB::evaluate_sp(), ForceBase::forces_, CoulombPBCAB::myConst, OperatorBase::streaming_particles_, and OperatorBase::value_.
Referenced by qmcplusplus::TEST_CASE().
CoulombPBCAB::Return_t evaluate_sp | ( | ParticleSet & | P | ) |
Definition at line 158 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, qmcplusplus::abs(), APP_ABORT, qmcplusplus::app_log(), CoulombPBCAB::evalLR(), CoulombPBCAB::evalSR(), ParticleSet::getDistTableAB(), ParticleSet::getSimulationCell(), ParticleSet::getSK(), ParticleSet::getTotalNum(), CoulombPBCAB::myConst, CoulombPBCAB::myTableIndex, CoulombPBCAB::NptclA, CoulombPBCAB::NptclB, CoulombPBCAB::NumSpeciesA, CoulombPBCAB::NumSpeciesB, CoulombPBCAB::pset_ions_, CoulombPBCAB::Qat, CoulombPBCAB::Qspec, qmcplusplus::Units::time::s, Array< T, D, ALLOC >::size(), Array< T, D, ALLOC >::sum(), qmcplusplus::SUPERCELL_SLAB, TraceManager::trace_tol, OperatorBase::value_, CoulombPBCAB::Vat, CoulombPBCAB::Ve_const, CoulombPBCAB::Ve_sample, CoulombPBCAB::Vi_const, CoulombPBCAB::Vi_sample, CoulombPBCAB::Zat, and CoulombPBCAB::Zspec.
Referenced by CoulombPBCAB::evaluate().
|
overridevirtual |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase.
P | target particle set (electrons) |
ions | source particle set (ions) |
psi | Trial wave function |
hf_terms | Adds OperatorBase's contribution to Re [(dH)Psi]/Psi |
pulay_terms | Adds OperatorBase's contribution to Re [(H-E_L)dPsi]/Psi |
Reimplemented from OperatorBase.
Definition at line 139 of file CoulombPBCAB.cpp.
References CoulombPBCAB::ComputeForces, CoulombPBCAB::evalLR(), CoulombPBCAB::evalLRwithForces(), CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), ForceBase::forces_, CoulombPBCAB::myConst, and OperatorBase::value_.
|
inlineoverridevirtual |
write about the class
Implements OperatorBase.
Definition at line 165 of file CoulombPBCAB.h.
References OhmmsElementBase::getName(), and CoulombPBCAB::pset_ions_.
|
inlineoverridevirtual |
|
inline |
Definition at line 202 of file CoulombPBCAB.h.
References CoulombPBCAB::pset_ions_.
|
overridevirtual |
Call to inform objects associated with this operator of per particle listeners.
should be called before createResources
Reimplemented from OperatorBase.
Definition at line 103 of file CoulombPBCAB.cpp.
References OperatorBase::informOfPerParticleListener(), CoulombPBCAB::Peln, CoulombPBCAB::pset_ions_, and ParticleSet::turnOnPerParticleSK().
|
protected |
Creates the long-range handlers, then splines and stores it by particle and species for quick evaluation.
this is just constructor code factored out. It is called by the derived class CoulombPBCAB_CUDA
Definition at line 474 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, qmcplusplus::abs(), SpeciesSet::addAttribute(), APP_ABORT, qmcplusplus::app_log(), CoulombPBCAB::ComputeForces, LRCoulombSingleton::createSpline4RbyVs(), LRCoulombSingleton::createSpline4RbyVsDeriv(), CoulombPBCAB::dAB, CoulombPBCAB::dfV0, CoulombPBCAB::evalConsts(), CoulombPBCAB::fdVat, CoulombPBCAB::fdVspec, qmcplusplus::for(), CoulombPBCAB::fV0, CoulombPBCAB::fVat, CoulombPBCAB::fVspec, LRCoulombSingleton::getDerivHandler(), LRCoulombSingleton::getHandler(), ParticleSet::getLattice(), ParticleSet::getSpeciesSet(), ParticleSet::getTotalNum(), ParticleSet::GroupID, ParticleSet::groupsize(), CoulombPBCAB::kcdifferent, omptarget::min(), CoulombPBCAB::minkc, CoulombPBCAB::myConst, CoulombPBCAB::myRcut, CoulombPBCAB::NofSpeciesA, CoulombPBCAB::NofSpeciesB, CoulombPBCAB::NptclA, CoulombPBCAB::NptclB, CoulombPBCAB::NumSpeciesA, CoulombPBCAB::NumSpeciesB, CoulombPBCAB::pset_ions_, CoulombPBCAB::Qat, CoulombPBCAB::Qspec, LinearGrid< T, CT >::set(), CoulombPBCAB::V0, CoulombPBCAB::Vat, CoulombPBCAB::Vspec, CoulombPBCAB::Zat, and CoulombPBCAB::Zspec.
Referenced by CoulombPBCAB::CoulombPBCAB().
|
overridevirtual |
Implements OperatorBase.
Definition at line 63 of file CoulombPBCAB.cpp.
|
overridevirtual |
Evaluate the contribution of this component of multiple walkers per particle reporting to registered listeners from Estimators.
Reimplemented from OperatorBase.
Definition at line 273 of file CoulombPBCAB.cpp.
References APP_ABORT, RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), OperatorBase::name_, CoulombPBCAB::NptclA, CoulombPBCAB::NptclB, qmcplusplus::pset, Vector< T, Alloc >::resize(), qmcplusplus::Units::time::s, qmcplusplus::SUPERCELL_SLAB, and OperatorBase::value_.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
|
overridevirtual |
return a shared resource to a collection
Reimplemented from OperatorBase.
Definition at line 756 of file CoulombPBCAB.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), and ResourceCollection::takebackResource().
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 70 of file CoulombPBCAB.cpp.
References CoulombPBCAB::AB, ParticleSet::addTable(), APP_ABORT, CoulombPBCAB::myTableIndex, and CoulombPBCAB::pset_ions_.
|
inlineoverridevirtual |
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 188 of file CoulombPBCAB.h.
References CoulombPBCAB::ComputeForces, OperatorBase::setObservables(), and ForceBase::setObservablesF().
|
inlineoverridevirtual |
Reimplemented from OperatorBase.
Definition at line 195 of file CoulombPBCAB.h.
References CoulombPBCAB::ComputeForces, OperatorBase::setParticlePropertyList(), and ForceBase::setParticleSetF().
std::shared_ptr<LRHandlerType> AB |
long-range Handler. Should be const LRHandlerType eventually
Definition at line 47 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::CoulombPBCAB(), CoulombPBCAB::evalConsts(), CoulombPBCAB::evalLR(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evaluate_sp(), CoulombPBCAB::initBreakup(), and CoulombPBCAB::resetTargetParticleSet().
bool ComputeForces |
Flag for whether to compute forces or not.
Definition at line 71 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::addObservables(), CoulombPBCAB::CoulombPBCAB(), CoulombPBCAB::evaluate(), CoulombPBCAB::evaluateWithIonDerivs(), CoulombPBCAB::initBreakup(), CoulombPBCAB::setObservables(), and CoulombPBCAB::setParticlePropertyList().
std::shared_ptr<const LRHandlerType> dAB |
long-range derivative handler
Definition at line 49 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::evalLRwithForces(), and CoulombPBCAB::initBreakup().
std::shared_ptr<const RadFunctorType> dfV0 |
Radial functor for derivative of bare coulomb, optimized for forces.
Definition at line 69 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::initBreakup().
std::vector<const RadFunctorType*> fdVat |
Definition at line 92 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::evalSRwithForces(), and CoulombPBCAB::initBreakup().
std::vector<std::shared_ptr<const RadFunctorType> > fdVspec |
Definition at line 95 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), and CoulombPBCAB::initBreakup().
std::shared_ptr<const RadFunctorType> fV0 |
Radial functor for bare coulomb, optimized for forces.
Definition at line 67 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::initBreakup().
std::vector<const RadFunctorType*> fVat |
Short-range potential (r*V) and potential derivative d/dr(rV) derivative for each ion Required for force evaluations.
Definition at line 91 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::evalSRwithForces(), and CoulombPBCAB::initBreakup().
std::vector<std::shared_ptr<const RadFunctorType> > fVspec |
Definition at line 94 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), and CoulombPBCAB::initBreakup().
bool kcdifferent |
Definition at line 110 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::initBreakup().
long-range per particle
Definition at line 106 of file CoulombPBCAB.h.
RealType LRtmp |
long-range part for the moved particle
Definition at line 102 of file CoulombPBCAB.h.
RealType minkc |
Definition at line 111 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::initBreakup().
|
private |
Definition at line 232 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::acquireResource().
Return_t myConst |
const energy after breakup
Definition at line 61 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evaluate(), CoulombPBCAB::evaluate_sp(), CoulombPBCAB::evaluateWithIonDerivs(), CoulombPBCAB::initBreakup(), and qmcplusplus::TEST_CASE().
RealType myRcut |
cutoff radius of the short-range part
Definition at line 63 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::CoulombPBCAB(), and CoulombPBCAB::initBreakup().
const int myTableIndex |
locator of the distance table
Definition at line 51 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::resetTargetParticleSet().
std::vector<int> NofSpeciesA |
number of particles per species of A
Definition at line 74 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalPerParticleConsts(), and CoulombPBCAB::initBreakup().
std::vector<int> NofSpeciesB |
number of particles per species of B
Definition at line 76 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalPerParticleConsts(), and CoulombPBCAB::initBreakup().
int NptclA |
number of particles of A
Definition at line 57 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), CoulombPBCAB::evaluate_sp(), CoulombPBCAB::initBreakup(), and CoulombPBCAB::mw_evaluatePerParticle().
int NptclB |
number of particles of B
Definition at line 59 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), CoulombPBCAB::evaluate_sp(), CoulombPBCAB::initBreakup(), and CoulombPBCAB::mw_evaluatePerParticle().
int NumSpeciesA |
number of species of A particle set
Definition at line 53 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalLR(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::initBreakup().
int NumSpeciesB |
number of species of B particle set
Definition at line 55 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalLR(), CoulombPBCAB::evalLRwithForces(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::initBreakup().
ParticleSet& Peln |
Definition at line 123 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::checkoutParticleQuantities(), CoulombPBCAB::evalConsts(), CoulombPBCAB::evalPerParticleConsts(), and CoulombPBCAB::informOfPerParticleListener().
|
private |
source particle set
Definition at line 230 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::checkoutParticleQuantities(), CoulombPBCAB::CoulombPBCAB(), CoulombPBCAB::evalConsts(), CoulombPBCAB::evalLR(), CoulombPBCAB::evalLRwithForces(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evaluate_sp(), CoulombPBCAB::get(), CoulombPBCAB::getSourcePSet(), CoulombPBCAB::informOfPerParticleListener(), CoulombPBCAB::initBreakup(), and CoulombPBCAB::resetTargetParticleSet().
std::vector<RealType> Qat |
Qat[iat] charge for the iat-th particle of B.
Definition at line 80 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::initBreakup().
std::vector<RealType> Qspec |
Qspec[spec] charge for the spec-th species of B.
Definition at line 84 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalLR(), CoulombPBCAB::evalLRwithForces(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::initBreakup().
short-range per particle
Definition at line 104 of file CoulombPBCAB.h.
RealType SRtmp |
short-range part for the moved particle
Definition at line 100 of file CoulombPBCAB.h.
std::shared_ptr<const RadFunctorType> V0 |
Always mave a radial functor for the bare coulomb.
Definition at line 65 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), and CoulombPBCAB::initBreakup().
std::vector<const RadFunctorType*> Vat |
Short-range potential for each ion.
Definition at line 86 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::initBreakup().
Definition at line 117 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), and CoulombPBCAB::evaluate_sp().
Definition at line 115 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::checkoutParticleQuantities(), CoulombPBCAB::deleteParticleQuantities(), and CoulombPBCAB::evaluate_sp().
Definition at line 118 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), and CoulombPBCAB::evaluate_sp().
Definition at line 116 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::checkoutParticleQuantities(), CoulombPBCAB::deleteParticleQuantities(), and CoulombPBCAB::evaluate_sp().
std::vector<std::shared_ptr<RadFunctorType> > Vspec |
Short-range potential for each species.
Definition at line 88 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::add(), and CoulombPBCAB::initBreakup().
std::vector<RealType> Zat |
Zat[iat] charge for the iat-th particle of A.
Definition at line 78 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalLRwithForces(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::initBreakup().
std::vector<RealType> Zspec |
Zspec[spec] charge for the spec-th species of A.
Definition at line 82 of file CoulombPBCAB.h.
Referenced by CoulombPBCAB::evalConsts(), CoulombPBCAB::evalLR(), CoulombPBCAB::evalPerParticleConsts(), CoulombPBCAB::evaluate_sp(), and CoulombPBCAB::initBreakup().
struct qmcplusplus::L2Potential |
Evaluate the L2 potentials around each ion.
Definition at line 57 of file L2Potential.h.
Public Member Functions | |
L2Potential (const ParticleSet &ions, ParticleSet &els, TrialWaveFunction &psi) | |
bool | dependsOnWaveFunction () const override |
return true if this operator depends on a wavefunction More... | |
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 | evaluateDK (ParticleSet &P, int iel, TensorType &D, PosType &K) |
void | evaluateD (ParticleSet &P, int iel, TensorType &D) |
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 |
void | add (int groupID, std::unique_ptr< L2RadialPotential > &&ppot) |
Add a RadialPotentialType of a species. More... | |
![]() | |
OperatorBase () | |
Construct a new Operator Base object Default and unique empty constructor. More... | |
virtual | ~OperatorBase ()=default |
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 | addObservables (PropertySetType &plist, BufferType &collectables) |
named values to the property list Default implementaton uses addValue(plist_) 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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
virtual void | setObservables (PropertySetType &plist) |
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... | |
virtual void | setParticlePropertyList (PropertySetType &plist, int offset) |
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... | |
Public Attributes | |
const ParticleSet & | IonConfig |
reference to the ionic configuration More... | |
int | NumIons |
the number of ions More... | |
int | myTableIndex |
distance table index More... | |
std::vector< std::unique_ptr< L2RadialPotential > > | PPset |
unique set of L2 PP to cleanup More... | |
std::vector< L2RadialPotential * > | PP |
PP[iat] is the L2 potential for the iat-th particle. More... | |
TrialWaveFunction * | psi_ref |
Associated trial wavefunction. More... | |
Additional Inherited Members | |
![]() | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
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... | |
![]() | |
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_ |
L2Potential | ( | const ParticleSet & | ions, |
ParticleSet & | els, | ||
TrialWaveFunction & | psi | ||
) |
Definition at line 20 of file L2Potential.cpp.
References ParticleSet::addTable(), ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), ParticleSet::getTotalNum(), L2Potential::myTableIndex, qmcplusplus::Units::time::ns, L2Potential::NumIons, OperatorBase::POTENTIAL, L2Potential::PP, L2Potential::PPset, L2Potential::psi_ref, OperatorBase::setEnergyDomain(), and OperatorBase::twoBodyQuantumDomain().
void add | ( | int | groupID, |
std::unique_ptr< L2RadialPotential > && | ppot | ||
) |
Add a RadialPotentialType of a species.
groupID | index of the ion species |
ppot | L2 pseudopotential |
Definition at line 42 of file L2Potential.cpp.
References ParticleSet::GroupID, L2Potential::IonConfig, L2Potential::PP, and L2Potential::PPset.
|
inlineoverridevirtual |
return true if this operator depends on a wavefunction
Reimplemented from OperatorBase.
Definition at line 74 of file L2Potential.h.
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 51 of file L2Potential.cpp.
References QMCTraits::DIM, TrialWaveFunction::evaluateHessian(), ParticleSet::G, ParticleSet::getDistTableAB(), ParticleSet::getTotalNum(), ParticleSet::L, L2Potential::myTableIndex, qmcplusplus::Units::force::N, qmcplusplus::n, L2Potential::NumIons, L2Potential::PP, L2Potential::psi_ref, and OperatorBase::value_.
void evaluateD | ( | ParticleSet & | P, |
int | iel, | ||
TensorType & | D | ||
) |
Definition at line 126 of file L2Potential.cpp.
References Tensor< T, D >::diagonal(), QMCTraits::DIM, L2RadialPotential::evaluate(), ParticleSet::getDistTableAB(), L2Potential::myTableIndex, L2Potential::NumIons, and L2Potential::PP.
Referenced by QMCHamiltonian::computeL2D().
void evaluateDK | ( | ParticleSet & | P, |
int | iel, | ||
TensorType & | D, | ||
PosType & | K | ||
) |
Definition at line 97 of file L2Potential.cpp.
References Tensor< T, D >::diagonal(), QMCTraits::DIM, L2RadialPotential::evaluate(), ParticleSet::getDistTableAB(), qmcplusplus::Units::energy::K, L2Potential::myTableIndex, L2Potential::NumIons, and L2Potential::PP.
Referenced by QMCHamiltonian::computeL2DK().
|
inlineoverridevirtual |
write about the class
Implements OperatorBase.
Definition at line 86 of file L2Potential.h.
References OhmmsElementBase::getName(), and L2Potential::IonConfig.
|
inlineoverridevirtual |
|
finalvirtual |
Implements OperatorBase.
Definition at line 153 of file L2Potential.cpp.
References L2Potential::IonConfig, and L2Potential::PPset.
|
inlineoverridevirtual |
Read the input parameter.
cur | xml node for a OperatorBase object |
Implements OperatorBase.
Definition at line 84 of file L2Potential.h.
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 32 of file L2Potential.cpp.
References ParticleSet::addTable(), APP_ABORT, L2Potential::IonConfig, and L2Potential::myTableIndex.
const ParticleSet& IonConfig |
reference to the ionic configuration
Definition at line 60 of file L2Potential.h.
Referenced by L2Potential::add(), L2Potential::get(), L2Potential::makeClone(), and L2Potential::resetTargetParticleSet().
int myTableIndex |
distance table index
Definition at line 64 of file L2Potential.h.
Referenced by L2Potential::evaluate(), L2Potential::evaluateD(), L2Potential::evaluateDK(), L2Potential::L2Potential(), and L2Potential::resetTargetParticleSet().
int NumIons |
the number of ions
Definition at line 62 of file L2Potential.h.
Referenced by L2Potential::evaluate(), L2Potential::evaluateD(), L2Potential::evaluateDK(), and L2Potential::L2Potential().
std::vector<L2RadialPotential*> PP |
PP[iat] is the L2 potential for the iat-th particle.
Definition at line 68 of file L2Potential.h.
Referenced by L2Potential::add(), L2Potential::evaluate(), L2Potential::evaluateD(), L2Potential::evaluateDK(), and L2Potential::L2Potential().
std::vector<std::unique_ptr<L2RadialPotential> > PPset |
unique set of L2 PP to cleanup
Definition at line 66 of file L2Potential.h.
Referenced by L2Potential::add(), L2Potential::L2Potential(), and L2Potential::makeClone().
TrialWaveFunction* psi_ref |
Associated trial wavefunction.
Definition at line 70 of file L2Potential.h.
Referenced by L2Potential::evaluate(), and L2Potential::L2Potential().
struct qmcplusplus::LocalECPotential |
Evaluate the local potentials (either pseudo or full core) around each ion.
Definition at line 33 of file LocalECPotential.h.
Public Types | |
using | GridType = OneDimGridBase< RealType > |
using | RadialPotentialType = OneDimCubicSpline< RealType > |
![]() | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
Public Member Functions | |
LocalECPotential (const ParticleSet &ions, ParticleSet &els) | |
std::string | getClassName () const override |
return class name More... | |
void | resetTargetParticleSet (ParticleSet &P) override |
Reset the data with the target ParticleSet. More... | |
void | contributeParticleQuantities () override |
void | checkoutParticleQuantities (TraceManager &tm) override |
Return_t | evaluate_sp (ParticleSet &P) |
void | deleteParticleQuantities () override |
Return_t | evaluate (ParticleSet &P) override |
Evaluate the local energy contribution of this component. More... | |
Return_t | evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
Return_t | evaluate_orig (ParticleSet &P) |
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) override |
void | add (int groupID, std::unique_ptr< RadialPotentialType > &&ppot, RealType z) |
Add a RadialPotentialType of a species. More... | |
![]() | |
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 | addObservables (PropertySetType &plist, BufferType &collectables) |
named values to the property list Default implementaton uses addValue(plist_) 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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
virtual void | setObservables (PropertySetType &plist) |
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... | |
virtual void | setParticlePropertyList (PropertySetType &plist, int offset) |
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 | 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... | |
Public Attributes | |
const ParticleSet & | IonConfig |
reference to the ionic configuration More... | |
int | NumIons |
the number of ioncs More... | |
int | myTableIndex |
distance table index More... | |
RealType | PPtmp |
temporary energy per particle for pbyp move More... | |
std::vector< std::unique_ptr< RadialPotentialType > > | PPset |
unique set of local ECP to cleanup More... | |
std::vector< RadialPotentialType * > | PP |
PP[iat] is the local potential for the iat-th particle. More... | |
std::vector< RealType > | Zeff |
effective charge per ion More... | |
std::vector< RealType > | gZeff |
effective charge per species More... | |
Vector< RealType > | PPart |
energy per particle More... | |
Array< TraceReal, 1 > * | Ve_sample |
single particle trace samples More... | |
Array< TraceReal, 1 > * | Vi_sample |
const ParticleSet & | Peln |
const ParticleSet & | Pion |
Additional Inherited Members | |
![]() | |
virtual void | contributeScalarQuantities () |
virtual void | checkoutScalarQuantities (TraceManager &tm) |
virtual void | collectScalarQuantities () |
virtual void | deleteScalarQuantities () |
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... | |
![]() | |
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_ |
using GridType = OneDimGridBase<RealType> |
Definition at line 35 of file LocalECPotential.h.
using RadialPotentialType = OneDimCubicSpline<RealType> |
Definition at line 36 of file LocalECPotential.h.
LocalECPotential | ( | const ParticleSet & | ions, |
ParticleSet & | els | ||
) |
Definition at line 24 of file LocalECPotential.cpp.
References ParticleSet::addTable(), ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), ParticleSet::getTotalNum(), LocalECPotential::gZeff, LocalECPotential::myTableIndex, LocalECPotential::NumIons, OperatorBase::POTENTIAL, LocalECPotential::PP, LocalECPotential::PPset, OperatorBase::setEnergyDomain(), OperatorBase::twoBodyQuantumDomain(), and LocalECPotential::Zeff.
void add | ( | int | groupID, |
std::unique_ptr< RadialPotentialType > && | ppot, | ||
RealType | z | ||
) |
Add a RadialPotentialType of a species.
groupID | index of the ion species |
ppot | local pseudopotential |
z | effective charge of groupID particle |
Definition at line 46 of file LocalECPotential.cpp.
References ParticleSet::GroupID, LocalECPotential::gZeff, LocalECPotential::IonConfig, LocalECPotential::PP, LocalECPotential::PPset, and LocalECPotential::Zeff.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 63 of file LocalECPotential.cpp.
References TraceManager::checkout_real(), OperatorBase::name_, LocalECPotential::Peln, LocalECPotential::Pion, OperatorBase::request_, TraceRequest::streaming_array(), OperatorBase::streaming_particles_, LocalECPotential::Ve_sample, and LocalECPotential::Vi_sample.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 61 of file LocalECPotential.cpp.
References TraceRequest::contribute_array(), OperatorBase::name_, and OperatorBase::request_.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 73 of file LocalECPotential.cpp.
References OperatorBase::streaming_particles_, LocalECPotential::Ve_sample, and LocalECPotential::Vi_sample.
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 84 of file LocalECPotential.cpp.
References LocalECPotential::evaluate_sp(), ParticleSet::getDistTableAB(), ParticleSet::getTotalNum(), LocalECPotential::myTableIndex, LocalECPotential::NumIons, LocalECPotential::PP, OperatorBase::streaming_particles_, OperatorBase::value_, and LocalECPotential::Zeff.
LocalECPotential::Return_t evaluate_orig | ( | ParticleSet & | P | ) |
Definition at line 203 of file LocalECPotential.cpp.
References ParticleSet::getDistTableAB(), ParticleSet::getTotalNum(), LocalECPotential::myTableIndex, LocalECPotential::NumIons, LocalECPotential::PP, OperatorBase::value_, and LocalECPotential::Zeff.
Referenced by LocalECPotential::evaluate_sp().
LocalECPotential::Return_t evaluate_sp | ( | ParticleSet & | P | ) |
Definition at line 144 of file LocalECPotential.cpp.
References qmcplusplus::abs(), APP_ABORT, qmcplusplus::app_log(), LocalECPotential::evaluate_orig(), ParticleSet::getDistTableAB(), ParticleSet::getTotalNum(), LocalECPotential::myTableIndex, LocalECPotential::NumIons, LocalECPotential::PP, Array< T, D, ALLOC >::sum(), TraceManager::trace_tol, OperatorBase::value_, LocalECPotential::Ve_sample, LocalECPotential::Vi_sample, and LocalECPotential::Zeff.
Referenced by LocalECPotential::evaluate().
|
overridevirtual |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase.
P | target particle set (electrons) |
ions | source particle set (ions) |
psi | Trial wave function |
hf_terms | Adds OperatorBase's contribution to Re [(dH)Psi]/Psi |
pulay_terms | Adds OperatorBase's contribution to Re [(H-E_L)dPsi]/Psi |
Reimplemented from OperatorBase.
Definition at line 108 of file LocalECPotential.cpp.
References ParticleSet::getDistTableAB(), ParticleSet::getTotalNum(), LocalECPotential::myTableIndex, LocalECPotential::NumIons, LocalECPotential::PP, OperatorBase::value_, and LocalECPotential::Zeff.
|
inlineoverridevirtual |
write about the class
Implements OperatorBase.
Definition at line 89 of file LocalECPotential.h.
References OhmmsElementBase::getName(), and LocalECPotential::IonConfig.
|
inlineoverridevirtual |
|
overridevirtual |
Implements OperatorBase.
Definition at line 220 of file LocalECPotential.cpp.
References LocalECPotential::gZeff, LocalECPotential::IonConfig, and LocalECPotential::PPset.
|
inlineoverridevirtual |
Read the input parameter.
cur | xml node for a OperatorBase object |
Implements OperatorBase.
Definition at line 87 of file LocalECPotential.h.
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 37 of file LocalECPotential.cpp.
References ParticleSet::addTable(), APP_ABORT, LocalECPotential::IonConfig, and LocalECPotential::myTableIndex.
std::vector<RealType> gZeff |
effective charge per species
Definition at line 53 of file LocalECPotential.h.
Referenced by LocalECPotential::add(), LocalECPotential::LocalECPotential(), and LocalECPotential::makeClone().
const ParticleSet& IonConfig |
reference to the ionic configuration
Definition at line 39 of file LocalECPotential.h.
Referenced by LocalECPotential::add(), LocalECPotential::get(), LocalECPotential::makeClone(), and LocalECPotential::resetTargetParticleSet().
int myTableIndex |
distance table index
Definition at line 43 of file LocalECPotential.h.
Referenced by LocalECPotential::evaluate(), LocalECPotential::evaluate_orig(), LocalECPotential::evaluate_sp(), LocalECPotential::evaluateWithIonDerivs(), LocalECPotential::LocalECPotential(), and LocalECPotential::resetTargetParticleSet().
int NumIons |
the number of ioncs
Definition at line 41 of file LocalECPotential.h.
Referenced by LocalECPotential::evaluate(), LocalECPotential::evaluate_orig(), LocalECPotential::evaluate_sp(), LocalECPotential::evaluateWithIonDerivs(), and LocalECPotential::LocalECPotential().
const ParticleSet& Peln |
Definition at line 61 of file LocalECPotential.h.
Referenced by LocalECPotential::checkoutParticleQuantities().
const ParticleSet& Pion |
Definition at line 62 of file LocalECPotential.h.
Referenced by LocalECPotential::checkoutParticleQuantities().
std::vector<RadialPotentialType*> PP |
PP[iat] is the local potential for the iat-th particle.
Definition at line 49 of file LocalECPotential.h.
Referenced by LocalECPotential::add(), LocalECPotential::evaluate(), LocalECPotential::evaluate_orig(), LocalECPotential::evaluate_sp(), LocalECPotential::evaluateWithIonDerivs(), and LocalECPotential::LocalECPotential().
energy per particle
Definition at line 55 of file LocalECPotential.h.
std::vector<std::unique_ptr<RadialPotentialType> > PPset |
unique set of local ECP to cleanup
Definition at line 47 of file LocalECPotential.h.
Referenced by LocalECPotential::add(), LocalECPotential::LocalECPotential(), and LocalECPotential::makeClone().
RealType PPtmp |
temporary energy per particle for pbyp move
Definition at line 45 of file LocalECPotential.h.
single particle trace samples
Definition at line 58 of file LocalECPotential.h.
Referenced by LocalECPotential::checkoutParticleQuantities(), LocalECPotential::deleteParticleQuantities(), and LocalECPotential::evaluate_sp().
Definition at line 59 of file LocalECPotential.h.
Referenced by LocalECPotential::checkoutParticleQuantities(), LocalECPotential::deleteParticleQuantities(), and LocalECPotential::evaluate_sp().
std::vector<RealType> Zeff |
effective charge per ion
Definition at line 51 of file LocalECPotential.h.
Referenced by LocalECPotential::add(), LocalECPotential::evaluate(), LocalECPotential::evaluate_orig(), LocalECPotential::evaluate_sp(), LocalECPotential::evaluateWithIonDerivs(), and LocalECPotential::LocalECPotential().
class qmcplusplus::MPC |
Public Member Functions | |
MPC (ParticleSet &ref, double cutoff) | |
~MPC () override | |
copy constructor More... | |
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... | |
bool | put (xmlNodePtr cur) override |
Do nothing. More... | |
bool | get (std::ostream &os) const override |
write about the class More... | |
std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) override |
![]() | |
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 | addObservables (PropertySetType &plist, BufferType &collectables) |
named values to the property list Default implementaton uses addValue(plist_) 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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
virtual void | setObservables (PropertySetType &plist) |
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... | |
virtual void | setParticlePropertyList (PropertySetType &plist, int offset) |
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... | |
Public Attributes | |
std::vector< ComplexType > | RhoAvg_G |
std::vector< RealType > | f_G |
double | f_0 |
bool | FirstTime |
int | NumSpecies |
int | ChargeAttribIndx |
int | MemberAttribIndx |
int | NParticles |
RealType | myConst |
RealType | myRcut |
std::vector< RealType > | Zat |
std::vector< RealType > | Zspec |
std::vector< int > | NofSpecies |
Protected Member Functions | |
void | initBreakup (const ParticleSet &ptcl) |
void | compute_g_G (const ParticleSet &ptcl, double &g_0_N, std::vector< double > &g_G_N, int N) |
void | init_gvecs (const ParticleSet &ptcl) |
void | init_f_G (const ParticleSet &ptcl) |
void | init_spline (const ParticleSet &ptcl) |
Return_t | evalSR (ParticleSet &P) const |
Return_t | evalLR (ParticleSet &P) const |
![]() | |
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 | |
std::shared_ptr< UBspline_3d_d > | VlongSpline |
double | Vconst |
double | Ecut |
std::vector< TinyVector< int, OHMMS_DIM > > | Gints |
std::vector< PosType > | Gvecs |
std::vector< ComplexType > | Rho_G |
std::array< size_t, OHMMS_DIM > | SplineDim |
int | MaxDim |
const int | d_aa_ID |
![]() | |
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_ |
MPC | ( | ParticleSet & | ref, |
double | cutoff | ||
) |
Definition at line 35 of file MPC.cpp.
References MPC::initBreakup(), and qmcplusplus::NEED_FULL_TABLE_ON_HOST_AFTER_DONEPBYP.
|
overridedefault |
copy constructor
|
protected |
Definition at line 78 of file MPC.cpp.
References Array< T, D, ALLOC >::data(), ParticleSet::getLattice(), MPC::Gints, qmcplusplus::Units::force::N, norm(), OHMMS_DIM, qmcplusplus::real(), and qmcplusplus::sqrt().
Referenced by MPC::init_f_G().
|
protected |
Definition at line 338 of file MPC.cpp.
References qmcplusplus::floor(), ParticleSet::getLattice(), MPC::NParticles, OHMMS_DIM, ParticleSet::R, and MPC::VlongSpline.
Referenced by MPC::evaluate().
|
protected |
Definition at line 322 of file MPC.cpp.
References BLAS::cone, MPC::d_aa_ID, ParticleSet::getDistTableAA(), and MPC::NParticles.
Referenced by MPC::evaluate().
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 355 of file MPC.cpp.
References MPC::evalLR(), MPC::evalSR(), OperatorBase::value_, and MPC::Vconst.
|
inlineoverridevirtual |
write about the class
Implements OperatorBase.
|
inlineoverridevirtual |
return class name
Implements OperatorBase.
|
protected |
Definition at line 165 of file MPC.cpp.
References qmcplusplus::abs(), qmcplusplus::app_log(), MPC::compute_g_G(), qmcplusplus::cos(), qmcplusplus::dot(), qmcplusplus::extrap(), MPC::f_0, MPC::f_G, ParticleSet::getLattice(), MPC::Gints, MPC::Gvecs, MPC::MaxDim, qmcplusplus::Units::force::N, qmcplusplus::sin(), and qmcplusplus::sqrt().
Referenced by MPC::initBreakup().
|
protected |
Definition at line 43 of file MPC.cpp.
References qmcplusplus::abs(), qmcplusplus::app_log(), ParticleSet::Density_G, ParticleSet::DensityReducedGvecs, qmcplusplus::dot(), MPC::Ecut, ParticleSet::getLattice(), MPC::Gints, MPC::Gvecs, MPC::MaxDim, OHMMS_DIM, MPC::Rho_G, and MPC::SplineDim.
Referenced by MPC::initBreakup().
|
protected |
Definition at line 221 of file MPC.cpp.
References qmcplusplus::app_log(), Array< T, D, ALLOC >::data(), qmcplusplus::dot(), MPC::f_0, MPC::f_G, ParticleSet::getLattice(), MPC::Gints, MPC::Gvecs, norm(), OHMMS_DIM, qmcplusplus::real(), MPC::Rho_G, MPC::SplineDim, MPC::Vconst, and MPC::VlongSpline.
Referenced by MPC::initBreakup().
|
protected |
Definition at line 291 of file MPC.cpp.
References qmcplusplus::app_log(), ParticleSet::getTotalNum(), MPC::init_f_G(), MPC::init_gvecs(), MPC::init_spline(), and MPC::NParticles.
Referenced by MPC::MPC().
|
overridevirtual |
Implements OperatorBase.
|
overridevirtual |
Do nothing.
Implements OperatorBase.
Definition at line 361 of file MPC.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_log(), MPC::Ecut, and OhmmsAttributeSet::put().
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
|
protected |
Definition at line 46 of file MPC.h.
Referenced by MPC::evalSR().
|
protected |
Definition at line 39 of file MPC.h.
Referenced by MPC::init_gvecs(), and MPC::put().
double f_0 |
Definition at line 61 of file MPC.h.
Referenced by MPC::init_f_G(), and MPC::init_spline().
std::vector<RealType> f_G |
Definition at line 59 of file MPC.h.
Referenced by MPC::init_f_G(), and MPC::init_spline().
|
protected |
Definition at line 40 of file MPC.h.
Referenced by MPC::compute_g_G(), MPC::init_f_G(), MPC::init_gvecs(), and MPC::init_spline().
|
protected |
Definition at line 41 of file MPC.h.
Referenced by MPC::init_f_G(), MPC::init_gvecs(), and MPC::init_spline().
|
protected |
Definition at line 44 of file MPC.h.
Referenced by MPC::init_f_G(), and MPC::init_gvecs().
int NParticles |
Definition at line 67 of file MPC.h.
Referenced by MPC::evalLR(), MPC::evalSR(), and MPC::initBreakup().
|
protected |
Definition at line 42 of file MPC.h.
Referenced by MPC::init_gvecs(), and MPC::init_spline().
std::vector<ComplexType> RhoAvg_G |
|
protected |
Definition at line 43 of file MPC.h.
Referenced by MPC::init_gvecs(), and MPC::init_spline().
|
protected |
Definition at line 38 of file MPC.h.
Referenced by MPC::evaluate(), and MPC::init_spline().
|
protected |
Definition at line 36 of file MPC.h.
Referenced by MPC::evalLR(), and MPC::init_spline().
class qmcplusplus::NonLocalECPotential |
Evaluate the semi local potentials.
Definition at line 39 of file NonLocalECPotential.h.
Public Member Functions | |
NonLocalECPotential (ParticleSet &ions, ParticleSet &els, TrialWaveFunction &psi, bool computeForces, bool enable_DLA) | |
constructor More... | |
~NonLocalECPotential () override | |
bool | dependsOnWaveFunction () const override |
return true if this operator depends on a wavefunction More... | |
std::string | getClassName () const override |
return class name More... | |
void | resetTargetParticleSet (ParticleSet &P) override |
Reset the data with the target ParticleSet. More... | |
void | contributeParticleQuantities () override |
void | checkoutParticleQuantities (TraceManager &tm) override |
void | deleteParticleQuantities () override |
Return_t | evaluate (ParticleSet &P) override |
Evaluate the local energy contribution of this component. More... | |
Return_t | evaluateDeterministic (ParticleSet &P) override |
Evaluate the local energy contribution of this component, deterministically based on current state. More... | |
void | mw_evaluate (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const override |
Evaluate the contribution of this component of multiple walkers. More... | |
Return_t | evaluateWithToperator (ParticleSet &P) override |
Evaluate the local energy contribution of this component with Toperators updated if requested. More... | |
void | mw_evaluateWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const override |
Evaluate the contribution of this component of multiple walkers. More... | |
void | mw_evaluatePerParticle (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< Real >> &listeners, const std::vector< ListenerVector< Real >> &listeners_ions) const override |
void | mw_evaluatePerParticleWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< Real >> &listeners, const std::vector< ListenerVector< Real >> &listeners_ions) const override |
Return_t | evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
Return_t | evaluateWithIonDerivsDeterministic (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
void | evaluateOneBodyOpMatrix (ParticleSet &P, const TWFFastDerivWrapper &psi, std::vector< ValueMatrix > &B) override |
Evaluate "B" matrix for observable. More... | |
void | evaluateOneBodyOpMatrixForceDeriv (ParticleSet &P, ParticleSet &source, const TWFFastDerivWrapper &psi, const int iat, std::vector< std::vector< ValueMatrix >> &Bforce) override |
Evaluate "dB/dR" matrices for observable. More... | |
void | setNonLocalMoves (xmlNodePtr cur) |
set non local moves options More... | |
void | setNonLocalMoves (const std::string &non_local_move_option, const double tau, const double alpha, const double gamma) |
int | makeNonLocalMovesPbyP (ParticleSet &P) |
make non local moves with particle-by-particle moves More... | |
Return_t | evaluateValueAndDerivatives (ParticleSet &P, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
bool | put (xmlNodePtr cur) override |
Do nothing. More... | |
bool | get (std::ostream &os) const override |
write about the class More... | |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to a collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
acquire a shared resource from a collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override |
return a shared resource to a collection More... | |
std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) override |
void | addComponent (int groupID, std::unique_ptr< NonLocalECPComponent > &&pp) |
void | setRandomGenerator (RandomBase< FullPrecRealType > *rng) override |
set the internal RNG pointer as the given pointer More... | |
void | addObservables (PropertySetType &plist, BufferType &collectables) override |
named values to the property list Default implementaton uses addValue(plist_) More... | |
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 |
void | registerObservables (std::vector< ObservableHelper > &h5list, hdf_archive &file) const override |
add to observable descriptor for hdf5 The default implementation is to register a scalar for this->value_ More... | |
void | setComputeForces (bool val) override |
Set the flag whether to compute forces or not. More... | |
![]() | |
OperatorBase () | |
Construct a new Operator Base object Default and unique empty constructor. More... | |
virtual | ~OperatorBase ()=default |
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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
virtual void | setHistories (Walker_t &ThisWalker) |
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 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 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 | 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... | |
![]() | |
Real | g (Real r) |
void | initVarReduction (Real rcut, int m, int numFuncs) |
ForceBase (ParticleSet &ions, ParticleSet &elns) | |
virtual | ~ForceBase () |
void | registerObservablesF (std::vector< ObservableHelper > &h5list, hdf_archive &file) const |
void | addObservablesF (QMCTraits::PropertySetType &plist) |
void | addObservablesStress (QMCTraits::PropertySetType &plist) |
void | setObservablesF (QMCTraits::PropertySetType &plist) |
void | setObservablesStress (QMCTraits::PropertySetType &plist) |
void | setParticleSetF (QMCTraits::PropertySetType &plist, int offset) |
void | setParticleSetStress (QMCTraits::PropertySetType &plist, int offset) |
bool | getAddIonIon () const noexcept |
void | setAddIonIon (bool val) noexcept |
const ParticleSet::ParticlePos & | getForces () const noexcept |
void | setForces (const ParticleSet::ParticlePos &forces) |
void | setForces (Real val) |
const ParticleSet::ParticlePos & | getForcesIonIon () const noexcept |
void | setForcesIonIon (const ParticleSet::ParticlePos &forces_ion_ion) |
const SymTensor< Real, OHMMS_DIM > & | getStressIonIon () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressEE () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressEI () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStressKin () const noexcept |
const SymTensor< Real, OHMMS_DIM > & | getStress () const noexcept |
Static Protected Member Functions | |
static void | mw_evaluateImpl (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, bool Tmove, std::optional< ListenerOption< Real >> listeners, bool keepGrid=false) |
the actual implementation for batched walkers, used by mw_evaluate, mw_evaluateWithToperator mw_evaluatePerPaticleWithToperator More... | |
Protected Attributes | |
RandomBase< FullPrecRealType > * | myRNG |
random number generator More... | |
std::vector< NonLocalECPComponent * > | PP |
the set of local-potentials (one for each ion) More... | |
std::vector< std::unique_ptr< NonLocalECPComponent > > | PPset |
unique NonLocalECPComponent to remove More... | |
ParticleSet & | IonConfig |
reference to the center ion More... | |
TrialWaveFunction & | Psi |
target TrialWaveFunction More... | |
bool | ComputeForces |
true if we should compute forces More... | |
bool | use_DLA |
true, determinant localization approximation(DLA) is enabled More... | |
![]() | |
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_ |
![]() | |
int | first_force_index_ |
int | n_nuc_ |
int | n_el_ |
int | tries_ |
bool | first_time_ |
bool | add_ion_ion_ |
Determines if ion-ion force will be added to electron-ion force in derived force estimators. If false, forces_ion_ion_=0.0. More... | |
ParticleSet & | ions_ |
ParticleSet::ParticlePos | forces_ |
ParticleSet::ParticlePos | forces_ion_ion_ |
SymTensor< Real, OHMMS_DIM > | stress_ion_ion_ |
SymTensor< Real, OHMMS_DIM > | stress_ee_ |
SymTensor< Real, OHMMS_DIM > | stress_ei_ |
SymTensor< Real, OHMMS_DIM > | stress_kin_ |
SymTensor< Real, OHMMS_DIM > | stress_ |
std::string | prefix_ |
std::string | pair_name_ |
Real | rcut_ |
int | m_ |
std::vector< Real > | ck_ |
Private Types | |
using | Real = QMCTraits::RealType |
Private Member Functions | |
void | evaluateImpl (ParticleSet &P, bool Tmove, bool keepGrid=false) |
the actual implementation, used by evaluate and evaluateWithToperator More... | |
void | evalIonDerivsImpl (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms, bool keepGrid=false) |
void | computeOneElectronTxy (ParticleSet &P, const int ref_elec) |
compute the T move transition probability for a given electron member variable nonLocalOps.Txy is updated More... | |
void | markAffectedElecs (const DistanceTableAB &myTable, int iel) |
mark all the electrons affected by Tmoves and update ElecNeighborIons and IonNeighborElecs More... | |
Private Attributes | |
int | NumIons |
number of ions More... | |
int | myTableIndex |
index of distance table for the ion-el pair More... | |
ParticleSet & | Peln |
reference to the electrons More... | |
NeighborLists | ElecNeighborIons |
neighborlist of electrons More... | |
NeighborLists | IonNeighborElecs |
neighborlist of ions More... | |
int | UseTMove |
use T-moves More... | |
std::vector< bool > | elecTMAffected |
ture if an electron is affected by other electrons moved by T-moves More... | |
NonLocalTOperator | nonLocalOps |
non local operator More... | |
ParticleSet::ParticlePos | PulayTerm |
Pulay force vector. More... | |
std::vector< NonLocalData > | tmove_xy_ |
Array< TraceReal, 1 > * | Ve_sample |
single particle trace samples More... | |
Array< TraceReal, 1 > * | Vi_sample |
std::vector< std::vector< NLPPJob< Real > > > | nlpp_jobs |
NLPP job list of ion-electron pairs by spin group. More... | |
ResourceHandle< NonLocalECPotentialMultiWalkerResource > | mw_res_handle_ |
mult walker shared resource More... | |
Friends | |
class | testing::TestNonLocalECPotential |
Additional Inherited Members | |
![]() | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | Real = QMCTraits::RealType |
cheat, need to use virtual inheriance to clean up More... | |
![]() | |
virtual void | contributeScalarQuantities () |
virtual void | checkoutScalarQuantities (TraceManager &tm) |
virtual void | collectScalarQuantities () |
virtual void | deleteScalarQuantities () |
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... | |
|
private |
Definition at line 41 of file NonLocalECPotential.h.
NonLocalECPotential | ( | ParticleSet & | ions, |
ParticleSet & | els, | ||
TrialWaveFunction & | psi, | ||
bool | computeForces, | ||
bool | enable_DLA | ||
) |
constructor
ions | the positions of the ions |
els | the positions of the electrons |
psi | trial wavefunction |
Definition at line 54 of file NonLocalECPotential.cpp.
References ParticleSet::addTable(), ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), ParticleSet::getTotalNum(), ParticleSet::groups(), ParticleSet::groupsize(), NonLocalECPotential::IonConfig, NonLocalECPotential::myTableIndex, NonLocalECPotential::nlpp_jobs, OperatorBase::NONLOCAL, NonLocalECPotential::NumIons, OperatorBase::POTENTIAL, NonLocalECPotential::PP, NonLocalECPotential::PPset, ForceBase::prefix_, NonLocalECPotential::PulayTerm, Vector< T, Alloc >::resize(), OperatorBase::setEnergyDomain(), OperatorBase::twoBodyQuantumDomain(), and OperatorBase::update_mode_.
|
overridedefault |
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from OperatorBase.
Definition at line 780 of file NonLocalECPotential.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), ResourceCollection::lendResource(), and NonLocalECPotential::mw_res_handle_.
void addComponent | ( | int | groupID, |
std::unique_ptr< NonLocalECPComponent > && | pp | ||
) |
Definition at line 759 of file NonLocalECPotential.cpp.
References ParticleSet::GroupID, NonLocalECPotential::IonConfig, NonLocalECPotential::PP, and NonLocalECPotential::PPset.
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 805 of file NonLocalECPotential.cpp.
References RecordNamedProperty< T >::add(), OperatorBase::addValue(), NonLocalECPotential::ComputeForces, ForceBase::first_force_index_, ForceBase::n_nuc_, OHMMS_DIM, and RecordNamedProperty< T >::size().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 93 of file NonLocalECPotential.cpp.
References TraceManager::checkout_real(), NonLocalECPotential::IonConfig, OperatorBase::name_, NonLocalECPotential::Peln, OperatorBase::request_, TraceRequest::streaming_array(), OperatorBase::streaming_particles_, NonLocalECPotential::Ve_sample, and NonLocalECPotential::Vi_sample.
|
private |
compute the T move transition probability for a given electron member variable nonLocalOps.Txy is updated
P | particle set |
ref_elec | reference electron id |
Definition at line 537 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ElecNeighborIons, ParticleSet::getDistTableAB(), NeighborLists::getNeighborList(), NonLocalECPotential::myTableIndex, NonLocalECPotential::PP, NonLocalECPotential::Psi, NonLocalECPotential::tmove_xy_, and NonLocalECPotential::use_DLA.
Referenced by NonLocalECPotential::makeNonLocalMovesPbyP().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 91 of file NonLocalECPotential.cpp.
References TraceRequest::contribute_array(), OperatorBase::name_, and OperatorBase::request_.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from OperatorBase.
Definition at line 767 of file NonLocalECPotential.cpp.
References ResourceCollection::addResource(), and NonLocalECPotential::PPset.
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 103 of file NonLocalECPotential.cpp.
References OperatorBase::streaming_particles_, NonLocalECPotential::Ve_sample, and NonLocalECPotential::Vi_sample.
|
inlineoverridevirtual |
return true if this operator depends on a wavefunction
Reimplemented from OperatorBase.
Definition at line 49 of file NonLocalECPotential.h.
|
private |
Definition at line 461 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ElecNeighborIons, ParticleSet::first(), ForceBase::forces_, qmcplusplus::generateRandomRotationMatrix(), ParticleSet::getDistTableAB(), NeighborLists::getNeighborList(), ParticleSet::getTotalNum(), ParticleSet::groups(), NonLocalECPotential::IonNeighborElecs, ParticleSet::last(), NonLocalECPotential::myRNG, NonLocalECPotential::myTableIndex, NonLocalECPotential::NumIons, NonLocalECPotential::PP, NonLocalECPotential::PPset, TrialWaveFunction::prepareGroup(), NonLocalECPotential::Psi, NonLocalECPotential::PulayTerm, NonLocalECPotential::tmove_xy_, and OperatorBase::value_.
Referenced by NonLocalECPotential::evaluateWithIonDerivs(), and NonLocalECPotential::evaluateWithIonDerivsDeterministic().
|
overridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 113 of file NonLocalECPotential.cpp.
References NonLocalECPotential::evaluateImpl(), and OperatorBase::value_.
|
overridevirtual |
Evaluate the local energy contribution of this component, deterministically based on current state.
The correct behavior of this routine requires estimators with non-deterministic components in their evaluate() function to override this function.
P | input configuration containing N particles |
Reimplemented from OperatorBase.
Definition at line 119 of file NonLocalECPotential.cpp.
References NonLocalECPotential::evaluateImpl(), and OperatorBase::value_.
|
private |
the actual implementation, used by evaluate and evaluateWithToperator
P | particle set |
Tmove | whether Txy for Tmove is updated |
keepGrid. | If true, does not randomize the quadrature grid before evaluation. |
Definition at line 175 of file NonLocalECPotential.cpp.
References qmcplusplus::abs(), APP_ABORT, qmcplusplus::app_log(), NonLocalECPotential::ComputeForces, NonLocalECPotential::ElecNeighborIons, ParticleSet::first(), ForceBase::forces_, qmcplusplus::generateRandomRotationMatrix(), ParticleSet::getDistTableAB(), NeighborLists::getNeighborList(), ParticleSet::getTotalNum(), ParticleSet::groups(), NonLocalECPotential::IonNeighborElecs, ParticleSet::last(), NonLocalECPotential::myRNG, NonLocalECPotential::myTableIndex, NonLocalECPotential::NumIons, NonLocalECPotential::PP, NonLocalECPotential::PPset, TrialWaveFunction::prepareGroup(), NonLocalECPotential::Psi, OperatorBase::streaming_particles_, Array< T, D, ALLOC >::sum(), NonLocalECPotential::tmove_xy_, TraceManager::trace_tol, NonLocalECPotential::use_DLA, OperatorBase::value_, NonLocalECPotential::Ve_sample, and NonLocalECPotential::Vi_sample.
Referenced by NonLocalECPotential::evaluate(), NonLocalECPotential::evaluateDeterministic(), and NonLocalECPotential::evaluateWithToperator().
|
overridevirtual |
Evaluate "B" matrix for observable.
Filippi scheme for computing fast derivatives.
[in] | P | target particle set (electrons) |
[in] | psi,Trial | Wavefunction wrapper for fast derivatives. |
[in,out] | B. | List of B matrices for each species. |
Reimplemented from OperatorBase.
Definition at line 553 of file NonLocalECPotential.cpp.
References B(), NonLocalECPotential::ElecNeighborIons, ParticleSet::first(), qmcplusplus::generateRandomRotationMatrix(), ParticleSet::getDistTableAB(), NeighborLists::getNeighborList(), ParticleSet::getTotalNum(), ParticleSet::groups(), NonLocalECPotential::IonNeighborElecs, ParticleSet::last(), NonLocalECPotential::myRNG, NonLocalECPotential::myTableIndex, NonLocalECPotential::NumIons, NonLocalECPotential::PP, and NonLocalECPotential::PPset.
|
overridevirtual |
Evaluate "dB/dR" matrices for observable.
Filippi scheme for computing fast derivatives.
[in] | P,target | particle set (electrons) |
[in] | source,ion | particle set |
[in] | psi,Trial | Wavefunction wrapper for fast derivatives. |
[in] | iat |
Reimplemented from OperatorBase.
Definition at line 589 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ElecNeighborIons, ParticleSet::first(), qmcplusplus::generateRandomRotationMatrix(), ParticleSet::getDistTableAB(), NeighborLists::getNeighborList(), ParticleSet::getTotalNum(), ParticleSet::groups(), NonLocalECPotential::IonNeighborElecs, ParticleSet::last(), NonLocalECPotential::myRNG, NonLocalECPotential::myTableIndex, NonLocalECPotential::NumIons, NonLocalECPotential::PP, and NonLocalECPotential::PPset.
|
override |
Definition at line 22 of file NonLocalECPotential.deriv.cpp.
References qmcplusplus::generateRandomRotationMatrix(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), ParticleSet::getTotalNum(), NonLocalECPotential::myRNG, NonLocalECPotential::myTableIndex, NonLocalECPotential::NumIons, NonLocalECPotential::PP, NonLocalECPotential::PPset, NonLocalECPotential::Psi, and OperatorBase::value_.
|
overridevirtual |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase.
P | target particle set (electrons) |
ions | source particle set (ions) |
psi | Trial wave function |
hf_terms | Adds OperatorBase's contribution to Re [(dH)Psi]/Psi |
pulay_terms | Adds OperatorBase's contribution to Re [(H-E_L)dPsi]/Psi |
Reimplemented from OperatorBase.
Definition at line 516 of file NonLocalECPotential.cpp.
References NonLocalECPotential::evalIonDerivsImpl(), and OperatorBase::value_.
|
overridevirtual |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase.
If there's no stochastic component, defaults to evaluateWithIonDerivs. If not otherwise specified, this defaults to evaluate().
P | target particle set (electrons) |
ions | source particle set (ions) |
psi | Trial wave function |
hf_terms | Adds OperatorBase's contribution to Re [(dH)Psi]/Psi |
pulay_terms | Adds OperatorBase's contribution to Re [(H-E_L)dPsi]/Psi |
Reimplemented from OperatorBase.
Definition at line 526 of file NonLocalECPotential.cpp.
References NonLocalECPotential::evalIonDerivsImpl(), and OperatorBase::value_.
|
overridevirtual |
Evaluate the local energy contribution of this component with Toperators updated if requested.
P | input configuration containing N particles |
Reimplemented from OperatorBase.
Definition at line 132 of file NonLocalECPotential.cpp.
References NonLocalECPotential::evaluateImpl(), qmcplusplus::TMOVE_V0, qmcplusplus::TMOVE_V3, NonLocalECPotential::UseTMove, and OperatorBase::value_.
|
inlineoverridevirtual |
write about the class
Implements OperatorBase.
Definition at line 130 of file NonLocalECPotential.h.
References OhmmsElementBase::getName(), and NonLocalECPotential::IonConfig.
|
inlineoverridevirtual |
|
overridevirtual |
Implements OperatorBase.
Definition at line 794 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ComputeForces, NonLocalECPotential::IonConfig, NonLocalECPotential::PPset, and NonLocalECPotential::use_DLA.
Referenced by qmcplusplus::TEST_CASE().
int makeNonLocalMovesPbyP | ( | ParticleSet & | P | ) |
make non local moves with particle-by-particle moves
P | particle set |
Definition at line 627 of file NonLocalECPotential.cpp.
References ParticleSet::acceptMove(), TrialWaveFunction::acceptMove(), TrialWaveFunction::calcRatioGrad(), TrialWaveFunction::completeUpdates(), NonLocalECPotential::computeOneElectronTxy(), NonLocalData::Delta, ParticleSet::donePbyP(), NonLocalECPotential::elecTMAffected, ParticleSet::first(), ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), ParticleSet::getTotalNum(), NonLocalTOperator::groupByElectron(), ParticleSet::groups(), ParticleSet::last(), ParticleSet::makeMoveAndCheck(), NonLocalECPotential::markAffectedElecs(), NonLocalECPotential::myRNG, NonLocalECPotential::myTableIndex, NonLocalECPotential::nonLocalOps, NonLocalData::PID, TrialWaveFunction::prepareGroup(), NonLocalECPotential::Psi, NonLocalTOperator::selectMove(), qmcplusplus::TMOVE_V0, qmcplusplus::TMOVE_V1, qmcplusplus::TMOVE_V3, NonLocalECPotential::tmove_xy_, and NonLocalECPotential::UseTMove.
Referenced by QMCHamiltonian::makeNonLocalMoves(), and QMCHamiltonian::mw_makeNonLocalMoves().
|
private |
mark all the electrons affected by Tmoves and update ElecNeighborIons and IonNeighborElecs
myTable | electron ion distance table |
iel | reference electron Note this function should be called before acceptMove for a Tmove |
Definition at line 716 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ElecNeighborIons, NonLocalECPotential::elecTMAffected, DistanceTableAB::getDistRow(), NeighborLists::getNeighborList(), DistanceTableAB::getTempDists(), NonLocalECPotential::IonNeighborElecs, NonLocalECPotential::NumIons, and NonLocalECPotential::PP.
Referenced by NonLocalECPotential::makeNonLocalMovesPbyP().
|
overridevirtual |
Evaluate the contribution of this component of multiple walkers.
Take o_list and p_list update evaluation result variables in o_list? really should reduce vector of local_energies. matching the ordering and size of o list the this can be call for 1 or more QMCHamiltonians
o_list | |
wf_list | |
p_list |
Temporary raw omp pragma for simple thread parallelism ignoring the driver level concurrency
TODO: replace this with a proper abstraction. It should adequately describe the behavior and strictly limit the activation of this level concurrency to when it is intended. It is unlikely to belong in this function.
This implicitly depends on openmp work division logic. Essentially adhoc runtime crowds over which we have given up control of thread/global scope. How many walkers per thread? How to handle their data movement if any of these hamiltonians should be accelerated? We can neither reason about or describe it in C++
As I understand it it should only be required for as long as the AMD openmp offload compliler is incapable of running multiple threads. They should/must fix their compiler before delivery of frontier and it should be removed at that point at latest
If you want 16 threads of 1 walker that should be 16 crowds of 1 not one crowd of 16 with openmp thrown in at hamiltonian level. If this must be different from the other crowd batching. Make this a reasoned about and controlled level of concurency blocking at the driver level.
This is only thread safe only if each walker has a complete set of anything involved in an Operator.evaluate.
Reimplemented from OperatorBase.
Definition at line 125 of file NonLocalECPotential.cpp.
References NonLocalECPotential::mw_evaluateImpl().
|
staticprotected |
the actual implementation for batched walkers, used by mw_evaluate, mw_evaluateWithToperator mw_evaluatePerPaticleWithToperator
o_list | the list of NonLocalECPotential in a walker batch |
wf_list | the list of TrialWaveFunction in a walker batch |
p_list | the list of ParticleSet in a walker batch |
Tmove | whether Txy for Tmove is updated |
listeners | optional listeners which allow per particle and reduced to share impl |
Definition at line 283 of file NonLocalECPotential.cpp.
References qmcplusplus::abs(), APP_ABORT, qmcplusplus::Units::charge::e, qmcplusplus::generateRandomRotationMatrix(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), NonLocalECPComponent::mw_evaluateOne(), TrialWaveFunction::mw_prepareGroup(), NonLocalECPotential::nlpp_jobs, NonLocalECPotential::Psi, ListenerVector< T >::report, and NonLocalECPotential::tmove_xy_.
Referenced by NonLocalECPotential::mw_evaluate(), TestNonLocalECPotential::mw_evaluateImpl(), NonLocalECPotential::mw_evaluatePerParticle(), NonLocalECPotential::mw_evaluatePerParticleWithToperator(), and NonLocalECPotential::mw_evaluateWithToperator().
|
override |
Definition at line 151 of file NonLocalECPotential.cpp.
References NonLocalECPotential::mw_evaluateImpl().
|
override |
Definition at line 161 of file NonLocalECPotential.cpp.
References NonLocalECPotential::mw_evaluateImpl(), qmcplusplus::TMOVE_V0, qmcplusplus::TMOVE_V3, and NonLocalECPotential::UseTMove.
|
overridevirtual |
Evaluate the contribution of this component of multiple walkers.
o_list | |
wf_list | |
p_list |
Reimplemented from OperatorBase.
Definition at line 141 of file NonLocalECPotential.cpp.
References NonLocalECPotential::mw_evaluateImpl(), qmcplusplus::TMOVE_V0, qmcplusplus::TMOVE_V3, and NonLocalECPotential::UseTMove.
|
inlineoverridevirtual |
|
overridevirtual |
add to observable descriptor for hdf5 The default implementation is to register a scalar for this->value_
h5desc | contains a set of hdf5 descriptors for a scalar observable |
gid | hdf5 group to which the observables belong |
Reimplemented from OperatorBase.
Definition at line 827 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ComputeForces, ForceBase::first_force_index_, ForceBase::n_nuc_, OHMMS_DIM, OperatorBase::registerObservables(), and qmcplusplus::Units::time::s.
|
overridevirtual |
return a shared resource to a collection
Reimplemented from OperatorBase.
Definition at line 787 of file NonLocalECPotential.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), and ResourceCollection::takebackResource().
|
overridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 47 of file NonLocalECPotential.cpp.
|
inlineoverridevirtual |
Set the flag whether to compute forces or not.
val | The boolean value for computing forces |
Reimplemented from OperatorBase.
Definition at line 168 of file NonLocalECPotential.h.
References NonLocalECPotential::ComputeForces.
|
inline |
set non local moves options
cur | the xml input |
Definition at line 107 of file NonLocalECPotential.h.
References NonLocalECPotential::nonLocalOps, NonLocalTOperator::put(), and NonLocalECPotential::UseTMove.
Referenced by QMCHamiltonian::setNonLocalMoves().
|
inline |
Definition at line 109 of file NonLocalECPotential.h.
References NonLocalECPotential::nonLocalOps, NonLocalTOperator::thingsThatShouldBeInMyConstructor(), and NonLocalECPotential::UseTMove.
|
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 843 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ComputeForces, ForceBase::first_force_index_, ForceBase::forces_, ForceBase::n_nuc_, OHMMS_DIM, and OperatorBase::setObservables().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 861 of file NonLocalECPotential.cpp.
References NonLocalECPotential::ComputeForces, ForceBase::first_force_index_, ForceBase::forces_, ForceBase::n_nuc_, OHMMS_DIM, and OperatorBase::setParticlePropertyList().
|
inlineoverridevirtual |
set the internal RNG pointer as the given pointer
rng | input RNG pointer |
Reimplemented from OperatorBase.
Definition at line 155 of file NonLocalECPotential.h.
References NonLocalECPotential::myRNG.
Referenced by QMCHamiltonian::setRandomGenerator(), and qmcplusplus::TEST_CASE().
|
friend |
Definition at line 260 of file NonLocalECPotential.h.
|
protected |
true if we should compute forces
Definition at line 197 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::addObservables(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::makeClone(), NonLocalECPotential::registerObservables(), NonLocalECPotential::setComputeForces(), NonLocalECPotential::setObservables(), and NonLocalECPotential::setParticlePropertyList().
|
private |
neighborlist of electrons
Definition at line 209 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::computeOneElectronTxy(), NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateOneBodyOpMatrix(), NonLocalECPotential::evaluateOneBodyOpMatrixForceDeriv(), and NonLocalECPotential::markAffectedElecs().
|
private |
ture if an electron is affected by other electrons moved by T-moves
Definition at line 215 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::makeNonLocalMovesPbyP(), and NonLocalECPotential::markAffectedElecs().
|
protected |
reference to the center ion
Definition at line 193 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::addComponent(), NonLocalECPotential::checkoutParticleQuantities(), NonLocalECPotential::get(), NonLocalECPotential::makeClone(), and NonLocalECPotential::NonLocalECPotential().
|
private |
neighborlist of ions
Definition at line 211 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateOneBodyOpMatrix(), NonLocalECPotential::evaluateOneBodyOpMatrixForceDeriv(), and NonLocalECPotential::markAffectedElecs().
|
private |
mult walker shared resource
Definition at line 231 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::acquireResource().
|
protected |
random number generator
Definition at line 187 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateOneBodyOpMatrix(), NonLocalECPotential::evaluateOneBodyOpMatrixForceDeriv(), NonLocalECPotential::evaluateValueAndDerivatives(), NonLocalECPotential::makeNonLocalMovesPbyP(), and NonLocalECPotential::setRandomGenerator().
|
private |
index of distance table for the ion-el pair
Definition at line 205 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::computeOneElectronTxy(), NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateOneBodyOpMatrix(), NonLocalECPotential::evaluateOneBodyOpMatrixForceDeriv(), NonLocalECPotential::evaluateValueAndDerivatives(), NonLocalECPotential::makeNonLocalMovesPbyP(), and NonLocalECPotential::NonLocalECPotential().
NLPP job list of ion-electron pairs by spin group.
Definition at line 229 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::mw_evaluateImpl(), and NonLocalECPotential::NonLocalECPotential().
|
private |
non local operator
Definition at line 217 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::makeNonLocalMovesPbyP(), and NonLocalECPotential::setNonLocalMoves().
|
private |
number of ions
Definition at line 203 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateOneBodyOpMatrix(), NonLocalECPotential::evaluateOneBodyOpMatrixForceDeriv(), NonLocalECPotential::evaluateValueAndDerivatives(), NonLocalECPotential::markAffectedElecs(), and NonLocalECPotential::NonLocalECPotential().
|
private |
reference to the electrons
Definition at line 207 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::checkoutParticleQuantities().
|
protected |
the set of local-potentials (one for each ion)
Definition at line 189 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::addComponent(), NonLocalECPotential::computeOneElectronTxy(), NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateOneBodyOpMatrix(), NonLocalECPotential::evaluateOneBodyOpMatrixForceDeriv(), NonLocalECPotential::evaluateValueAndDerivatives(), NonLocalECPotential::markAffectedElecs(), and NonLocalECPotential::NonLocalECPotential().
|
protected |
unique NonLocalECPComponent to remove
Definition at line 191 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::addComponent(), TestNonLocalECPotential::copyGridUnrotatedForTest(), NonLocalECPotential::createResource(), TestNonLocalECPotential::didGridChange(), NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateOneBodyOpMatrix(), NonLocalECPotential::evaluateOneBodyOpMatrixForceDeriv(), NonLocalECPotential::evaluateValueAndDerivatives(), NonLocalECPotential::makeClone(), and NonLocalECPotential::NonLocalECPotential().
|
protected |
target TrialWaveFunction
Definition at line 195 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::computeOneElectronTxy(), NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::evaluateValueAndDerivatives(), NonLocalECPotential::makeNonLocalMovesPbyP(), and NonLocalECPotential::mw_evaluateImpl().
|
private |
Pulay force vector.
Definition at line 219 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::evalIonDerivsImpl(), and NonLocalECPotential::NonLocalECPotential().
|
private |
Definition at line 221 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::computeOneElectronTxy(), NonLocalECPotential::evalIonDerivsImpl(), NonLocalECPotential::evaluateImpl(), NonLocalECPotential::makeNonLocalMovesPbyP(), and NonLocalECPotential::mw_evaluateImpl().
|
protected |
true, determinant localization approximation(DLA) is enabled
Definition at line 199 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::computeOneElectronTxy(), NonLocalECPotential::evaluateImpl(), and NonLocalECPotential::makeClone().
|
private |
use T-moves
Definition at line 213 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::evaluateWithToperator(), NonLocalECPotential::makeNonLocalMovesPbyP(), NonLocalECPotential::mw_evaluatePerParticleWithToperator(), NonLocalECPotential::mw_evaluateWithToperator(), and NonLocalECPotential::setNonLocalMoves().
single particle trace samples
Definition at line 225 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::checkoutParticleQuantities(), NonLocalECPotential::deleteParticleQuantities(), and NonLocalECPotential::evaluateImpl().
Definition at line 226 of file NonLocalECPotential.h.
Referenced by NonLocalECPotential::checkoutParticleQuantities(), NonLocalECPotential::deleteParticleQuantities(), and NonLocalECPotential::evaluateImpl().
class qmcplusplus::OperatorBase |
An abstract class for Local Energy operators.
Return_t is defined as RealTye. The types should be checked when using complex wave functions.
Definition at line 59 of file OperatorBase.h.
Public Types | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
Public Member Functions | |
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... | |
virtual std::string | getClassName () const =0 |
return class name 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 | resetTargetParticleSet (ParticleSet &P)=0 |
Reset the data with the target ParticleSet. More... | |
virtual Return_t | evaluate (ParticleSet &P)=0 |
Evaluate the local energy contribution of this component. More... | |
virtual bool | get (std::ostream &os) const =0 |
write about the class More... | |
virtual std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi)=0 |
virtual void | addObservables (PropertySetType &plist, BufferType &collectables) |
named values to the property list Default implementaton uses addValue(plist_) 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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
virtual void | setObservables (PropertySetType &plist) |
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... | |
virtual void | setParticlePropertyList (PropertySetType &plist, int offset) |
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 | |
virtual bool | put (xmlNodePtr cur)=0 |
Read the input parameter. 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 | |
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_ |
Private Member Functions | |
bool | energyDomainValid (EnergyDomains edomain) const noexcept |
return whether the energy domain is valid More... | |
bool | quantumDomainValid (QuantumDomains qdomain) const noexcept |
return whether the quantum domain is valid More... | |
Private Attributes | |
bool | streaming_scalars_ |
Array< RealType, 1 > * | value_sample_ |
array to store sample value More... | |
bool | has_listener_ = false |
Is there a per particle listener sadly this is necessary due to state machines. More... | |
QuantumDomains | quantum_domain_ |
quantum_domain_ of the (particle) operator, default = no_quantum_domain More... | |
EnergyDomains | energy_domain_ |
energy domain of the operator (kinetic/potential), default = no_energy_domain More... | |
using BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer
PooledData<RealType> is used to serialized an anonymous buffer
Definition at line 75 of file OperatorBase.h.
using GradMatrix = SPOSet::GradMatrix |
Definition at line 69 of file OperatorBase.h.
using ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar
Definition at line 81 of file OperatorBase.h.
using Return_t = FullPrecRealType |
type of return value of evaluate
Definition at line 64 of file OperatorBase.h.
using SPOMap = SPOSet::SPOMap |
typedef for SPOMap
Definition at line 84 of file OperatorBase.h.
using ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation.
Definition at line 68 of file OperatorBase.h.
using Walker_t = ParticleSet::Walker_t |
typedef for the walker
Definition at line 78 of file OperatorBase.h.
anonymous enum |
enum for update_mode
Enumerator | |
---|---|
PRIMARY | |
OPTIMIZABLE | |
RATIOUPDATE | |
PHYSICAL | |
COLLECTABLE | |
NONLOCAL |
Definition at line 105 of file OperatorBase.h.
enum EnergyDomains |
enum to denote energy domain of operators
Enumerator | |
---|---|
KINETIC | |
POTENTIAL | |
NO_ENERGY_DOMAIN |
Definition at line 87 of file OperatorBase.h.
enum QuantumDomains |
Enumerator | |
---|---|
NO_QUANTUM_DOMAIN | |
CLASSICAL | |
QUANTUM | |
CLASSICAL_CLASSICAL | |
QUANTUM_CLASSICAL | |
QUANTUM_QUANTUM |
Definition at line 94 of file OperatorBase.h.
OperatorBase | ( | ) |
Construct a new Operator Base object Default and unique empty constructor.
Initializes with default values.
Definition at line 28 of file OperatorBase.cpp.
References OperatorBase::PRIMARY, and OperatorBase::update_mode_.
|
virtualdefault |
|
virtual |
Acquire a shared resource from a collection.
collection | |
o_list |
Reimplemented in CoulombPBCAB, CoulombPBCAA, BareKineticEnergy, NonLocalECPotential, and SOECPotential.
Definition at line 205 of file OperatorBase.cpp.
|
virtual |
TODO: add docs.
qp | |
psi | |
targetH |
Reimplemented in ACForce.
Definition at line 215 of file OperatorBase.cpp.
References QMCHamiltonian::addOperator(), OperatorBase::makeClone(), OperatorBase::name_, OperatorBase::PHYSICAL, and OperatorBase::update_mode_.
|
virtual |
named values to the property list Default implementaton uses addValue(plist_)
plist | RecordNameProperty |
collectables | Observables that are accumulated by evaluate |
Reimplemented in OrbitalImages, CoulombPBCAB, DensityMatrices1B, CoulombPBCAA, NonLocalECPotential, CoulombPotential< T >, StressPBC, ForceChiesaPBCAA, ForwardWalking, ForceCeperley, ACForce, LatticeDeviationEstimator, SpinDensity, PairCorrEstimator, SelfHealingOverlapLegacy, StaticStructureFactor, SkAllEstimator, SpeciesKineticEnergy, BareForce, DensityEstimator, SkEstimator, EnergyDensityEstimator, and MomentumEstimator.
Definition at line 56 of file OperatorBase.cpp.
References OperatorBase::addValue().
|
protected |
named values to the property list
plist | RecordNameProperty |
Previously addObservables but it is renamed and a non-virtial function.
Definition at line 355 of file OperatorBase.cpp.
References RecordNamedProperty< T >::add(), OperatorBase::COLLECTABLE, OperatorBase::my_index_, OperatorBase::name_, and OperatorBase::update_mode_.
Referenced by CoulombPotential< T >::addObservables(), CoulombPBCAA::addObservables(), NonLocalECPotential::addObservables(), and OperatorBase::addObservables().
|
protectedvirtual |
Reimplemented in CoulombPBCAA, CoulombPBCAB, CoulombPotential< T >, LocalECPotential, BareKineticEnergy, HarmonicExternalPotential, NonLocalECPotential, and GridExternalPotential.
Definition at line 297 of file OperatorBase.cpp.
Referenced by OperatorBase::checkoutTraceQuantities().
|
protectedvirtual |
Reimplemented in DensityMatrices1B, and EnergyDensityEstimator.
Definition at line 277 of file OperatorBase.cpp.
References TraceManager::checkout_real(), OperatorBase::name_, OperatorBase::request_, TraceRequest::streaming_scalar(), OperatorBase::streaming_scalars_, and OperatorBase::value_sample_.
Referenced by OperatorBase::checkoutTraceQuantities().
void checkoutTraceQuantities | ( | TraceManager & | tm | ) |
Checkout trace arrays Derived classes must guard individual checkouts using request info.
tm |
Definition at line 254 of file OperatorBase.cpp.
References OperatorBase::checkoutParticleQuantities(), and OperatorBase::checkoutScalarQuantities().
|
protectedvirtual |
Reimplemented in DensityMatrices1B, and EnergyDensityEstimator.
Definition at line 284 of file OperatorBase.cpp.
References OperatorBase::streaming_scalars_, and OperatorBase::value_.
Referenced by OperatorBase::collectScalarTraces().
void collectScalarTraces | ( | ) |
Collect scalar trace data.
Definition at line 260 of file OperatorBase.cpp.
References OperatorBase::collectScalarQuantities().
|
protectedvirtual |
Reimplemented in CoulombPBCAA, CoulombPBCAB, CoulombPotential< T >, LocalECPotential, BareKineticEnergy, HarmonicExternalPotential, NonLocalECPotential, and GridExternalPotential.
Definition at line 296 of file OperatorBase.cpp.
Referenced by OperatorBase::contributeTraceQuantities().
|
protectedvirtual |
Reimplemented in DensityMatrices1B, and EnergyDensityEstimator.
Definition at line 275 of file OperatorBase.cpp.
References TraceRequest::contribute_scalar(), OperatorBase::name_, and OperatorBase::request_.
Referenced by OperatorBase::contributeTraceQuantities().
void contributeTraceQuantities | ( | ) |
Make trace quantities available.
Definition at line 248 of file OperatorBase.cpp.
References OperatorBase::contributeParticleQuantities(), and OperatorBase::contributeScalarQuantities().
|
virtual |
Initialize a shared resource and hand it to a collection.
collection |
Reimplemented in CoulombPBCAB, CoulombPBCAA, BareKineticEnergy, NonLocalECPotential, and SOECPotential.
Definition at line 203 of file OperatorBase.cpp.
|
protectedvirtual |
Reimplemented in CoulombPBCAA, CoulombPBCAB, CoulombPotential< T >, LocalECPotential, HarmonicExternalPotential, BareKineticEnergy, NonLocalECPotential, and GridExternalPotential.
Definition at line 298 of file OperatorBase.cpp.
Referenced by OperatorBase::deleteTraceQuantities().
|
protectedvirtual |
Reimplemented in DensityMatrices1B, and EnergyDensityEstimator.
Definition at line 290 of file OperatorBase.cpp.
References OperatorBase::streaming_scalars_, and OperatorBase::value_sample_.
Referenced by OperatorBase::deleteTraceQuantities().
void deleteTraceQuantities | ( | ) |
delete trace arrays
Definition at line 262 of file OperatorBase.cpp.
References OperatorBase::deleteParticleQuantities(), OperatorBase::deleteScalarQuantities(), OperatorBase::have_required_traces_, OperatorBase::request_, TraceRequest::reset(), OperatorBase::streaming_particles_, and OperatorBase::streaming_scalars_.
|
inlinevirtual |
return true if this operator depends on a wavefunction
Reimplemented in DensityMatrices1B, L2Potential, BareKineticEnergy, Pressure, NonLocalECPotential, ACForce, SOECPotential, and MomentumEstimator.
Definition at line 124 of file OperatorBase.h.
Referenced by OperatorBase::evaluateValueAndDerivatives().
|
privatenoexcept |
return whether the energy domain is valid
Definition at line 362 of file OperatorBase.cpp.
Referenced by OperatorBase::setEnergyDomain().
|
pure virtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implemented in CoulombPotential< T >, OrbitalImages, DensityMatrices1B, CoulombPBCAB, CoulombPBCAA, MPC, L2Potential, LocalECPotential, ACForce, StressPBC, ForceChiesaPBCAA, BareKineticEnergy, NonLocalECPotential, HarmonicExternalPotential, Pressure, LatticeDeviationEstimator, SpinDensity, ForceCeperley, SelfHealingOverlapLegacy, ForwardWalking, StaticStructureFactor, GridExternalPotential, PairCorrEstimator, SOECPotential, SkAllEstimator, DensityEstimator, EnergyDensityEstimator, SkEstimator, SkPot, SpeciesKineticEnergy, BareForce, ChiesaCorrection, and MomentumEstimator.
Referenced by OperatorBase::evaluateDeterministic(), OperatorBase::evaluateValueAndDerivatives(), OperatorBase::evaluateWithIonDerivs(), OperatorBase::evaluateWithToperator(), OperatorBase::mw_evaluate(), and qmcplusplus::test_hcpBe_rotation().
|
virtual |
Evaluate the local energy contribution of this component, deterministically based on current state.
The correct behavior of this routine requires estimators with non-deterministic components in their evaluate() function to override this function.
P | input configuration containing N particles |
Reimplemented in NonLocalECPotential, and SOECPotential.
Definition at line 79 of file OperatorBase.cpp.
References OperatorBase::evaluate().
|
inlinevirtual |
Evaluate "B" matrix for observable.
Filippi scheme for computing fast derivatives.
[in] | P | target particle set (electrons) |
[in] | psi,Trial | Wavefunction wrapper for fast derivatives. |
[in,out] | B. | List of B matrices for each species. |
Reimplemented in BareKineticEnergy, and NonLocalECPotential.
Definition at line 387 of file OperatorBase.h.
Referenced by qmcplusplus::TEST_CASE().
|
inlinevirtual |
Evaluate "dB/dR" matrices for observable.
Filippi scheme for computing fast derivatives.
[in] | P,target | particle set (electrons) |
[in] | source,ion | particle set |
[in] | psi,Trial | Wavefunction wrapper for fast derivatives. |
[in] | iat |
Reimplemented in BareKineticEnergy, and NonLocalECPotential.
Definition at line 402 of file OperatorBase.h.
Referenced by qmcplusplus::TEST_CASE().
|
virtual |
Evaluate value and derivatives wrt the optimizables.
Default uses evaluate.
P | |
optvars | |
dlogpsi | |
dhpsioverpsi |
Reimplemented in SOECPotential.
Definition at line 168 of file OperatorBase.cpp.
References OperatorBase::dependsOnWaveFunction(), OperatorBase::evaluate(), and OperatorBase::getClassName().
|
virtual |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase.
P | target particle set (electrons) |
ions | source particle set (ions) |
psi | Trial wave function |
hf_terms | Adds OperatorBase's contribution to Re [(dH)Psi]/Psi |
pulay_terms | Adds OperatorBase's contribution to Re [(H-E_L)dPsi]/Psi |
Reimplemented in CoulombPotential< T >, CoulombPBCAB, BareKineticEnergy, CoulombPBCAA, NonLocalECPotential, and LocalECPotential.
Definition at line 181 of file OperatorBase.cpp.
References OperatorBase::evaluate().
Referenced by OperatorBase::evaluateWithIonDerivsDeterministic().
|
virtual |
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase.
If there's no stochastic component, defaults to evaluateWithIonDerivs. If not otherwise specified, this defaults to evaluate().
P | target particle set (electrons) |
ions | source particle set (ions) |
psi | Trial wave function |
hf_terms | Adds OperatorBase's contribution to Re [(dH)Psi]/Psi |
pulay_terms | Adds OperatorBase's contribution to Re [(H-E_L)dPsi]/Psi |
Reimplemented in NonLocalECPotential.
Definition at line 190 of file OperatorBase.cpp.
References OperatorBase::evaluateWithIonDerivs().
|
virtual |
Evaluate the local energy contribution of this component with Toperators updated if requested.
P | input configuration containing N particles |
Reimplemented in NonLocalECPotential.
Definition at line 143 of file OperatorBase.cpp.
References OperatorBase::evaluate().
|
pure virtual |
write about the class
Implemented in CoulombPotential< T >, OrbitalImages, DensityMatrices1B, CoulombPBCAB, BareKineticEnergy, NonLocalECPotential, CoulombPBCAA, Pressure, ForceChiesaPBCAA, StressPBC, LocalECPotential, MPC, L2Potential, ForceCeperley, SpinDensity, SelfHealingOverlapLegacy, SOECPotential, StaticStructureFactor, PairCorrEstimator, ForwardWalking, HarmonicExternalPotential, BareForce, LatticeDeviationEstimator, SkAllEstimator, DensityEstimator, EnergyDensityEstimator, SkEstimator, ACForce, GridExternalPotential, SkPot, MomentumEstimator, ChiesaCorrection, and SpeciesKineticEnergy.
|
pure virtual |
return class name
Implemented in OrbitalImages, DensityMatrices1B, CoulombPBCAB, CoulombPotential< T >, CoulombPBCAA, MPC, L2Potential, StressPBC, LocalECPotential, ForceChiesaPBCAA, BareKineticEnergy, Pressure, NonLocalECPotential, SpinDensity, ForceCeperley, HarmonicExternalPotential, LatticeDeviationEstimator, SelfHealingOverlapLegacy, StaticStructureFactor, ACForce, PairCorrEstimator, SOECPotential, ForwardWalking, EnergyDensityEstimator, SkAllEstimator, DensityEstimator, SkEstimator, GridExternalPotential, SkPot, SpeciesKineticEnergy, BareForce, ChiesaCorrection, and MomentumEstimator.
Referenced by OperatorBase::evaluateValueAndDerivatives().
|
virtual |
Return an average value by collective operation.
Definition at line 201 of file OperatorBase.cpp.
|
noexcept |
Return the mode i.
i | index among PRIMARY, OPTIMIZABLE, RATIOUPDATE, PHYSICAL |
Definition at line 240 of file OperatorBase.cpp.
|
noexcept |
getter a copy of my_name_, rvalue small string optimization
Definition at line 47 of file OperatorBase.cpp.
References OperatorBase::name_.
Referenced by QMCHamiltonian::initialize_traces(), and QMCHamiltonian::updateComponent().
|
noexcept |
Get request_ member.
Definition at line 52 of file OperatorBase.cpp.
References OperatorBase::request_.
|
virtual |
TODO: add docs.
tm |
Reimplemented in DensityMatrices1B, and EnergyDensityEstimator.
Definition at line 225 of file OperatorBase.cpp.
|
noexcept |
get update_mode_ reference
Definition at line 43 of file OperatorBase.cpp.
References OperatorBase::update_mode_.
|
noexcept |
get a copy of value_
Definition at line 45 of file OperatorBase.cpp.
References OperatorBase::value_.
Referenced by TestSOECPotential::evalFast(), qmcplusplus::TEST_CASE(), qmcplusplus::test_CoulombPBCAA_3p(), and QMCHamiltonian::updateComponent().
|
noexcept |
Definition at line 244 of file OperatorBase.cpp.
References OperatorBase::has_listener_.
|
inlinevirtual |
Reimplemented in CoulombPBCAB, and CoulombPBCAA.
Definition at line 471 of file OperatorBase.h.
References OperatorBase::has_listener_.
Referenced by CoulombPBCAA::informOfPerParticleListener(), and CoulombPBCAB::informOfPerParticleListener().
|
noexcept |
Definition at line 230 of file OperatorBase.cpp.
References OperatorBase::CLASSICAL, and OperatorBase::quantum_domain_.
Referenced by QMCHamiltonian::initialize_traces().
|
noexcept |
Definition at line 234 of file OperatorBase.cpp.
References OperatorBase::CLASSICAL_CLASSICAL, and OperatorBase::quantum_domain_.
Referenced by QMCHamiltonian::initialize_traces().
|
noexcept |
TODO: add docs.
Definition at line 242 of file OperatorBase.cpp.
References OperatorBase::NONLOCAL, and OperatorBase::update_mode_.
|
noexcept |
Definition at line 232 of file OperatorBase.cpp.
References OperatorBase::QUANTUM, and OperatorBase::quantum_domain_.
Referenced by QMCHamiltonian::initialize_traces().
|
noexcept |
Definition at line 236 of file OperatorBase.cpp.
References OperatorBase::QUANTUM_CLASSICAL, and OperatorBase::quantum_domain_.
Referenced by QMCHamiltonian::initialize_traces().
|
noexcept |
Definition at line 238 of file OperatorBase.cpp.
References OperatorBase::quantum_domain_, and OperatorBase::QUANTUM_QUANTUM.
Referenced by QMCHamiltonian::initialize_traces().
|
pure virtual |
Implemented in CoulombPotential< T >, OrbitalImages, CoulombPBCAB, DensityMatrices1B, NonLocalECPotential, BareKineticEnergy, CoulombPBCAA, Pressure, ForceChiesaPBCAA, StressPBC, LocalECPotential, MPC, L2Potential, SOECPotential, ForceCeperley, LatticeDeviationEstimator, PairCorrEstimator, ForwardWalking, HarmonicExternalPotential, BareForce, SkAllEstimator, ACForce, SpinDensity, DensityEstimator, EnergyDensityEstimator, SkEstimator, SelfHealingOverlapLegacy, StaticStructureFactor, GridExternalPotential, SkPot, SpeciesKineticEnergy, MomentumEstimator, and ChiesaCorrection.
Referenced by OperatorBase::add2Hamiltonian().
|
virtual |
Evaluate the contribution of this component of multiple walkers.
Take o_list and p_list update evaluation result variables in o_list? really should reduce vector of local_energies. matching the ordering and size of o list the this can be call for 1 or more QMCHamiltonians
o_list | |
wf_list | |
p_list |
Temporary raw omp pragma for simple thread parallelism ignoring the driver level concurrency
TODO: replace this with a proper abstraction. It should adequately describe the behavior and strictly limit the activation of this level concurrency to when it is intended. It is unlikely to belong in this function.
This implicitly depends on openmp work division logic. Essentially adhoc runtime crowds over which we have given up control of thread/global scope. How many walkers per thread? How to handle their data movement if any of these hamiltonians should be accelerated? We can neither reason about or describe it in C++
As I understand it it should only be required for as long as the AMD openmp offload compliler is incapable of running multiple threads. They should/must fix their compiler before delivery of frontier and it should be removed at that point at latest
If you want 16 threads of 1 walker that should be 16 crowds of 1 not one crowd of 16 with openmp thrown in at hamiltonian level. If this must be different from the other crowd batching. Make this a reasoned about and controlled level of concurency blocking at the driver level.
This is only thread safe only if each walker has a complete set of anything involved in an Operator.evaluate.
Reimplemented in CoulombPBCAA, NonLocalECPotential, and SOECPotential.
Definition at line 81 of file OperatorBase.cpp.
References OperatorBase::evaluate(), and RefVectorWithLeader< T >::getLeader().
Referenced by CoulombPBCAA::mw_evaluate(), OperatorBase::mw_evaluatePerParticle(), BareKineticEnergy::mw_evaluateWithParameterDerivatives(), and OperatorBase::mw_evaluateWithToperator().
|
virtual |
Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators.
Base class implementation decays to the mw_evaluate so if not overridden the estimator doesn't hear from this operator.
specialized versions of this should take advantage of multiwalker resources to reduce the resource cost of collecting these values.
Reimplemented in CoulombPBCAB, and CoulombPBCAA.
Definition at line 115 of file OperatorBase.cpp.
References OperatorBase::mw_evaluate().
|
virtual |
Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators.
default implementation decays to the mw_evaluatePerParticle.
specialized versions of this should take advantage of multiwalker resources to reduce the resource cost of collecting these values.
Definition at line 155 of file OperatorBase.cpp.
References OperatorBase::mw_evaluateWithToperator().
|
virtual |
TODO: add docs.
o_list | |
p_list | |
optvars | |
dlogpsi | |
dhpsioverpsi |
Definition at line 125 of file OperatorBase.cpp.
References RecordArray< T >::getNumOfParams().
|
virtual |
Evaluate the contribution of this component of multiple walkers.
o_list | |
wf_list | |
p_list |
Reimplemented in NonLocalECPotential.
Definition at line 145 of file OperatorBase.cpp.
References OperatorBase::mw_evaluate().
Referenced by OperatorBase::mw_evaluatePerParticleWithToperator().
|
protected |
set quantum domain for one-body operator
Definition at line 319 of file OperatorBase.cpp.
References APP_ABORT, OperatorBase::CLASSICAL, ParticleSet::is_classical(), ParticleSet::is_quantum(), OperatorBase::QUANTUM, and OperatorBase::quantum_domain_.
Referenced by BareKineticEnergy::BareKineticEnergy(), GridExternalPotential::GridExternalPotential(), and HarmonicExternalPotential::HarmonicExternalPotential().
|
protectedpure virtual |
Read the input parameter.
cur | xml node for a OperatorBase object |
Implemented in CoulombPotential< T >, OrbitalImages, CoulombPBCAB, DensityMatrices1B, BareKineticEnergy, NonLocalECPotential, CoulombPBCAA, ForceChiesaPBCAA, StressPBC, LocalECPotential, MPC, L2Potential, ForceCeperley, Pressure, SOECPotential, PairCorrEstimator, HarmonicExternalPotential, SpinDensity, BareForce, ForwardWalking, LatticeDeviationEstimator, SkAllEstimator, SelfHealingOverlapLegacy, DensityEstimator, SkEstimator, EnergyDensityEstimator, StaticStructureFactor, ACForce, GridExternalPotential, SkPot, MomentumEstimator, ChiesaCorrection, and SpeciesKineticEnergy.
|
privatenoexcept |
return whether the quantum domain is valid
Definition at line 364 of file OperatorBase.cpp.
Referenced by OperatorBase::setQuantumDomain().
|
virtual |
Reimplemented in OrbitalImages, DensityMatrices1B, LatticeDeviationEstimator, SpinDensity, PairCorrEstimator, SelfHealingOverlapLegacy, SpeciesKineticEnergy, StaticStructureFactor, SkAllEstimator, DensityEstimator, SkEstimator, EnergyDensityEstimator, and MomentumEstimator.
Definition at line 71 of file OperatorBase.cpp.
|
virtual |
add to observable descriptor for hdf5 The default implementation is to register a scalar for this->value_
h5desc | contains a set of hdf5 descriptors for a scalar observable |
gid | hdf5 group to which the observables belong |
Reimplemented in NonLocalECPotential, StressPBC, ForceChiesaPBCAA, ForceCeperley, and BareForce.
Definition at line 58 of file OperatorBase.cpp.
References OperatorBase::COLLECTABLE, OperatorBase::my_index_, OperatorBase::name_, qmcplusplus::oh, ObservableHelper::set_dimensions(), and OperatorBase::update_mode_.
Referenced by NonLocalECPotential::registerObservables().
|
virtual |
TODO: add docs.
P |
Reimplemented in ForwardWalking.
Definition at line 141 of file OperatorBase.cpp.
|
virtual |
Return a shared resource to a collection.
collection | |
o_list |
Reimplemented in CoulombPBCAB, CoulombPBCAA, BareKineticEnergy, NonLocalECPotential, and SOECPotential.
Definition at line 209 of file OperatorBase.cpp.
|
pure virtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implemented in CoulombPotential< T >, OrbitalImages, DensityMatrices1B, CoulombPBCAB, ForceChiesaPBCAA, CoulombPBCAA, StressPBC, MPC, L2Potential, LocalECPotential, LatticeDeviationEstimator, ForceCeperley, BareKineticEnergy, SpinDensity, ACForce, Pressure, SelfHealingOverlapLegacy, NonLocalECPotential, StaticStructureFactor, HarmonicExternalPotential, PairCorrEstimator, SOECPotential, ForwardWalking, SpeciesKineticEnergy, EnergyDensityEstimator, SkAllEstimator, DensityEstimator, GridExternalPotential, SkEstimator, SkPot, BareForce, ChiesaCorrection, and MomentumEstimator.
|
protectedvirtual |
|
protected |
Set the Energy Domain.
edomain |
Definition at line 303 of file OperatorBase.cpp.
References APP_ABORT, OperatorBase::energy_domain_, and OperatorBase::energyDomainValid().
Referenced by BareKineticEnergy::BareKineticEnergy(), CoulombPBCAA::CoulombPBCAA(), CoulombPBCAB::CoulombPBCAB(), CoulombPotential< T >::CoulombPotential(), GridExternalPotential::GridExternalPotential(), HarmonicExternalPotential::HarmonicExternalPotential(), L2Potential::L2Potential(), LocalECPotential::LocalECPotential(), NonLocalECPotential::NonLocalECPotential(), and SOECPotential::SOECPotential().
|
virtual |
Definition at line 77 of file OperatorBase.cpp.
References OperatorBase::t_walker_.
Referenced by qmcplusplus::TEST_CASE().
|
noexcept |
Set my_name member, uses small string optimization (pass by value)
name | input |
Definition at line 49 of file OperatorBase.cpp.
Referenced by ACForce::ACForce().
|
virtual |
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 in CoulombPotential< T >, OrbitalImages, CoulombPBCAB, DensityMatrices1B, CoulombPBCAA, NonLocalECPotential, StressPBC, ForceChiesaPBCAA, ForwardWalking, ForceCeperley, ACForce, SpinDensity, LatticeDeviationEstimator, SelfHealingOverlapLegacy, StaticStructureFactor, PairCorrEstimator, SkAllEstimator, SpeciesKineticEnergy, BareForce, DensityEstimator, SkEstimator, EnergyDensityEstimator, and MomentumEstimator.
Definition at line 73 of file OperatorBase.cpp.
References OperatorBase::my_index_, and OperatorBase::value_.
Referenced by ForceChiesaPBCAA::setObservables(), CoulombPBCAA::setObservables(), NonLocalECPotential::setObservables(), CoulombPBCAB::setObservables(), CoulombPotential< T >::setObservables(), and QMCHamiltonian::updateComponent().
|
virtual |
Reimplemented in CoulombPotential< T >, OrbitalImages, CoulombPBCAB, DensityMatrices1B, CoulombPBCAA, NonLocalECPotential, StressPBC, ForceChiesaPBCAA, ForceCeperley, ForwardWalking, ACForce, SpinDensity, SelfHealingOverlapLegacy, StaticStructureFactor, PairCorrEstimator, SkAllEstimator, BareForce, DensityEstimator, SkEstimator, EnergyDensityEstimator, and MomentumEstimator.
Definition at line 75 of file OperatorBase.cpp.
References OperatorBase::my_index_, and OperatorBase::value_.
Referenced by ForceChiesaPBCAA::setParticlePropertyList(), NonLocalECPotential::setParticlePropertyList(), CoulombPBCAA::setParticlePropertyList(), CoulombPBCAB::setParticlePropertyList(), CoulombPotential< T >::setParticlePropertyList(), and QMCHamiltonian::updateComponent().
|
protected |
set quantum domain
Definition at line 311 of file OperatorBase.cpp.
References APP_ABORT, OperatorBase::quantum_domain_, and OperatorBase::quantumDomainValid().
|
virtual |
Set the Random Generator object TODO: add docs.
rng |
Reimplemented in DensityMatrices1B, NonLocalECPotential, SOECPotential, and MomentumEstimator.
Definition at line 213 of file OperatorBase.cpp.
|
protected |
set quantum domain for two-body operator
Definition at line 329 of file OperatorBase.cpp.
References APP_ABORT, OperatorBase::CLASSICAL_CLASSICAL, ParticleSet::is_classical(), ParticleSet::is_quantum(), OperatorBase::quantum_domain_, and OperatorBase::QUANTUM_QUANTUM.
Referenced by CoulombPBCAA::CoulombPBCAA(), CoulombPBCAB::CoulombPBCAB(), CoulombPotential< T >::CoulombPotential(), L2Potential::L2Potential(), LocalECPotential::LocalECPotential(), NonLocalECPotential::NonLocalECPotential(), and SOECPotential::SOECPotential().
|
protected |
set quantum domain for two-body operator
Definition at line 339 of file OperatorBase.cpp.
References APP_ABORT, OperatorBase::CLASSICAL_CLASSICAL, ParticleSet::is_classical(), ParticleSet::is_quantum(), OperatorBase::QUANTUM_CLASSICAL, OperatorBase::quantum_domain_, and OperatorBase::QUANTUM_QUANTUM.
|
virtual |
Update data associated with a particleset.
Default implementation does nothing. Only A-A interactions for s needs to implement its own method.
s | source particle set |
Reimplemented in CoulombPotential< T >, and CoulombPBCAA.
Definition at line 199 of file OperatorBase.cpp.
|
private |
energy domain of the operator (kinetic/potential), default = no_energy_domain
Definition at line 617 of file OperatorBase.h.
Referenced by OperatorBase::setEnergyDomain().
|
private |
Is there a per particle listener sadly this is necessary due to state machines.
Definition at line 612 of file OperatorBase.h.
Referenced by OperatorBase::hasListener(), and OperatorBase::informOfPerParticleListener().
|
protected |
Definition at line 545 of file OperatorBase.h.
Referenced by OperatorBase::deleteTraceQuantities(), EnergyDensityEstimator::evaluate(), DensityMatrices1B::evaluate(), EnergyDensityEstimator::getRequiredTraces(), and DensityMatrices1B::getRequiredTraces().
|
protected |
starting index of this object
Definition at line 535 of file OperatorBase.h.
Referenced by MomentumEstimator::addObservables(), EnergyDensityEstimator::addObservables(), SkEstimator::addObservables(), DensityEstimator::addObservables(), BareForce::addObservables(), SpeciesKineticEnergy::addObservables(), SkAllEstimator::addObservables(), StaticStructureFactor::addObservables(), PairCorrEstimator::addObservables(), SelfHealingOverlapLegacy::addObservables(), SpinDensity::addObservables(), LatticeDeviationEstimator::addObservables(), ForwardWalking::addObservables(), ForceChiesaPBCAA::addObservables(), DensityMatrices1B::addObservables(), CoulombPBCAB::addObservables(), OperatorBase::addValue(), ForwardWalking::calculate(), MomentumEstimator::evaluate(), SkEstimator::evaluate(), SkAllEstimator::evaluate(), PairCorrEstimator::evaluate(), StaticStructureFactor::evaluate(), SelfHealingOverlapLegacy::evaluate(), SpinDensity::evaluate(), MomentumEstimator::makeClone(), SkEstimator::makeClone(), SkAllEstimator::makeClone(), MomentumEstimator::registerCollectables(), DensityEstimator::registerCollectables(), SkEstimator::registerCollectables(), SkAllEstimator::registerCollectables(), StaticStructureFactor::registerCollectables(), PairCorrEstimator::registerCollectables(), SelfHealingOverlapLegacy::registerCollectables(), SpinDensity::registerCollectables(), OperatorBase::registerObservables(), MomentumEstimator::setObservables(), SkEstimator::setObservables(), SkAllEstimator::setObservables(), SpeciesKineticEnergy::setObservables(), LatticeDeviationEstimator::setObservables(), ForwardWalking::setObservables(), OperatorBase::setObservables(), MomentumEstimator::setParticlePropertyList(), SkEstimator::setParticlePropertyList(), SkAllEstimator::setParticlePropertyList(), ForwardWalking::setParticlePropertyList(), and OperatorBase::setParticlePropertyList().
|
protected |
name of this object
Definition at line 527 of file OperatorBase.h.
Referenced by ACForce::add2Hamiltonian(), OperatorBase::add2Hamiltonian(), SpeciesKineticEnergy::addObservables(), LatticeDeviationEstimator::addObservables(), ForceChiesaPBCAA::addObservables(), CoulombPBCAB::addObservables(), OperatorBase::addValue(), BareForce::BareForce(), GridExternalPotential::checkoutParticleQuantities(), NonLocalECPotential::checkoutParticleQuantities(), BareKineticEnergy::checkoutParticleQuantities(), HarmonicExternalPotential::checkoutParticleQuantities(), LocalECPotential::checkoutParticleQuantities(), CoulombPotential< T >::checkoutParticleQuantities(), CoulombPBCAB::checkoutParticleQuantities(), CoulombPBCAA::checkoutParticleQuantities(), OperatorBase::checkoutScalarQuantities(), GridExternalPotential::contributeParticleQuantities(), NonLocalECPotential::contributeParticleQuantities(), HarmonicExternalPotential::contributeParticleQuantities(), BareKineticEnergy::contributeParticleQuantities(), LocalECPotential::contributeParticleQuantities(), CoulombPotential< T >::contributeParticleQuantities(), CoulombPBCAB::contributeParticleQuantities(), CoulombPBCAA::contributeParticleQuantities(), OperatorBase::contributeScalarQuantities(), ForceCeperley::ForceCeperley(), ForceChiesaPBCAA::ForceChiesaPBCAA(), SpeciesKineticEnergy::get(), DensityEstimator::get(), LatticeDeviationEstimator::get(), PairCorrEstimator::get(), OperatorBase::getName(), BareKineticEnergy::mw_evaluatePerParticle(), CoulombPBCAB::mw_evaluatePerParticle(), EnergyDensityEstimator::put(), StaticStructureFactor::put(), SelfHealingOverlapLegacy::put(), SpinDensity::put(), OrbitalImages::put(), EnergyDensityEstimator::registerCollectables(), SkEstimator::registerCollectables(), DensityEstimator::registerCollectables(), SkAllEstimator::registerCollectables(), SpeciesKineticEnergy::registerCollectables(), StaticStructureFactor::registerCollectables(), SpinDensity::registerCollectables(), LatticeDeviationEstimator::registerCollectables(), DensityMatrices1B::registerCollectables(), OperatorBase::registerObservables(), StaticStructureFactor::report(), StaticStructureFactor::reset(), SpinDensity::reset(), SelfHealingOverlapLegacy::SelfHealingOverlapLegacy(), and StressPBC::StressPBC().
|
protected |
a new value for a proposed move
Definition at line 538 of file OperatorBase.h.
Referenced by CoulombPBCAA::updateSource().
|
private |
quantum_domain_ of the (particle) operator, default = no_quantum_domain
Definition at line 615 of file OperatorBase.h.
Referenced by OperatorBase::isClassical(), OperatorBase::isClassicalClassical(), OperatorBase::isQuantum(), OperatorBase::isQuantumClassical(), OperatorBase::isQuantumQuantum(), OperatorBase::oneBodyQuantumDomain(), OperatorBase::setQuantumDomain(), and OperatorBase::twoBodyQuantumDomain().
|
protected |
whether traces are being collected
Definition at line 531 of file OperatorBase.h.
Referenced by GridExternalPotential::checkoutParticleQuantities(), NonLocalECPotential::checkoutParticleQuantities(), BareKineticEnergy::checkoutParticleQuantities(), HarmonicExternalPotential::checkoutParticleQuantities(), LocalECPotential::checkoutParticleQuantities(), CoulombPotential< T >::checkoutParticleQuantities(), CoulombPBCAB::checkoutParticleQuantities(), CoulombPBCAA::checkoutParticleQuantities(), OperatorBase::checkoutScalarQuantities(), GridExternalPotential::contributeParticleQuantities(), NonLocalECPotential::contributeParticleQuantities(), HarmonicExternalPotential::contributeParticleQuantities(), BareKineticEnergy::contributeParticleQuantities(), LocalECPotential::contributeParticleQuantities(), CoulombPotential< T >::contributeParticleQuantities(), CoulombPBCAB::contributeParticleQuantities(), CoulombPBCAA::contributeParticleQuantities(), OperatorBase::contributeScalarQuantities(), OperatorBase::deleteTraceQuantities(), EnergyDensityEstimator::EnergyDensityEstimator(), OperatorBase::getRequest(), and DensityMatrices1B::reset().
|
protected |
Definition at line 544 of file OperatorBase.h.
Referenced by GridExternalPotential::checkoutParticleQuantities(), NonLocalECPotential::checkoutParticleQuantities(), BareKineticEnergy::checkoutParticleQuantities(), HarmonicExternalPotential::checkoutParticleQuantities(), LocalECPotential::checkoutParticleQuantities(), CoulombPotential< T >::checkoutParticleQuantities(), CoulombPBCAB::checkoutParticleQuantities(), CoulombPBCAA::checkoutParticleQuantities(), GridExternalPotential::deleteParticleQuantities(), NonLocalECPotential::deleteParticleQuantities(), BareKineticEnergy::deleteParticleQuantities(), HarmonicExternalPotential::deleteParticleQuantities(), LocalECPotential::deleteParticleQuantities(), CoulombPotential< T >::deleteParticleQuantities(), CoulombPBCAB::deleteParticleQuantities(), CoulombPBCAA::deleteParticleQuantities(), OperatorBase::deleteTraceQuantities(), GridExternalPotential::evaluate(), HarmonicExternalPotential::evaluate(), BareKineticEnergy::evaluate(), LocalECPotential::evaluate(), CoulombPBCAA::evaluate(), CoulombPBCAB::evaluate(), CoulombPotential< T >::evaluate_spAA(), CoulombPotential< T >::evaluate_spAB(), CoulombPotential< T >::evaluateAA(), CoulombPotential< T >::evaluateAB(), and NonLocalECPotential::evaluateImpl().
|
private |
Definition at line 603 of file OperatorBase.h.
Referenced by OperatorBase::checkoutScalarQuantities(), OperatorBase::collectScalarQuantities(), OperatorBase::deleteScalarQuantities(), and OperatorBase::deleteTraceQuantities().
|
protected |
reference to the current walker
Definition at line 541 of file OperatorBase.h.
Referenced by ForwardWalking::calculate(), MomentumEstimator::evaluate(), SpeciesKineticEnergy::evaluate(), DensityEstimator::evaluate(), SkAllEstimator::evaluate(), StaticStructureFactor::evaluate(), ForwardWalking::evaluate(), SelfHealingOverlapLegacy::evaluate(), LatticeDeviationEstimator::evaluate(), SpinDensity::evaluate(), DensityMatrices1B::evaluate_loop(), DensityMatrices1B::evaluate_matrix(), ForwardWalking::rejectedMove(), and OperatorBase::setHistories().
|
protected |
set the current update mode
Definition at line 521 of file OperatorBase.h.
Referenced by ACForce::add2Hamiltonian(), OperatorBase::add2Hamiltonian(), OperatorBase::addValue(), BareKineticEnergy::BareKineticEnergy(), DensityEstimator::DensityEstimator(), EnergyDensityEstimator::EnergyDensityEstimator(), ForwardWalking::ForwardWalking(), OperatorBase::getUpdateMode(), OperatorBase::isNonLocal(), MomentumEstimator::MomentumEstimator(), NonLocalECPotential::NonLocalECPotential(), OperatorBase::OperatorBase(), PairCorrEstimator::PairCorrEstimator(), Pressure::Pressure(), SpeciesKineticEnergy::put(), LatticeDeviationEstimator::put(), OperatorBase::registerObservables(), StaticStructureFactor::reset(), SpinDensity::reset(), DensityMatrices1B::reset(), SelfHealingOverlapLegacy::SelfHealingOverlapLegacy(), SkAllEstimator::SkAllEstimator(), and SkEstimator::SkEstimator().
|
protected |
current value
Definition at line 524 of file OperatorBase.h.
Referenced by OperatorBase::collectScalarQuantities(), CoulombPBCAA::CoulombPBCAA(), CoulombPotential< T >::CoulombPotential(), NonLocalECPotential::evalIonDerivsImpl(), ChiesaCorrection::evaluate(), SpeciesKineticEnergy::evaluate(), SOECPotential::evaluate(), GridExternalPotential::evaluate(), LatticeDeviationEstimator::evaluate(), Pressure::evaluate(), HarmonicExternalPotential::evaluate(), NonLocalECPotential::evaluate(), BareKineticEnergy::evaluate(), ACForce::evaluate(), LocalECPotential::evaluate(), L2Potential::evaluate(), MPC::evaluate(), CoulombPBCAA::evaluate(), CoulombPBCAB::evaluate(), CoulombPotential< T >::evaluate(), LocalECPotential::evaluate_orig(), BareKineticEnergy::evaluate_orig(), GridExternalPotential::evaluate_sp(), LocalECPotential::evaluate_sp(), HarmonicExternalPotential::evaluate_sp(), BareKineticEnergy::evaluate_sp(), CoulombPBCAB::evaluate_sp(), CoulombPBCAA::evaluate_sp(), SOECPotential::evaluateDeterministic(), NonLocalECPotential::evaluateDeterministic(), SOECPotential::evaluateImpl(), NonLocalECPotential::evaluateImpl(), SOECPotential::evaluateValueAndDerivatives(), NonLocalECPotential::evaluateValueAndDerivatives(), LocalECPotential::evaluateWithIonDerivs(), NonLocalECPotential::evaluateWithIonDerivs(), BareKineticEnergy::evaluateWithIonDerivs(), CoulombPBCAA::evaluateWithIonDerivs(), CoulombPBCAB::evaluateWithIonDerivs(), CoulombPotential< T >::evaluateWithIonDerivs(), NonLocalECPotential::evaluateWithIonDerivsDeterministic(), NonLocalECPotential::evaluateWithToperator(), OperatorBase::getValue(), CoulombPBCAA::mw_evaluate(), BareKineticEnergy::mw_evaluatePerParticle(), CoulombPBCAA::mw_evaluatePerParticle(), CoulombPBCAB::mw_evaluatePerParticle(), LatticeDeviationEstimator::setObservables(), ACForce::setObservables(), OperatorBase::setObservables(), ACForce::setParticlePropertyList(), OperatorBase::setParticlePropertyList(), CoulombPBCAA::updateSource(), and CoulombPotential< T >::updateSource().
array to store sample value
Definition at line 606 of file OperatorBase.h.
Referenced by OperatorBase::checkoutScalarQuantities(), and OperatorBase::deleteScalarQuantities().
struct qmcplusplus::Pressure |
Evaluate the Bare Pressure.
P=/frac{2T+V}{d* /Omega} where d is the dimension of space and /Omega is the volume.
Definition at line 32 of file Pressure.h.
Public Types | |
using | WP = WalkerProperties::Indexes |
![]() | |
enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
enum to denote energy domain of operators More... | |
enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
enum for update_mode More... | |
using | Return_t = FullPrecRealType |
type of return value of evaluate More... | |
using | ValueMatrix = SPOSet::ValueMatrix |
For fast derivative evaluation. More... | |
using | GradMatrix = SPOSet::GradMatrix |
using | BufferType = ParticleSet::Buffer_t |
typedef for the serialized buffer More... | |
using | Walker_t = ParticleSet::Walker_t |
typedef for the walker More... | |
using | ParticleScalar = ParticleSet::Scalar_t |
typedef for the ParticleScalar More... | |
using | SPOMap = SPOSet::SPOMap |
typedef for SPOMap More... | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
Public Member Functions | |
Pressure (ParticleSet &P) | |
constructor More... | |
~Pressure () override | |
destructor More... | |
bool | dependsOnWaveFunction () const override |
return true if this operator depends on a wavefunction More... | |
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... | |
bool | put (xmlNodePtr cur) override |
implements the virtual function. 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 |
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 | addObservables (PropertySetType &plist, BufferType &collectables) |
named values to the property list Default implementaton uses addValue(plist_) 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 | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
virtual void | setObservables (PropertySetType &plist) |
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... | |
virtual void | setParticlePropertyList (PropertySetType &plist, int offset) |
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... | |
Public Attributes | |
double | pNorm |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
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_ |
using WP = WalkerProperties::Indexes |
Definition at line 34 of file Pressure.h.
|
inline |
constructor
Pressure operators need to be re-evaluated during optimization.
Definition at line 43 of file Pressure.h.
References ParticleSet::getLattice(), OperatorBase::OPTIMIZABLE, Pressure::pNorm, and OperatorBase::update_mode_.
|
inlineoverride |
|
inlineoverridevirtual |
return true if this operator depends on a wavefunction
Reimplemented from OperatorBase.
Definition at line 51 of file Pressure.h.
|
inlineoverridevirtual |
Evaluate the local energy contribution of this component.
P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 55 of file Pressure.h.
References Pressure::pNorm, ParticleSet::PropertyList, and OperatorBase::value_.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlinefinalvirtual |
Implements OperatorBase.
Definition at line 133 of file Pressure.h.
|
inlineoverridevirtual |
implements the virtual function.
Nothing is done but should check the mass
Implements OperatorBase.
Definition at line 67 of file Pressure.h.
|
inlineoverridevirtual |
Reset the data with the target ParticleSet.
P | new target ParticleSet |
Implements OperatorBase.
Definition at line 53 of file Pressure.h.
References ParticleSet::getLattice(), and Pressure::pNorm.
double pNorm |
Definition at line 35 of file Pressure.h.
Referenced by Pressure::evaluate(), Pressure::Pressure(), and Pressure::resetTargetParticleSet().
class qmcplusplus::SpaceWarpTransformation |
This implements the differential space warp transformation for ZVZB estimators given by Sorella & Capriotti J.
Chem. Phys., 133, 23411 (2010), https://doi.org/10.1063/1.3516208
Definition at line 26 of file SpaceWarpTransformation.h.
Public Member Functions | |
SpaceWarpTransformation (ParticleSet &elns, const ParticleSet &ions) | |
RealType | f (RealType r) |
Space warp transformation function F(r). More... | |
RealType | df (RealType r) |
Derivative of space warp transformation function F(r) w.r.t. More... | |
void | setPow (RealType swpow_in) |
Sets the exponent for power law space warp transformation. More... | |
void | getSWT (int iat, ParticleScalar &w, Force_t &grad_w) |
Generates required space warp quantities to generate the actual "Space Warp" contribution to the iat-th force component. More... | |
void | computeSWT (ParticleSet &elec, const ParticleSet &ions, Force_t &dEl, ParticleGradient &dlogpsi, Force_t &el_contribution, Force_t &psi_contribution) |
Takes in precomputed grad(E_L) and grad(logPsi) and computes the ZV and ZB space warp contributions to the force. More... | |
Private Types | |
using | ParticleScalar = ParticleSet::ParticleScalar |
using | Force_t = ParticleSet::ParticlePos |
using | ParticleGradient = ParticleSet::ParticleGradient |
Private Member Functions | |
void | computeSWTIntermediates (ParticleSet &P, const ParticleSet &ions) |
Computes intermediate matrices required to build all space warp components and gradients. More... | |
Private Attributes | |
const int | myTableIndex |
The electron-ion table index in electron table. More... | |
const int | Nelec |
const int | Nions |
RealType | swpow |
Power of space warp transformation. Right now, r^{-swpow}. More... | |
Matrix< RealType > | warpval |
Nelec x Nion matrix of F(|r_i-R_J|) More... | |
Matrix< PosType > | gradval |
Nelec x Nion matrix of F(|r_i-R_J|) More... | |
Additional Inherited Members | |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
|
private |
Definition at line 29 of file SpaceWarpTransformation.h.
|
private |
Definition at line 30 of file SpaceWarpTransformation.h.
|
private |
Definition at line 28 of file SpaceWarpTransformation.h.
SpaceWarpTransformation | ( | ParticleSet & | elns, |
const ParticleSet & | ions | ||
) |
Definition at line 6 of file SpaceWarpTransformation.cpp.
References SpaceWarpTransformation::gradval, SpaceWarpTransformation::Nelec, SpaceWarpTransformation::Nions, Matrix< T, Alloc >::resize(), and SpaceWarpTransformation::warpval.
void computeSWT | ( | ParticleSet & | elec, |
const ParticleSet & | ions, | ||
Force_t & | dEl, | ||
ParticleGradient & | dlogpsi, | ||
Force_t & | el_contribution, | ||
Force_t & | psi_contribution | ||
) |
Takes in precomputed grad(E_L) and grad(logPsi) and computes the ZV and ZB space warp contributions to the force.
[in] | elec,electron | particle set. |
[in] | ions,ion | particle set. |
[in] | dEl,grad_i(E_L) | for each electron i. E_L is the local energy. |
[in] | dlogpsi,grad_i(logPsi) | for each electron i. |
[out] | el_contribution,The | zero-variance contribution from space warp. |
[out] | psi_contribution,the | zero-bias contribution from space warp. Modifies the grad_I(logPsi) terms. |
Definition at line 53 of file SpaceWarpTransformation.cpp.
References SpaceWarpTransformation::computeSWTIntermediates(), qmcplusplus::convertToReal(), SpaceWarpTransformation::getSWT(), SpaceWarpTransformation::Nelec, SpaceWarpTransformation::Nions, and Vector< T, Alloc >::resize().
Referenced by ACForce::evaluate(), and qmcplusplus::TEST_CASE().
|
private |
Computes intermediate matrices required to build all space warp components and gradients.
The intermediates calculated are "warpval" and "gradval".
[in] | P,the | electron particle set. |
[in] | ions,the | ion particle set. |
Definition at line 19 of file SpaceWarpTransformation.cpp.
References SpaceWarpTransformation::df(), SpaceWarpTransformation::f(), ParticleSet::getDistTableAB(), SpaceWarpTransformation::gradval, SpaceWarpTransformation::myTableIndex, SpaceWarpTransformation::Nelec, SpaceWarpTransformation::Nions, and SpaceWarpTransformation::warpval.
Referenced by SpaceWarpTransformation::computeSWT().
Derivative of space warp transformation function F(r) w.r.t.
r.
[in] | r,the | distance |
[out] | value | of F'(r) |
Definition at line 15 of file SpaceWarpTransformation.cpp.
References qmcplusplus::pow(), and SpaceWarpTransformation::swpow.
Referenced by SpaceWarpTransformation::computeSWTIntermediates(), and qmcplusplus::TEST_CASE().
Space warp transformation function F(r).
[in] | r,the | distance |
[out] | value | of F(r) |
Definition at line 13 of file SpaceWarpTransformation.cpp.
References qmcplusplus::pow(), and SpaceWarpTransformation::swpow.
Referenced by SpaceWarpTransformation::computeSWTIntermediates(), and qmcplusplus::TEST_CASE().
void getSWT | ( | int | iat, |
ParticleScalar & | w, | ||
Force_t & | grad_w | ||
) |
Generates required space warp quantities to generate the actual "Space Warp" contribution to the iat-th force component.
[in] | iat | the ion index for the force. |
[out] | w,w_iat(r_i) | for each i, where i is the electron index. |
[out] | grad_w,grad_i | w_iat(r_i) for each i, where i is the electron index. |
Definition at line 37 of file SpaceWarpTransformation.cpp.
References SpaceWarpTransformation::gradval, SpaceWarpTransformation::Nelec, SpaceWarpTransformation::Nions, and SpaceWarpTransformation::warpval.
Referenced by SpaceWarpTransformation::computeSWT().
|
inline |
Sets the exponent for power law space warp transformation.
[in] | swpow_in | the exponent |
Definition at line 53 of file SpaceWarpTransformation.h.
References SpaceWarpTransformation::swpow.
Referenced by ACForce::put(), and qmcplusplus::TEST_CASE().
Nelec x Nion matrix of F(|r_i-R_J|)
Definition at line 100 of file SpaceWarpTransformation.h.
Referenced by SpaceWarpTransformation::computeSWTIntermediates(), SpaceWarpTransformation::getSWT(), and SpaceWarpTransformation::SpaceWarpTransformation().
|
private |
The electron-ion table index in electron table.
Definition at line 91 of file SpaceWarpTransformation.h.
Referenced by SpaceWarpTransformation::computeSWTIntermediates().
|
private |
Definition at line 92 of file SpaceWarpTransformation.h.
Referenced by SpaceWarpTransformation::computeSWT(), SpaceWarpTransformation::computeSWTIntermediates(), SpaceWarpTransformation::getSWT(), and SpaceWarpTransformation::SpaceWarpTransformation().
|
private |
Definition at line 93 of file SpaceWarpTransformation.h.
Referenced by SpaceWarpTransformation::computeSWT(), SpaceWarpTransformation::computeSWTIntermediates(), SpaceWarpTransformation::getSWT(), and SpaceWarpTransformation::SpaceWarpTransformation().
|
private |
Power of space warp transformation. Right now, r^{-swpow}.
Definition at line 96 of file SpaceWarpTransformation.h.
Referenced by SpaceWarpTransformation::df(), SpaceWarpTransformation::f(), and SpaceWarpTransformation::setPow().
Nelec x Nion matrix of F(|r_i-R_J|)
Definition at line 98 of file SpaceWarpTransformation.h.
Referenced by SpaceWarpTransformation::computeSWTIntermediates(), SpaceWarpTransformation::getSWT(), and SpaceWarpTransformation::SpaceWarpTransformation().