![]() |
QMCPACK
|
Public Member Functions | |
SlaterDet (ParticleSet &targetPtcl, std::vector< std::unique_ptr< Determinant_t >> dets, const std::string &class_name="SlaterDet") | |
constructor More... | |
~SlaterDet () override | |
destructor More... | |
std::string | getClassName () const override |
return class name More... | |
bool | isFermionic () const final |
true, if this component is fermionic More... | |
bool | isOptimizable () const override |
if true, this contains optimizable components More... | |
void | extractOptimizableObjectRefs (UniqueOptObjRefs &opt_obj_refs) override |
extract underlying OptimizableObject references More... | |
void | checkOutVariables (const opt_variables_type &active) override |
check out variational optimizable variables More... | |
void | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const override |
Register the component with the TWFFastDerivWrapper wrapper. More... | |
LogValue | evaluateLog (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override |
evaluate the value of the WaveFunctionComponent from scratch More... | |
void | mw_evaluateLog (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const RefVector< ParticleSet::ParticleGradient > &G_list, const RefVector< ParticleSet::ParticleLaplacian > &L_list) const override |
evaluate from scratch the same type WaveFunctionComponent of multiple walkers More... | |
LogValue | evaluateGL (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L, bool fromscratch) override |
compute gradients and laplacian of the TWF with respect to each particle. More... | |
void | mw_evaluateGL (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const RefVector< ParticleSet::ParticleGradient > &G_list, const RefVector< ParticleSet::ParticleLaplacian > &L_list, bool fromscratch) const override |
evaluate gradients and laplacian of the same type WaveFunctionComponent of multiple walkers More... | |
void | recompute (const ParticleSet &P) override |
recompute the value of the WaveFunctionComponents which require critical accuracy. More... | |
void | mw_recompute (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< bool > &recompute) const override |
void | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi) override |
int | size () const |
return the total number of Dirac determinants More... | |
void | registerData (ParticleSet &P, WFBufferType &buf) override |
For particle-by-particle move. More... | |
LogValue | updateBuffer (ParticleSet &P, WFBufferType &buf, bool fromscratch=false) override |
For particle-by-particle move. More... | |
void | copyFromBuffer (ParticleSet &P, WFBufferType &buf) override |
For particle-by-particle move. More... | |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to a collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const override |
acquire a shared resource from a collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const override |
return a shared resource to a collection More... | |
void | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) override |
evaluate ratios to evaluate the non-local PP More... | |
void | evaluateSpinorRatios (const VirtualParticleSet &VP, const std::pair< ValueVector, ValueVector > &spinor_multiplier, std::vector< ValueType > &ratios) override |
Used by SOECPComponent for faster SOC evaluation. More... | |
void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) override |
evaluate ratios to evaluate the non-local PP More... | |
void | mw_evaluateRatios (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, std::vector< std::vector< ValueType >> &ratios) const override |
evaluate ratios to evaluate the non-local PP multiple walkers More... | |
PsiValue | ratioGrad (ParticleSet &P, int iat, GradType &grad_iat) override |
evaluate the ratio of the new to old WaveFunctionComponent value and the new gradient More... | |
PsiValue | ratioGradWithSpin (ParticleSet &P, int iat, GradType &grad_iat, ComplexType &spingrad_iat) override |
evaluate the ratio of the new to old WaveFunctionComponent value and the new spin gradient Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. More... | |
void | mw_ratioGrad (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios, std::vector< GradType > &grad_now) const override |
compute the ratio of the new to old WaveFunctionComponent value and the new gradient of multiple walkers More... | |
void | mw_ratioGradWithSpin (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios, std::vector< GradType > &grad_now, std::vector< ComplexType > &spingrad_now) const override |
compute the ratio of the new to old WaveFunctionComponent value and the new gradient/spingradient of multiple walkers More... | |
GradType | evalGrad (ParticleSet &P, int iat) override |
return the current gradient for the iat-th particle More... | |
GradType | evalGradWithSpin (ParticleSet &P, int iat, ComplexType &spingrad) override |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. More... | |
void | mw_evalGrad (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< GradType > &grad_now) const override |
compute the current gradients for the iat-th particle of multiple walkers More... | |
void | mw_evalGradWithSpin (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< GradType > &grad_now, std::vector< ComplexType > &spingrad_now) const override |
compute the current gradients and spin gradients for the iat-th particle of multiple walkers More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &src, int iat) override |
return the logarithmic gradient for the iat-th particle of the source particleset More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &src, int iat, TinyVector< ParticleSet::ParticleGradient, OHMMS_DIM > &grad_grad, TinyVector< ParticleSet::ParticleLaplacian, OHMMS_DIM > &lapl_grad) override |
Adds the gradient w.r.t. More... | |
void | restore (int iat) override |
If a move for iat-th particle is rejected, restore to the content. More... | |
void | acceptMove (ParticleSet &P, int iat, bool safe_to_delay=false) override |
a move for iat-th particle is accepted. More... | |
void | mw_accept_rejectMove (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, const std::vector< bool > &isAccepted, bool safe_to_delay=false) const override |
moves of the iat-th particle on some walkers in a batch is accepted. More... | |
void | completeUpdates () override |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. More... | |
void | mw_completeUpdates (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const override |
complete all the delayed or asynchronous operations for all the walkers in a batch before leaving the p-by-p move region. More... | |
PsiValue | ratio (ParticleSet &P, int iat) override |
evaluate the ratio of the new to old WaveFunctionComponent value More... | |
void | mw_calcRatio (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios) const override |
compute the ratio of the new to old WaveFunctionComponent value of multiple walkers More... | |
std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const override |
make clone More... | |
SPOSetPtr | getPhi (int i=0) |
void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
evaluate the ratios of one virtual move with respect to all the particles More... | |
void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
Compute the derivatives of both the log of the wavefunction and kinetic energy with respect to optimizable parameters. More... | |
void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi) override |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) override |
Calculates the derivatives of ![]() | |
![]() | |
const LogValue & | get_log_value () const |
WaveFunctionComponent (const std::string &obj_name="") | |
default constructor More... | |
virtual | ~WaveFunctionComponent () |
default destructor More... | |
virtual void | checkSanity () const |
Validate the internal consistency of the object. More... | |
const std::string & | getName () const |
return object name More... | |
PsiValue | getValue () const |
assembles the full value More... | |
virtual bool | isMultiDet () const |
true, if this component is multi-determinant More... | |
virtual void | prepareGroup (ParticleSet &P, int ig) |
Prepare internal data for updating WFC correspond to a particle group It should be called before moving particles of a given group. More... | |
virtual void | mw_prepareGroup (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int ig) const |
template<CoordsType CT> | |
void | mw_evalGrad (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const int iat, TWFGrads< CT > &grads_now) const |
compute the current gradients for the iat-th particle of multiple walkers More... | |
template<CoordsType CT> | |
void | mw_ratioGrad (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios, TWFGrads< CT > &grad_new) const |
virtual RealType | KECorrection () |
Return the Chiesa kinetic energy correction. More... | |
virtual void | finalizeOptimization () |
Public Attributes | |
const std::vector< std::unique_ptr< Determinant_t > > | Dets |
container for the DiracDeterminants More... | |
![]() | |
int | UpdateMode |
current update mode More... | |
opt_variables_type | myVars |
list of variables this WaveFunctionComponent handles More... | |
size_t | Bytes_in_WFBuffer |
Bytes in WFBuffer. More... | |
Private Member Functions | |
int | getDetID (const int iat) const |
RefVectorWithLeader< WaveFunctionComponent > | extract_DetRef_list (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, int det_id) const |
Private Attributes | |
std::vector< int > | Last |
the last particle of each group More... | |
Additional Inherited Members | |
![]() | |
const std::string | my_name_ |
Name of the object It is required to be different for objects of the same derived type like multiple J1. More... | |
LogValue | log_value_ |
Current ![]() | |
Definition at line 28 of file SlaterDet.h.
using Determinant_t = DiracDeterminantBase |
Definition at line 31 of file SlaterDet.h.
SlaterDet | ( | ParticleSet & | targetPtcl, |
std::vector< std::unique_ptr< Determinant_t >> | dets, | ||
const std::string & | class_name = "SlaterDet" |
||
) |
constructor
targetPtcl | target Particleset |
Definition at line 27 of file SlaterDet.cpp.
References SlaterDet::Dets, ParticleSet::groups(), SlaterDet::Last, and ParticleSet::last().
|
overridedefault |
destructor
|
inlineoverridevirtual |
a move for iat-th particle is accepted.
Update the current content.
P | target ParticleSet |
iat | index of the particle whose new position was proposed |
safe_to_delay | if true, delayed accept is safe. |
Implements WaveFunctionComponent.
Definition at line 189 of file SlaterDet.h.
References SlaterDet::Dets, WaveFunctionComponent::get_log_value(), SlaterDet::getDetID(), and WaveFunctionComponent::log_value_.
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from WaveFunctionComponent.
Definition at line 221 of file SlaterDet.cpp.
References SlaterDet::Dets, and SlaterDet::extract_DetRef_list().
|
overridevirtual |
check out variational optimizable variables
active | a super set of optimizable variables |
Reimplemented from WaveFunctionComponent.
Definition at line 53 of file SlaterDet.cpp.
References VariableSet::clear(), SlaterDet::Dets, VariableSet::getIndex(), VariableSet::insertFrom(), SlaterDet::isOptimizable(), and WaveFunctionComponent::myVars.
|
inlineoverridevirtual |
complete all the delayed or asynchronous operations before leaving the p-by-p move region.
Must be called at the end of each substep if p-by-p move is used. This function was initially introduced for determinant delayed updates to complete all the delayed operations. It has been extended to handle asynchronous operations on accellerators before leaving the p-by-p move region.
Reimplemented from WaveFunctionComponent.
Definition at line 226 of file SlaterDet.h.
References SlaterDet::Dets.
|
overridevirtual |
For particle-by-particle move.
Copy data or attach memory from a walker buffer to the objects of this class. The log value, P.G and P.L contribution from the objects of this class are also added.
P | particle set |
buf | Anonymous storage |
Implements WaveFunctionComponent.
Definition at line 259 of file SlaterDet.cpp.
References PooledMemory< T_scalar, Alloc >::current(), DEBUG_PSIBUFFER, and SlaterDet::Dets.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 215 of file SlaterDet.cpp.
References SlaterDet::Dets.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
return the current gradient for the iat-th particle
P | quantum particle set |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 145 of file SlaterDet.h.
References SlaterDet::Dets, and SlaterDet::getDetID().
|
inlineoverridevirtual |
return the logarithmic gradient for the iat-th particle of the source particleset
Pquantum | particle set |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 167 of file SlaterDet.h.
References SlaterDet::Dets, and SlaterDet::size().
Referenced by SlaterDet::evalGradSource().
|
inlineoverridevirtual |
Adds the gradient w.r.t.
the iat-th particle of the source particleset (ions) of the logarithmic gradient and laplacian w.r.t. the target paritlceset (electrons).
P | quantum particle set (electrons) |
source | classical particle set (ions) |
iat | particle index of source (ion) |
the | ion gradient of the elctron gradient |
the | ion gradient of the elctron laplacian. |
Reimplemented from WaveFunctionComponent.
Definition at line 175 of file SlaterDet.h.
References SlaterDet::Dets, SlaterDet::evalGradSource(), and SlaterDet::size().
|
inlineoverridevirtual |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin.
P | quantum particle set |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 147 of file SlaterDet.h.
References SlaterDet::Dets, and SlaterDet::getDetID().
|
inlineoverridevirtual |
Compute the derivatives of both the log of the wavefunction and kinetic energy with respect to optimizable parameters.
P | particle set |
optvars | optimizable parameters |
dlogpsi | array of derivatives of the log of the wavefunction. Add the contribution from this component. |
dhpsioverpsi | array of Hamiltonian derivatives. Add the kinetic energy derivatives contribution from this component. ![]() ![]() ![]() ![]() |
Implements WaveFunctionComponent.
Definition at line 255 of file SlaterDet.h.
References SlaterDet::Dets, WaveFunctionComponent::myVars, VariableSet::size(), and VariableSet::where().
|
inlineoverridevirtual |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters.
parameters
P | particle set |
optvars | optimizable parameters |
dlogpsi | array of derivatives of the log of the wavefunction. Note: this function differs from the evaluateDerivatives function in the way that it only computes the derivative of the log of the wavefunction. |
Reimplemented from WaveFunctionComponent.
Definition at line 274 of file SlaterDet.h.
References SlaterDet::Dets, WaveFunctionComponent::myVars, VariableSet::size(), and VariableSet::where().
|
overridevirtual |
evaluate ratios to evaluate the non-local PP
VP | VirtualParticleSet |
ratios | ratios with new positions VP.R[k] the VP.refPtcl |
dratios | Nq x Num_param matrix. ![]() |
Reimplemented from WaveFunctionComponent.
Definition at line 114 of file SlaterDet.cpp.
References SlaterDet::Dets, SlaterDet::getDetID(), and VirtualParticleSet::refPtcl.
|
overridevirtual |
compute gradients and laplacian of the TWF with respect to each particle.
P | particle set |
G | Gradients, ![]() |
L | Laplacians, ![]() |
fromscratch | if true and this WFC is sensitive to numeical error accumulation, all the internal data are recomputed from scratch. |
Reimplemented from WaveFunctionComponent.
Definition at line 151 of file SlaterDet.cpp.
References SlaterDet::Dets, and WaveFunctionComponent::log_value_.
|
inlineoverridevirtual |
Calculates the derivatives of with respect to the optimizable parameters, and the dot product of this is then performed with the passed-in G_in gradient vector.
This object is then returned as dgradlogpsi.
Reimplemented from WaveFunctionComponent.
Definition at line 290 of file SlaterDet.h.
References SlaterDet::Dets.
|
overridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 199 of file SlaterDet.cpp.
References SlaterDet::Dets, and ParticleSet::getTotalNum().
|
overridevirtual |
evaluate the value of the WaveFunctionComponent from scratch
[in] | P | active ParticleSet |
[out] | G | Gradients, ![]() |
[out] | L | Laplacians, ![]() |
Mainly for walker-by-walker move. The initial stage of particle-by-particle move also uses this. causes complete state update in WFC's
Implements WaveFunctionComponent.
Definition at line 122 of file SlaterDet.cpp.
References SlaterDet::Dets, and WaveFunctionComponent::log_value_.
|
inlineoverridevirtual |
evaluate ratios to evaluate the non-local PP
VP | VirtualParticleSet |
ratios | ratios with new positions VP.R[k] the VP.refPtcl |
Reimplemented from WaveFunctionComponent.
Definition at line 101 of file SlaterDet.h.
References SlaterDet::Dets, SlaterDet::getDetID(), and VirtualParticleSet::refPtcl.
|
overridevirtual |
evaluate the ratios of one virtual move with respect to all the particles
P | reference particleset |
ratios | ![]() |
Reimplemented from WaveFunctionComponent.
Definition at line 108 of file SlaterDet.cpp.
References SlaterDet::Dets.
|
inlineoverridevirtual |
Used by SOECPComponent for faster SOC evaluation.
Reimplemented from WaveFunctionComponent.
Definition at line 106 of file SlaterDet.h.
References SlaterDet::Dets, SlaterDet::getDetID(), and VirtualParticleSet::refPtcl.
|
inlineprivate |
Definition at line 307 of file SlaterDet.h.
References SlaterDet::Dets, and RefVectorWithLeader< T >::getCastedLeader().
Referenced by SlaterDet::acquireResource(), SlaterDet::mw_accept_rejectMove(), SlaterDet::mw_calcRatio(), SlaterDet::mw_completeUpdates(), SlaterDet::mw_evalGrad(), SlaterDet::mw_evalGradWithSpin(), SlaterDet::mw_evaluateGL(), SlaterDet::mw_evaluateLog(), SlaterDet::mw_evaluateRatios(), SlaterDet::mw_ratioGrad(), SlaterDet::mw_ratioGradWithSpin(), SlaterDet::mw_recompute(), and SlaterDet::releaseResource().
|
overridevirtual |
extract underlying OptimizableObject references
opt_obj_refs | aggregated list of optimizable object references |
Reimplemented from WaveFunctionComponent.
Definition at line 47 of file SlaterDet.cpp.
References SlaterDet::Dets, and SlaterDet::extractOptimizableObjectRefs().
Referenced by SlaterDet::extractOptimizableObjectRefs().
|
inlineoverridevirtual |
|
inlineprivate |
Definition at line 298 of file SlaterDet.h.
References SlaterDet::Last.
Referenced by SlaterDet::acceptMove(), SlaterDet::evalGrad(), SlaterDet::evalGradWithSpin(), SlaterDet::evaluateDerivRatios(), SlaterDet::evaluateRatios(), SlaterDet::evaluateSpinorRatios(), SlaterDet::mw_accept_rejectMove(), SlaterDet::mw_calcRatio(), SlaterDet::mw_evalGrad(), SlaterDet::mw_evalGradWithSpin(), SlaterDet::mw_evaluateRatios(), SlaterDet::mw_ratioGrad(), SlaterDet::mw_ratioGradWithSpin(), SlaterDet::ratio(), SlaterDet::ratioGrad(), SlaterDet::ratioGradWithSpin(), and SlaterDet::restore().
|
inline |
Definition at line 251 of file SlaterDet.h.
References SlaterDet::Dets.
Referenced by qmcplusplus::TEST_CASE().
|
inlinefinalvirtual |
true, if this component is fermionic
Reimplemented from WaveFunctionComponent.
Definition at line 47 of file SlaterDet.h.
|
overridevirtual |
if true, this contains optimizable components
Reimplemented from WaveFunctionComponent.
Definition at line 42 of file SlaterDet.cpp.
References qmcplusplus::det(), and SlaterDet::Dets.
Referenced by SlaterDet::checkOutVariables(), and SlaterDet::makeClone().
|
overridevirtual |
make clone
tqp | target Quantum ParticleSet |
deepcopy | if true, make a decopy |
If not true, return a proxy class
Reimplemented from WaveFunctionComponent.
Definition at line 267 of file SlaterDet.cpp.
References qmcplusplus::det(), SlaterDet::Dets, and SlaterDet::isOptimizable().
|
inlineoverridevirtual |
moves of the iat-th particle on some walkers in a batch is accepted.
Update the current content. Note that all the lists only include accepted walkers.
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
iat | particle index |
safe_to_delay | if true, delayed accept is safe. |
Reimplemented from WaveFunctionComponent.
Definition at line 198 of file SlaterDet.h.
References BLAS::czero, SlaterDet::Dets, SlaterDet::extract_DetRef_list(), WaveFunctionComponent::get_log_value(), RefVectorWithLeader< T >::getCastedElement(), SlaterDet::getDetID(), and WaveFunctionComponent::log_value_.
|
inlineoverridevirtual |
compute the ratio of the new to old WaveFunctionComponent value of multiple walkers
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
iat | particle index |
ratios | the list of WF ratios of a walker batch, ![]() |
Reimplemented from WaveFunctionComponent.
Definition at line 240 of file SlaterDet.h.
References SlaterDet::Dets, SlaterDet::extract_DetRef_list(), and SlaterDet::getDetID().
|
inlineoverridevirtual |
complete all the delayed or asynchronous operations for all the walkers in a batch before leaving the p-by-p move region.
Reimplemented from WaveFunctionComponent.
Definition at line 232 of file SlaterDet.h.
References SlaterDet::Dets, and SlaterDet::extract_DetRef_list().
|
inlineoverridevirtual |
compute the current gradients for the iat-th particle of multiple walkers
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
iat | particle index |
grad_now | the list of gradients in a walker batch, ![]() |
Reimplemented from WaveFunctionComponent.
Definition at line 152 of file SlaterDet.h.
References SlaterDet::Dets, SlaterDet::extract_DetRef_list(), and SlaterDet::getDetID().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
compute the current gradients and spin gradients for the iat-th particle of multiple walkers
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
iat | particle index |
grad_now | the list of gradients in a walker batch, ![]() |
spingrad_now | the list of spin gradients in a walker batch, ![]() |
Reimplemented from WaveFunctionComponent.
Definition at line 98 of file SlaterDet.cpp.
References SlaterDet::Dets, SlaterDet::extract_DetRef_list(), and SlaterDet::getDetID().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
evaluate gradients and laplacian of the same type WaveFunctionComponent of multiple walkers
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
G_list | the list of Gradients pointers in a walker batch, ![]() |
L_list | the list of Laplacians pointers in a walker batch, ![]() |
fromscratch | if true and this WFC is sensitive to numerical error accumulation, all the internal data are recomputed from scratch. |
Reimplemented from WaveFunctionComponent.
Definition at line 162 of file SlaterDet.cpp.
References BLAS::czero, SlaterDet::Dets, SlaterDet::extract_DetRef_list(), RefVectorWithLeader< T >::getCastedElement(), and WaveFunctionComponent::log_value_.
|
overridevirtual |
evaluate from scratch the same type WaveFunctionComponent of multiple walkers
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
G_list | the list of Gradients pointers in a walker batch, ![]() |
L_list | the list of Laplacians pointers in a walker batch, ![]() |
values | the log WF values of walkers in a batch |
Reimplemented from WaveFunctionComponent.
Definition at line 132 of file SlaterDet.cpp.
References BLAS::czero, SlaterDet::Dets, SlaterDet::extract_DetRef_list(), RefVectorWithLeader< T >::getCastedElement(), and WaveFunctionComponent::log_value_.
|
inlineoverridevirtual |
evaluate ratios to evaluate the non-local PP multiple walkers
wfc_list | the list of WaveFunctionComponent references of the same component in a walker batch |
vp_list | the list of VirtualParticleSet references in a walker batch |
ratios | of all the virtual moves of all the walkers |
Reimplemented from WaveFunctionComponent.
Definition at line 116 of file SlaterDet.h.
References SlaterDet::Dets, SlaterDet::extract_DetRef_list(), and SlaterDet::getDetID().
|
overridevirtual |
compute the ratio of the new to old WaveFunctionComponent value and the new gradient of multiple walkers
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
iat | particle index |
ratios | the list of WF ratios of a walker batch, ![]() |
grad_now | the list of new gradients in a walker batch, ![]() |
Reimplemented from WaveFunctionComponent.
Definition at line 75 of file SlaterDet.cpp.
References SlaterDet::Dets, SlaterDet::extract_DetRef_list(), and SlaterDet::getDetID().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
compute the ratio of the new to old WaveFunctionComponent value and the new gradient/spingradient of multiple walkers
wfc_list | the list of WaveFunctionComponent pointers of the same component in a walker batch |
p_list | the list of ParticleSet pointers in a walker batch |
iat | particle index |
ratios | the list of WF ratios of a walker batch, ![]() |
grad_now | the list of new gradients in a walker batch, ![]() |
Reimplemented from WaveFunctionComponent.
Definition at line 85 of file SlaterDet.cpp.
References SlaterDet::Dets, SlaterDet::extract_DetRef_list(), and SlaterDet::getDetID().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 188 of file SlaterDet.cpp.
References SlaterDet::Dets, SlaterDet::extract_DetRef_list(), and SlaterDet::recompute().
|
inlineoverridevirtual |
evaluate the ratio of the new to old WaveFunctionComponent value
P | the active ParticleSet |
iat | the index of a particle |
Specialized for particle-by-particle move
Implements WaveFunctionComponent.
Definition at line 238 of file SlaterDet.h.
References SlaterDet::Dets, and SlaterDet::getDetID().
|
overridevirtual |
evaluate the ratio of the new to old WaveFunctionComponent value and the new gradient
P | the active ParticleSet |
iat | the index of a particle |
grad_iat | Gradient for the active particle |
Reimplemented from WaveFunctionComponent.
Definition at line 65 of file SlaterDet.cpp.
References SlaterDet::Dets, and SlaterDet::getDetID().
|
overridevirtual |
evaluate the ratio of the new to old WaveFunctionComponent value and the new spin gradient Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin.
P | the active ParticleSet |
iat | the index of a particle |
grad_iat | realspace gradient for the active particle |
spingrad_iat | spin gradient for the active particle |
Reimplemented from WaveFunctionComponent.
Definition at line 70 of file SlaterDet.cpp.
References SlaterDet::Dets, and SlaterDet::getDetID().
|
overridevirtual |
recompute the value of the WaveFunctionComponents which require critical accuracy.
needed for Slater Determinants but not needed for most types of WaveFunctionComponents
Reimplemented from WaveFunctionComponent.
Definition at line 182 of file SlaterDet.cpp.
References SlaterDet::Dets.
Referenced by SlaterDet::mw_recompute().
|
overridevirtual |
For particle-by-particle move.
Requests space in the buffer based on the data type sizes of the objects in this class.
P | particle set |
buf | Anonymous storage |
Implements WaveFunctionComponent.
Definition at line 241 of file SlaterDet.cpp.
References PooledMemory< T_scalar, Alloc >::current(), DEBUG_PSIBUFFER, and SlaterDet::Dets.
|
overridevirtual |
Register the component with the TWFFastDerivWrapper wrapper.
Reimplemented from WaveFunctionComponent.
Definition at line 277 of file SlaterDet.cpp.
References SlaterDet::Dets, and qmcplusplus::twf.
|
overridevirtual |
return a shared resource to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 231 of file SlaterDet.cpp.
References SlaterDet::Dets, and SlaterDet::extract_DetRef_list().
|
inlineoverridevirtual |
If a move for iat-th particle is rejected, restore to the content.
iat | index of the particle whose new position was proposed |
Ye: hopefully we can gradually move away from restore
Implements WaveFunctionComponent.
Definition at line 187 of file SlaterDet.h.
References SlaterDet::Dets, and SlaterDet::getDetID().
|
inline |
return the total number of Dirac determinants
Definition at line 85 of file SlaterDet.h.
References SlaterDet::Dets.
Referenced by SlaterDet::evalGradSource().
|
overridevirtual |
For particle-by-particle move.
Put the objects of this class in the walker buffer or forward the memory cursor.
P | particle set |
buf | Anonymous storage |
fromscratch | request recomputing the precision critical pieces of wavefunction from scratch |
Implements WaveFunctionComponent.
Definition at line 249 of file SlaterDet.cpp.
References PooledMemory< T_scalar, Alloc >::current(), DEBUG_PSIBUFFER, SlaterDet::Dets, and WaveFunctionComponent::log_value_.
const std::vector<std::unique_ptr<Determinant_t> > Dets |
container for the DiracDeterminants
Definition at line 33 of file SlaterDet.h.
Referenced by SlaterDet::acceptMove(), SlaterDet::acquireResource(), WaveFunctionTester::checkGradientAtConfiguration(), SlaterDet::checkOutVariables(), SlaterDet::completeUpdates(), SlaterDet::copyFromBuffer(), SlaterDet::createResource(), SlaterDet::evalGrad(), SlaterDet::evalGradSource(), SlaterDet::evalGradWithSpin(), SlaterDet::evaluateDerivatives(), SlaterDet::evaluateDerivativesWF(), SlaterDet::evaluateDerivRatios(), SlaterDet::evaluateGL(), SlaterDet::evaluateGradDerivatives(), SlaterDet::evaluateHessian(), SlaterDet::evaluateLog(), SlaterDet::evaluateRatios(), SlaterDet::evaluateRatiosAlltoOne(), SlaterDet::evaluateSpinorRatios(), SlaterDet::extract_DetRef_list(), SlaterDet::extractOptimizableObjectRefs(), SlaterDet::getPhi(), SlaterDet::isOptimizable(), SlaterDet::makeClone(), SlaterDet::mw_accept_rejectMove(), SlaterDet::mw_calcRatio(), SlaterDet::mw_completeUpdates(), SlaterDet::mw_evalGrad(), SlaterDet::mw_evalGradWithSpin(), SlaterDet::mw_evaluateGL(), SlaterDet::mw_evaluateLog(), SlaterDet::mw_evaluateRatios(), SlaterDet::mw_ratioGrad(), SlaterDet::mw_ratioGradWithSpin(), SlaterDet::mw_recompute(), SlaterDet::ratio(), SlaterDet::ratioGrad(), SlaterDet::ratioGradWithSpin(), SlaterDet::recompute(), SlaterDet::registerData(), SlaterDet::registerTWFFastDerivWrapper(), SlaterDet::releaseResource(), SlaterDet::restore(), SlaterDet::size(), SlaterDet::SlaterDet(), and SlaterDet::updateBuffer().
|
private |
the last particle of each group
Definition at line 319 of file SlaterDet.h.
Referenced by SlaterDet::getDetID(), and SlaterDet::SlaterDet().