![]() |
QMCPACK
|
Public Member Functions | |
DiracDeterminant (std::unique_ptr< SPOSet > &&spos, int first, int last, int ndelay=1, DetMatInvertor matrix_inverter_kind=DetMatInvertor::ACCEL) | |
constructor More... | |
DiracDeterminant (const DiracDeterminant &s)=delete | |
DiracDeterminant & | operator= (const DiracDeterminant &s)=delete |
std::string | getClassName () const override |
return class name 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 &optvars, Vector< ValueType > &dlogpsi) override |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
void | registerData (ParticleSet &P, WFBufferType &buf) override |
For particle-by-particle move. More... | |
void | updateAfterSweep (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) |
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 | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const final |
Finds the SPOSet associated with this determinant, and registers it with WFN wrapper. More... | |
PsiValue | ratio (ParticleSet &P, int iat) override |
return the ratio only for the iat-th partcle move More... | |
void | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) override |
compute multiple ratios for a particle move More... | |
void | evaluateSpinorRatios (const VirtualParticleSet &VP, const std::pair< ValueVector, ValueVector > &spinor_multipler, std::vector< ValueType > &ratios) override |
Used by SOECPComponent for faster SOC evaluation. 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... | |
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... | |
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) final |
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_new) const override |
compute the ratio of the new to old WaveFunctionComponent value and the new gradient 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) final |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int iat) override |
return the logarithmic gradient for the iat-th particle of the source particleset More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, 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 | acceptMove (ParticleSet &P, int iat, bool safe_to_delay=false) override |
move was accepted, update the real container 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... | |
void | restore (int iat) override |
move was rejected. More... | |
LogValue | evaluateLog (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override |
evaluate log of a determinant for a particle set More... | |
void | recompute (const ParticleSet &P) override |
recompute the value of the WaveFunctionComponents which require critical accuracy. 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 | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi) override |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to a collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wf_list) const override |
acquire a shared resource from a collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wf_list) const override |
return a shared resource to a collection More... | |
std::unique_ptr< DiracDeterminantBase > | makeCopy (std::unique_ptr< SPOSet > &&spo) const override |
cloning function More... | |
void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
evaluate the ratios of one virtual move with respect to all the particles More... | |
ValueMatrix & | getPsiMinv () override |
return for testing More... | |
![]() | |
DiracDeterminantBase (const std::string &class_name, std::unique_ptr< SPOSet > &&spos, int first, int last) | |
constructor More... | |
~DiracDeterminantBase () override | |
default destructor More... | |
DiracDeterminantBase (const DiracDeterminantBase &s)=delete | |
DiracDeterminantBase & | operator= (const DiracDeterminantBase &s)=delete |
SPOSetPtr | getPhi () const |
int | getFirstIndex () const |
int | getLastIndex () const |
bool | isFermionic () const final |
true, if this component is fermionic More... | |
bool | isOptimizable () const final |
if true, this contains optimizable components More... | |
void | extractOptimizableObjectRefs (UniqueOptObjRefs &opt_obj_refs) final |
extract underlying OptimizableObject references More... | |
void | checkOutVariables (const opt_variables_type &active) final |
check out variational optimizable variables More... | |
virtual void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &active, int offset, Matrix< RealType > &dlogpsi, Array< GradType, 3 > &dG, Matrix< RealType > &dL) |
std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const final |
make clone More... | |
PsiValue | ratioGradWithSpin (ParticleSet &P, int iat, GradType &grad_iat, ComplexType &spingrad) 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... | |
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... | |
virtual void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi)=0 |
Compute the derivatives of both the log of the wavefunction and kinetic energy with respect to optimizable parameters. More... | |
virtual LogValue | evaluateGL (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L, bool fromscratch) |
compute gradients and laplacian of the TWF with respect to each particle. More... | |
virtual LogValue | evaluateLog (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L)=0 |
evaluate the value of the WaveFunctionComponent from scratch More... | |
virtual 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 |
evaluate gradients and laplacian of the same type WaveFunctionComponent of multiple walkers More... | |
virtual 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 |
evaluate from scratch the same type WaveFunctionComponent of multiple walkers More... | |
virtual void | recompute (const ParticleSet &P) |
recompute the value of the WaveFunctionComponents which require critical accuracy. More... | |
virtual void | copyFromBuffer (ParticleSet &P, WFBufferType &buf)=0 |
For particle-by-particle move. More... | |
virtual void | registerData (ParticleSet &P, WFBufferType &buf)=0 |
For particle-by-particle move. More... | |
virtual LogValue | updateBuffer (ParticleSet &P, WFBufferType &buf, bool fromscratch=false)=0 |
For particle-by-particle move. More... | |
virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
acquire a shared resource from a collection More... | |
virtual void | createResource (ResourceCollection &collection) const |
initialize a shared resource and hand it to a collection More... | |
virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
return a shared resource to a collection More... | |
virtual void | acceptMove (ParticleSet &P, int iat, bool safe_to_delay=false)=0 |
a move for iat-th particle is accepted. More... | |
virtual void | completeUpdates () |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. More... | |
virtual GradType | evalGrad (ParticleSet &P, int iat) |
return the current gradient for the iat-th particle More... | |
virtual 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 |
moves of the iat-th particle on some walkers in a batch is accepted. More... | |
virtual void | mw_calcRatio (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios) const |
compute the ratio of the new to old WaveFunctionComponent value of multiple walkers More... | |
virtual void | mw_completeUpdates (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
complete all the delayed or asynchronous operations for all the walkers in a batch before leaving the p-by-p move region. More... | |
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... | |
virtual void | mw_evalGrad (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< GradType > &grad_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 void | mw_ratioGrad (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios, std::vector< GradType > &grad_new) const |
compute the ratio of the new to old WaveFunctionComponent value and the new gradient of multiple walkers More... | |
virtual PsiValue | ratio (ParticleSet &P, int iat)=0 |
evaluate the ratio of the new to old WaveFunctionComponent value More... | |
virtual PsiValue | ratioGrad (ParticleSet &P, int iat, GradType &grad_iat) |
evaluate the ratio of the new to old WaveFunctionComponent value and the new gradient More... | |
virtual void | restore (int iat)=0 |
If a move for iat-th particle is rejected, restore to the content. More... | |
virtual GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int iat) |
return the logarithmic gradient for the iat-th particle of the source particleset More... | |
virtual GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int iat, TinyVector< ParticleSet::ParticleGradient, OHMMS_DIM > &grad_grad, TinyVector< ParticleSet::ParticleLaplacian, OHMMS_DIM > &lapl_grad) |
Adds the gradient w.r.t. More... | |
virtual void | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi_all) |
virtual void | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) |
evaluate ratios to evaluate the non-local PP More... | |
virtual void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) |
evaluate the ratios of one virtual move with respect to all the particles More... | |
virtual void | evaluateSpinorRatios (const VirtualParticleSet &VP, const std::pair< ValueVector, ValueVector > &spinor_multiplier, std::vector< ValueType > &ratios) |
Used by SOECPComponent for faster SOC evaluation. More... | |
virtual void | mw_evaluateRatios (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, std::vector< std::vector< ValueType >> &ratios) const |
evaluate ratios to evaluate the non-local PP multiple walkers More... | |
![]() | |
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 | 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 |
evaluate from scratch the same type WaveFunctionComponent of multiple walkers More... | |
virtual void | mw_recompute (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< bool > &recompute) const |
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... | |
virtual void | mw_evalGrad (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< GradType > &grad_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 void | mw_calcRatio (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios) const |
compute the ratio of the new to old WaveFunctionComponent value of multiple walkers More... | |
virtual 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 |
evaluate gradients and laplacian of the same type WaveFunctionComponent of multiple walkers More... | |
virtual RealType | KECorrection () |
Return the Chiesa kinetic energy correction. More... | |
virtual void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) |
Calculates the derivatives of ![]() | |
virtual void | finalizeOptimization () |
virtual 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 |
compute the current gradients and spin gradients for the iat-th particle of multiple walkers More... | |
virtual void | mw_ratioGradWithSpin (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios, std::vector< GradType > &grad_new, std::vector< ComplexType > &spingrad_new) const |
compute the ratio of the new to old WaveFunctionComponent value and the new gradient/spingradient of multiple walkers More... | |
Protected Member Functions | |
void | resize (int nel, int morb) |
reset the size: with the number of particles and number of orbtials More... | |
Protected Attributes | |
const int | ndelay_ |
![]() | |
NewTimer & | UpdateTimer |
Timers. More... | |
NewTimer & | RatioTimer |
NewTimer & | InverseTimer |
NewTimer & | BufferTimer |
NewTimer & | SPOVTimer |
NewTimer & | SPOVGLTimer |
const std::unique_ptr< SPOSet > | Phi |
a set of single-particle orbitals used to fill in the values of the matrix More... | |
const int | FirstIndex |
index of the first particle with respect to the particle set More... | |
const int | LastIndex |
index of the last particle with respect to the particle set More... | |
const int | NumOrbitals |
number of single-particle orbitals which belong to this Dirac determinant More... | |
const int | NumPtcls |
number of particles which belong to this Dirac determinant More... | |
ValueMatrix | dummy_vmt |
![]() | |
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 ![]() | |
Private Member Functions | |
void | invertPsiM (const ValueMatrix &logdetT, ValueMatrix &invMat) |
invert psiM or its copies More... | |
void | resizeScratchObjectsForIonDerivs () |
Resize all temporary arrays required for force computation. More... | |
PsiValue | ratioGrad_compute (int iat, GradType &grad_iat) |
internal function computing ratio and gradients after computing the SPOs, used by ratioGrad. More... | |
Private Attributes | |
DiracMatrix< QMCTraits::QTFull::ValueType > | host_inverter_ |
slow but doesn't consume device memory More... | |
const DetMatInvertor | matrix_inverter_kind_ |
selected scheme for inversion More... | |
Additional Inherited Members | |
![]() | |
static bool | checkG (const GradType &g) |
Definition at line 37 of file DiracDeterminant.h.
using GradMatrix = SPOSet::GradMatrix |
Definition at line 49 of file DiracDeterminant.h.
using GradVector = SPOSet::GradVector |
Definition at line 48 of file DiracDeterminant.h.
using HessMatrix = SPOSet::HessMatrix |
Definition at line 50 of file DiracDeterminant.h.
using HessVector = SPOSet::HessVector |
Definition at line 51 of file DiracDeterminant.h.
using mGradType = TinyVector<mValueType, DIM> |
Definition at line 54 of file DiracDeterminant.h.
Definition at line 53 of file DiracDeterminant.h.
using ValueMatrix = SPOSet::ValueMatrix |
Definition at line 47 of file DiracDeterminant.h.
using ValueVector = SPOSet::ValueVector |
Definition at line 46 of file DiracDeterminant.h.
DiracDeterminant | ( | std::unique_ptr< SPOSet > && | spos, |
int | first, | ||
int | last, | ||
int | ndelay = 1 , |
||
DetMatInvertor | matrix_inverter_kind = DetMatInvertor::ACCEL |
||
) |
constructor
spos | the single-particle orbital set |
first | index of the first particle |
last | index of last particle |
ndelay | delayed update rank |
spos | the single-particle orbital set |
first | index of the first particle |
Definition at line 33 of file DiracDeterminant.cpp.
References RotatedSPOs::buildOptVariables(), DiracDeterminantBase::NumPtcls, DiracDeterminantBase::Phi, and DiracDeterminant< DU_TYPE >::resize().
|
delete |
|
overridevirtual |
move was accepted, update the real container
Implements WaveFunctionComponent.
Definition at line 277 of file DiracDeterminant.cpp.
References qmcplusplus::convertValueToLog(), and qmcplusplus::simd::copy().
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from WaveFunctionComponent.
Definition at line 771 of file DiracDeterminant.cpp.
References qmcplusplus::det(), RefVectorWithLeader< T >::getCastedLeader(), and DiracDeterminantBase::Phi.
|
overridevirtual |
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 311 of file DiracDeterminant.cpp.
Referenced by DiracDeterminant< DU_TYPE >::mw_completeUpdates().
|
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 397 of file DiracDeterminant.cpp.
References PooledMemory< T_scalar, Alloc >::get(), and PooledMemory< T_scalar, Alloc >::lendReference().
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 765 of file DiracDeterminant.cpp.
|
overridevirtual |
return the current gradient for the iat-th particle
P | quantum particle set |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 139 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot().
|
overridevirtual |
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 556 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot().
|
overridevirtual |
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 598 of file DiracDeterminant.cpp.
References OHMMS_DIM.
|
finalvirtual |
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 152 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot().
|
overridevirtual |
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 741 of file DiracDeterminant.cpp.
|
overridevirtual |
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 DiracDeterminantBase.
Definition at line 750 of file DiracDeterminant.cpp.
|
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 522 of file DiracDeterminant.cpp.
References qmcplusplus::syclBLAS::copy_n(), 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 370 of file DiracDeterminant.cpp.
|
overridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 572 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot(), and qmcplusplus::outerProduct().
|
overridevirtual |
evaluate log of a determinant for a particle set
Calculate the log value of the Dirac determinant for particles.
P | input configuration containing N particles |
G | a vector containing N gradients |
L | a vector containing N laplacians |
Add the gradient and laplacian contribution of the determinant to G(radient) and L(aplacian) for local energy calculations.
Implements WaveFunctionComponent.
Definition at line 709 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot(), and qmcplusplus::dot().
|
overridevirtual |
compute multiple ratios for a particle move
Reimplemented from WaveFunctionComponent.
Definition at line 445 of file DiracDeterminant.cpp.
References qmcplusplus::syclBLAS::copy_n(), 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 534 of file DiracDeterminant.cpp.
References qmcplusplus::MatrixOperators::product().
|
overridevirtual |
Used by SOECPComponent for faster SOC evaluation.
Reimplemented from WaveFunctionComponent.
Definition at line 460 of file DiracDeterminant.cpp.
References qmcplusplus::syclBLAS::copy_n(), and VirtualParticleSet::refPtcl.
|
inlineoverridevirtual |
return class name
Implements WaveFunctionComponent.
Definition at line 72 of file DiracDeterminant.h.
|
inlineoverridevirtual |
return for testing
Reimplemented from DiracDeterminantBase.
Definition at line 210 of file DiracDeterminant.h.
References DiracDeterminant< DU_TYPE >::psiM.
|
private |
invert psiM or its copies
Definition at line 59 of file DiracDeterminant.cpp.
References qmcplusplus::ACCEL, OHMMS::Controller, qmcplusplus::Units::charge::e, omp_get_thread_num(), and Communicate::rank().
|
overridevirtual |
cloning function
tqp | target particleset |
spo | spo set |
This interface is exposed only to SlaterDet and its derived classes can overwrite to clone itself correctly.
Implements DiracDeterminantBase.
Definition at line 758 of file DiracDeterminant.cpp.
|
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 146 of file DiracDeterminant.h.
|
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 161 of file DiracDeterminant.h.
References DiracDeterminant< DU_TYPE >::completeUpdates().
|
overridevirtual |
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 475 of file DiracDeterminant.cpp.
References qmcplusplus::det(), and RefVectorWithLeader< T >::getCastedElement().
|
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 240 of file DiracDeterminant.cpp.
References qmcplusplus::det(), RefVectorWithLeader< T >::getCastedElement(), and DiracDeterminant< DU_TYPE >::ratioGrad_compute().
|
delete |
|
overridevirtual |
return the ratio only for the iat-th partcle move
P | current configuration |
iat | the particle thas is being moved |
Implements WaveFunctionComponent.
Definition at line 420 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot().
|
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 170 of file DiracDeterminant.cpp.
|
private |
internal function computing ratio and gradients after computing the SPOs, used by ratioGrad.
Definition at line 182 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot().
Referenced by DiracDeterminant< DU_TYPE >::mw_ratioGrad().
|
finalvirtual |
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 205 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot().
|
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 726 of file DiracDeterminant.cpp.
|
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 341 of file DiracDeterminant.cpp.
References PooledMemory< T_scalar, Alloc >::add(), PooledMemory< T_scalar, Alloc >::current(), and PooledMemory< T_scalar, Alloc >::forward().
|
finalvirtual |
Finds the SPOSet associated with this determinant, and registers it with WFN wrapper.
Reimplemented from DiracDeterminantBase.
Definition at line 410 of file DiracDeterminant.cpp.
References ParticleSet::getGroupID(), and qmcplusplus::twf.
|
overridevirtual |
return a shared resource to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 785 of file DiracDeterminant.cpp.
References qmcplusplus::det(), RefVectorWithLeader< T >::getCastedLeader(), and DiracDeterminantBase::Phi.
|
protected |
reset the size: with the number of particles and number of orbtials
Definition at line 116 of file DiracDeterminant.cpp.
References qmcplusplus::ewaldref::DIM.
Referenced by DiracDeterminant< DU_TYPE >::DiracDeterminant().
|
private |
Resize all temporary arrays required for force computation.
Definition at line 544 of file DiracDeterminant.cpp.
|
overridevirtual |
move was rejected.
copy the real container to the temporary to move on
Implements WaveFunctionComponent.
Definition at line 305 of file DiracDeterminant.cpp.
void updateAfterSweep | ( | const ParticleSet & | P, |
ParticleSet::ParticleGradient & | G, | ||
ParticleSet::ParticleLaplacian & | L | ||
) |
Definition at line 320 of file DiracDeterminant.cpp.
References qmcplusplus::simd::dot(), and qmcplusplus::dot().
|
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 383 of file DiracDeterminant.cpp.
References PooledMemory< T_scalar, Alloc >::forward(), ParticleSet::G, ParticleSet::L, and PooledMemory< T_scalar, Alloc >::put().
PsiValue curRatio |
Definition at line 257 of file DiracDeterminant.h.
ValueMatrix d2psiM |
d2psiM(i,j)
Definition at line 228 of file DiracDeterminant.h.
ValueVector d2psiV |
Definition at line 242 of file DiracDeterminant.h.
GradMatrix dpsiM |
dpsiM(i,j)
Definition at line 225 of file DiracDeterminant.h.
GradVector dpsiV |
Definition at line 241 of file DiracDeterminant.h.
ValueVector dspin_psiV |
Definition at line 240 of file DiracDeterminant.h.
ValueType* FirstAddressOfdV |
Definition at line 258 of file DiracDeterminant.h.
HessMatrix grad_grad_source_psiM |
Definition at line 232 of file DiracDeterminant.h.
GradMatrix grad_lapl_source_psiM |
Definition at line 231 of file DiracDeterminant.h.
HessMatrix grad_phi_alpha_Minv |
Definition at line 236 of file DiracDeterminant.h.
GradMatrix grad_phi_Minv |
Definition at line 234 of file DiracDeterminant.h.
GradMatrix grad_source_psiM |
Used for force computations.
Definition at line 231 of file DiracDeterminant.h.
|
private |
slow but doesn't consume device memory
Definition at line 263 of file DiracDeterminant.h.
ValueVector invRow |
the row of up-to-date inverse matrix
Definition at line 248 of file DiracDeterminant.h.
int invRow_id |
row id correspond to the up-to-date invRow.
[0 norb), invRow is ready; -1, invRow is not valid. This id is set after calling getInvRow indicating invRow has been prepared for the invRow_id row ratioGrad checks if invRow_id is consistent. If not, invRow needs to be recomputed. acceptMove and completeUpdates mark invRow invalid by setting invRow_id to -1
Definition at line 255 of file DiracDeterminant.h.
ValueMatrix lapl_phi_Minv |
Definition at line 235 of file DiracDeterminant.h.
ValueType* LastAddressOfdV |
Definition at line 259 of file DiracDeterminant.h.
|
private |
selected scheme for inversion
Definition at line 266 of file DiracDeterminant.h.
|
protected |
Definition at line 40 of file DiracDeterminant.h.
GradMatrix phi_alpha_Minv |
Definition at line 234 of file DiracDeterminant.h.
ValueMatrix psiM |
inverse transpose of psiM(j,i)
Definition at line 219 of file DiracDeterminant.h.
Referenced by DiracDeterminant< DU_TYPE >::getPsiMinv().
ValueMatrix psiM_temp |
psiM(j,i)
Definition at line 216 of file DiracDeterminant.h.
ValueMatrix psiMinv |
temporary container for testing
Definition at line 222 of file DiracDeterminant.h.
ValueVector psiV |
value of single-particle orbital for particle-by-particle update
Definition at line 239 of file DiracDeterminant.h.
DU_TYPE updateEng |
delayed update engine
Definition at line 245 of file DiracDeterminant.h.