![]() |
QMCPACK
|
Inheritance diagram for ACForce:
Collaboration diagram for ACForce:Public Member Functions | |
| ACForce (ParticleSet &source, ParticleSet &target, TrialWaveFunction &psi, QMCHamiltonian &H) | |
| Constructor. More... | |
| ~ACForce () override=default | |
| Destructor, "final" triggers a clang warning. More... | |
| bool | dependsOnWaveFunction () const override |
| return true if this operator depends on a wavefunction More... | |
| std::string | getClassName () const override |
| return class name More... | |
| bool | put (xmlNodePtr cur) final |
| I/O Routines. More... | |
| bool | get (std::ostream &os) const final |
| write about the class More... | |
| std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) final |
| Cloning. More... | |
| std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi, QMCHamiltonian &H) |
| void | resetTargetParticleSet (ParticleSet &P) final |
| Initialization/assignment. More... | |
| void | addObservables (PropertySetType &plist, BufferType &collectables) final |
| named values to the property list Default implementaton uses addValue(plist_) More... | |
| void | setObservables (PropertySetType &plist) final |
| 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) final |
| void | add2Hamiltonian (ParticleSet &qp, TrialWaveFunction &psi, QMCHamiltonian &targetH) final |
| Since we store a reference to QMCHamiltonian, the baseclass method add2Hamiltonian isn't sufficient. More... | |
| Return_t | evaluate (ParticleSet &P) final |
| Evaluate. More... | |
Public Member Functions inherited from OperatorBase | |
| 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 | 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_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 | 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... | |
Static Public Member Functions | |
| static RealType | compute_regularizer_f (const ParticleGradient &G, const RealType epsilon) |
| Computes multiplicative regularizer f(G,epsilon) according to Pathak-Wagner arXiv:2002.01434 . More... | |
Private Attributes | |
| RealType | delta_ |
| Finite difference timestep. More... | |
| ParticleSet & | ions_ |
| ParticleSet & | elns_ |
| TrialWaveFunction & | psi_ |
| QMCHamiltonian & | ham_ |
| IndexType | first_force_index_ |
| For indexing observables. More... | |
| bool | useSpaceWarp_ |
| Algorithm/feature switches. More... | |
| bool | fastDerivatives_ |
| SpaceWarpTransformation | swt_ |
| The space warp transformation class. More... | |
| RealType | reg_epsilon_ |
| RealType | f_epsilon_ |
| Forces | hf_force_ |
| Temporary Nion x 3 dimensional arrays for force storage. More... | |
| Forces | pulay_force_ |
| Forces | wf_grad_ |
| Forces | sw_pulay_ |
| Forces | sw_grad_ |
| TWFFastDerivWrapper | psi_wrapper_ |
Additional Inherited Members | |
Protected Member Functions inherited from OperatorBase | |
| 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 inherited from OperatorBase | |
| 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 Forces = ParticleSet::ParticlePos |
| ACForce | ( | ParticleSet & | source, |
| ParticleSet & | target, | ||
| TrialWaveFunction & | psi, | ||
| QMCHamiltonian & | H | ||
| ) |
Constructor.
Definition at line 22 of file ACForce.cpp.
References ACForce::elns_, ParticleSet::getTotalNum(), ACForce::hf_force_, TrialWaveFunction::initializeTWFFastDerivWrapper(), ACForce::ions_, ACForce::psi_wrapper_, ACForce::pulay_force_, OperatorBase::setName(), ACForce::sw_grad_, ACForce::sw_pulay_, and ACForce::wf_grad_.
|
overridedefault |
Destructor, "final" triggers a clang warning.
|
finalvirtual |
Since we store a reference to QMCHamiltonian, the baseclass method add2Hamiltonian isn't sufficient.
We override it here.
Reimplemented from OperatorBase.
Definition at line 92 of file ACForce.cpp.
References QMCHamiltonian::addOperator(), ACForce::makeClone(), OperatorBase::name_, OperatorBase::PHYSICAL, and OperatorBase::update_mode_.
Referenced by qmcplusplus::TEST_CASE().
|
finalvirtual |
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 139 of file ACForce.cpp.
References RecordNamedProperty< T >::add(), ACForce::first_force_index_, ParticleSet::getTotalNum(), ACForce::ions_, OHMMS_DIM, and RecordNamedProperty< T >::size().
|
static |
Computes multiplicative regularizer f(G,epsilon) according to Pathak-Wagner arXiv:2002.01434 .
G estimates proximity to node, and f(G,epsilon) in that paper is used to scale all values.
| [in] | G,nabla_i | ln(Psi), so vector of all electron gradients. |
| [in] | epsilon,regularizer | parameter. |
Definition at line 196 of file ACForce.cpp.
References qmcplusplus::abs(), qmcplusplus::Dot(), qmcplusplus::Dot_CC(), qmcplusplus::Units::charge::e, qmcplusplus::pow(), and qmcplusplus::sqrt().
Referenced by ACForce::evaluate(), and qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
return true if this operator depends on a wavefunction
Reimplemented from OperatorBase.
|
finalvirtual |
Evaluate.
Implements OperatorBase.
Definition at line 101 of file ACForce.cpp.
References ACForce::compute_regularizer_f(), SpaceWarpTransformation::computeSWT(), ACForce::delta_, QMCHamiltonian::evaluateElecGrad(), QMCHamiltonian::evaluateIonDerivsDeterministic(), QMCHamiltonian::evaluateIonDerivsDeterministicFast(), ACForce::f_epsilon_, ACForce::fastDerivatives_, ParticleSet::G, TrialWaveFunction::G, ParticleSet::getTotalNum(), ACForce::ham_, ACForce::hf_force_, ACForce::ions_, ACForce::psi_, ACForce::psi_wrapper_, ACForce::pulay_force_, ACForce::reg_epsilon_, ACForce::sw_grad_, ACForce::sw_pulay_, ACForce::swt_, ACForce::useSpaceWarp_, OperatorBase::value_, and ACForce::wf_grad_.
Referenced by qmcplusplus::TEST_CASE().
|
finalvirtual |
write about the class
Implements OperatorBase.
Definition at line 90 of file ACForce.cpp.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
return class name
Implements OperatorBase.
|
finalvirtual |
Cloning.
Implements OperatorBase.
Definition at line 46 of file ACForce.cpp.
References APP_ABORT.
Referenced by ACForce::add2Hamiltonian(), and qmcplusplus::TEST_CASE().
| std::unique_ptr< OperatorBase > makeClone | ( | ParticleSet & | qp, |
| TrialWaveFunction & | psi, | ||
| QMCHamiltonian & | H | ||
| ) |
Definition at line 52 of file ACForce.cpp.
References ACForce::delta_, ACForce::fastDerivatives_, ACForce::first_force_index_, ACForce::ions_, ACForce::reg_epsilon_, and ACForce::useSpaceWarp_.
|
finalvirtual |
I/O Routines.
Implements OperatorBase.
Definition at line 63 of file ACForce.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_log(), ACForce::delta_, ACForce::fastDerivatives_, OhmmsAttributeSet::put(), ACForce::reg_epsilon_, SpaceWarpTransformation::setPow(), ACForce::swt_, and ACForce::useSpaceWarp_.
Referenced by qmcplusplus::TEST_CASE().
|
finalvirtual |
Initialization/assignment.
Implements OperatorBase.
Definition at line 137 of file ACForce.cpp.
Referenced by qmcplusplus::TEST_CASE().
|
finalvirtual |
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 163 of file ACForce.cpp.
References ACForce::f_epsilon_, ACForce::first_force_index_, ParticleSet::getTotalNum(), ACForce::hf_force_, ACForce::ions_, OHMMS_DIM, ACForce::pulay_force_, ACForce::sw_grad_, ACForce::sw_pulay_, OperatorBase::value_, and ACForce::wf_grad_.
|
finalvirtual |
Reimplemented from OperatorBase.
Definition at line 181 of file ACForce.cpp.
References ACForce::f_epsilon_, ACForce::first_force_index_, ParticleSet::getTotalNum(), ACForce::hf_force_, ACForce::ions_, OHMMS_DIM, ACForce::pulay_force_, ACForce::sw_grad_, ACForce::sw_pulay_, OperatorBase::value_, and ACForce::wf_grad_.
|
private |
Finite difference timestep.
Definition at line 78 of file ACForce.h.
Referenced by ACForce::evaluate(), ACForce::makeClone(), and ACForce::put().
|
private |
Definition at line 84 of file ACForce.h.
Referenced by ACForce::ACForce().
|
private |
Definition at line 100 of file ACForce.h.
Referenced by ACForce::evaluate(), ACForce::setObservables(), and ACForce::setParticlePropertyList().
|
private |
Definition at line 93 of file ACForce.h.
Referenced by ACForce::evaluate(), ACForce::makeClone(), and ACForce::put().
|
private |
For indexing observables.
Definition at line 89 of file ACForce.h.
Referenced by ACForce::addObservables(), ACForce::makeClone(), ACForce::setObservables(), and ACForce::setParticlePropertyList().
|
private |
Definition at line 86 of file ACForce.h.
Referenced by ACForce::evaluate().
|
private |
Temporary Nion x 3 dimensional arrays for force storage.
Definition at line 103 of file ACForce.h.
Referenced by ACForce::ACForce(), ACForce::evaluate(), ACForce::setObservables(), and ACForce::setParticlePropertyList().
|
private |
Definition at line 83 of file ACForce.h.
Referenced by ACForce::ACForce(), ACForce::addObservables(), ACForce::evaluate(), ACForce::makeClone(), ACForce::setObservables(), and ACForce::setParticlePropertyList().
|
private |
Definition at line 85 of file ACForce.h.
Referenced by ACForce::evaluate().
|
private |
Definition at line 110 of file ACForce.h.
Referenced by ACForce::ACForce(), and ACForce::evaluate().
|
private |
Definition at line 104 of file ACForce.h.
Referenced by ACForce::ACForce(), ACForce::evaluate(), ACForce::setObservables(), and ACForce::setParticlePropertyList().
|
private |
Definition at line 99 of file ACForce.h.
Referenced by ACForce::evaluate(), ACForce::makeClone(), and ACForce::put().
|
private |
Definition at line 107 of file ACForce.h.
Referenced by ACForce::ACForce(), ACForce::evaluate(), ACForce::setObservables(), and ACForce::setParticlePropertyList().
|
private |
Definition at line 106 of file ACForce.h.
Referenced by ACForce::ACForce(), ACForce::evaluate(), ACForce::setObservables(), and ACForce::setParticlePropertyList().
|
private |
The space warp transformation class.
Definition at line 96 of file ACForce.h.
Referenced by ACForce::evaluate(), and ACForce::put().
|
private |
Algorithm/feature switches.
Definition at line 92 of file ACForce.h.
Referenced by ACForce::evaluate(), ACForce::makeClone(), and ACForce::put().
|
private |
Definition at line 105 of file ACForce.h.
Referenced by ACForce::ACForce(), ACForce::evaluate(), ACForce::setObservables(), and ACForce::setParticlePropertyList().