![]() |
QMCPACK
|
Classes which constitute a many-body trial wave function. More...
Classes | |
class | MultiSlaterDetTableMethod |
An AntiSymmetric WaveFunctionComponent composed of a linear combination of SlaterDeterminants. More... | |
class | J1OrbitalSoA< FT > |
Specialization for one-body Jastrow function using multiple functors. More... | |
struct | J1Spin< FT > |
Specialization for one-body Jastrow function using multiple functors. More... | |
class | JeeIOrbitalSoA< FT > |
Specialization for three-body Jastrow function using multiple functors. More... | |
class | TwoBodyJastrow< FT > |
Specialization for two-body Jastrow function using multiple functors. More... | |
class | WaveFunctionComponent |
An abstract class for a component of a many-body trial wave function. More... | |
Classes which constitute a many-body trial wave function.
A many-body trial wave function is
where s are represented by the derived classes from WaveFunctionComponent.
class qmcplusplus::MultiSlaterDetTableMethod |
An AntiSymmetric WaveFunctionComponent composed of a linear combination of SlaterDeterminants.
.
The (S)ingle(P)article(O)rbitalSet template parameter is an engine which fills in single-particle orbital terms.
The Laplacian
Definition at line 66 of file MultiSlaterDetTableMethod.h.
Public Types | |
template<typename DT > | |
using | OffloadVector = Vector< DT, OffloadPinnedAllocator< DT > > |
using | SPOSetPtr = SPOSet * |
using | IndexVector = OrbitalSetTraits< ValueType >::IndexVector |
using | ValueVector = OrbitalSetTraits< ValueType >::ValueVector |
using | GradVector = OrbitalSetTraits< ValueType >::GradVector |
using | HessMatrix = OrbitalSetTraits< ValueType >::HessMatrix |
using | ValueMatrix = OrbitalSetTraits< ValueType >::ValueMatrix |
using | HessType = OrbitalSetTraits< ValueType >::HessType |
using | HessArray = Array< HessType, 3 > |
using | GGGType = TinyVector< HessType, OHMMS_DIM > |
using | GGGVector = Vector< GGGType > |
using | GGGMatrix = Matrix< GGGType > |
using | Walker_t = ParticleSet::Walker_t |
![]() | |
enum | { ORB_PBYP_RATIO, ORB_PBYP_ALL, ORB_PBYP_PARTIAL, ORB_WALKER, ORB_ALLWALKER } |
enum for a update mode More... | |
using | Walker_t = ParticleSet::Walker_t |
using | WFBufferType = Walker_t::WFBuffer_t |
using | BufferType = Walker_t::Buffer_t |
using | RealMatrix_t = OrbitalSetTraits< RealType >::ValueMatrix |
using | ValueVector = OrbitalSetTraits< ValueType >::ValueVector |
using | ValueMatrix = OrbitalSetTraits< ValueType >::ValueMatrix |
using | GradMatrix = OrbitalSetTraits< ValueType >::GradMatrix |
using | HessType = OrbitalSetTraits< ValueType >::HessType |
using | HessVector = OrbitalSetTraits< ValueType >::HessVector |
using | LogValue = std::complex< QTFull::RealType > |
using | PsiValue = QTFull::ValueType |
![]() | |
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 | |
MultiSlaterDetTableMethod (ParticleSet &targetPtcl, std::vector< std::unique_ptr< MultiDiracDeterminant >> &&dets, bool use_pre_computing) | |
constructor More... | |
~MultiSlaterDetTableMethod () override | |
destructor More... | |
std::string | getClassName () const override |
return class name More... | |
bool | isFermionic () const final |
true, if this component is fermionic More... | |
bool | isMultiDet () const final |
true, if this component is multi-determinant 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 | checkInVariablesExclusive (opt_variables_type &active) override |
check in variational parameters to the global list of parameters used by the optimizer. More... | |
void | resetParametersExclusive (const opt_variables_type &active) override |
reset the parameters during optimizations. More... | |
void | buildOptVariables () |
LogValue | evaluate_vgl_impl (const ParticleSet &P, ParticleSet::ParticleGradient &g_tmp, ParticleSet::ParticleLaplacian &l_tmp) |
Compute VGL of this MultiSlaterDetTableMethod. More... | |
LogValue | evaluateLog (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override |
evaluate the value of the WaveFunctionComponent from scratch More... | |
void | calcIndividualDetRatios (Vector< ValueType > &ratios) |
Compute ratios of the individual Slater determinants and the total MSD value. More... | |
const std::vector< ValueType > & | getLinearExpansionCoefs () const |
void | prepareGroup (ParticleSet &P, int ig) override |
Prepare internal data for updating WFC correspond to a particle group It should be called before moving particles of a given group. More... | |
void | mw_prepareGroup (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, int ig) const override |
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_ratioGrad (const RefVectorWithLeader< WaveFunctionComponent > &WFC_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, std::vector< PsiValue > &ratios, std::vector< GradType > &grad_new) const override |
void | mw_calcRatio (const RefVectorWithLeader< WaveFunctionComponent > &WFC_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, std::vector< PsiValue > &ratios) const override |
PsiValue | ratio (ParticleSet &P, int iat) override |
evaluate the ratio of the new to old WaveFunctionComponent value 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 | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) override |
void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
void | acceptMove (ParticleSet &P, int iat, bool safe_to_delay=false) override |
a move for iat-th particle is accepted. More... | |
void | restore (int iat) override |
If a move for iat-th particle is rejected, restore to the content. 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 | 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... | |
std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const override |
make clone More... | |
void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) override |
void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) override |
void | initialize (std::unique_ptr< std::vector< std::vector< size_t >>> C2node_in, std::unique_ptr< std::vector< ValueType >> C_in, std::unique_ptr< opt_variables_type > myVars_in, std::unique_ptr< CSFData > csf_data_in, bool optimizable, bool CI_optimizable) |
initialize a few objects and states by the builder YL: it should be part of the constructor. 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 void | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const |
Register the component with the TWFFastDerivWrapper wrapper. 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 | mw_recompute (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< bool > &recompute) const |
virtual void | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi_all) |
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 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... | |
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 void | completeUpdates () |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. 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... | |
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 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 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 | 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 void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
virtual void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) |
Calculates the derivatives of ![]() | |
virtual void | finalizeOptimization () |
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 | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) |
evaluate ratios to evaluate the non-local PP 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... | |
virtual void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) |
evaluate ratios to evaluate the non-local PP More... | |
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... | |
![]() | |
OptimizableObject (const std::string &name) | |
const std::string & | getName () const |
bool | isOptimized () const |
virtual void | reportStatus (std::ostream &os) |
print the state, e.g., optimizables More... | |
void | setOptimization (bool state) |
virtual void | writeVariationalParameters (hdf_archive &hout) |
Write the variational parameters for this object to the VP HDF file. More... | |
virtual void | readVariationalParameters (hdf_archive &hin) |
Read the variational parameters for this object from the VP HDF file. More... | |
Public Attributes | |
NewTimer & | RatioTimer |
NewTimer & | offload_timer |
NewTimer & | EvalGradTimer |
NewTimer & | RatioGradTimer |
NewTimer & | PrepareGroupTimer |
NewTimer & | UpdateTimer |
NewTimer & | AccRejTimer |
NewTimer & | EvaluateTimer |
![]() | |
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 |
PsiValue | evalGrad_impl (ParticleSet &P, int iat, bool newpos, GradType &g_at) |
an implementation shared by evalGrad and ratioGrad. More... | |
PsiValue | evalGrad_impl_no_precompute (ParticleSet &P, int iat, bool newpos, GradType &g_at) |
an implementation shared by evalGrad and ratioGrad. More... | |
PsiValue | evalGradWithSpin_impl (ParticleSet &P, int iat, bool newpos, GradType &g_at, ComplexType &sg_at) |
PsiValue | evalGradWithSpin_impl_no_precompute (ParticleSet &P, int iat, bool newpos, GradType &g_at, ComplexType &sg_at) |
PsiValue | computeRatio_NewMultiDet_to_NewRefDet (int det_id) const |
void | precomputeC_otherDs (const ParticleSet &P, int ig) |
precompute C_otherDs for a given particle group More... | |
void | evaluateMultiDiracDeterminantDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) |
void | evaluateMultiDiracDeterminantDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) |
void | evaluateDerivativesMSD (Vector< ValueType > &dlogpsi, std::optional< std::pair< unsigned, PsiValue >> move=std::nullopt) const |
compute parameter derivatives of CI/CSF coefficients More... | |
RefVectorWithLeader< MultiDiracDeterminant > | extract_DetRef_list (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, int det_id) const |
Static Private Member Functions | |
static void | mw_evalGrad_impl (const RefVectorWithLeader< WaveFunctionComponent > &WFC_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, bool newpos, std::vector< GradType > &grad_now, std::vector< PsiValue > &psi_list) |
multi walker version of evalGrad_impl More... | |
Private Attributes | |
std::vector< std::unique_ptr< MultiDiracDeterminant > > | Dets |
determinant collection More... | |
std::shared_ptr< std::vector< std::vector< size_t > > > | C2node |
map determinant in linear combination to unique det list map global det id to unique det id. More... | |
std::shared_ptr< std::vector< ValueType > > | C |
CI coefficients. More... | |
bool | CI_Optimizable |
if true, the CI coefficients are optimized More... | |
std::shared_ptr< opt_variables_type > | myVars |
std::shared_ptr< CSFData > | csf_data_ |
CSF data set. If nullptr, not using CSF. More... | |
std::vector< int > | Last |
the last particle of each group More... | |
const bool | use_pre_computing_ |
use pre-compute (fast) algorithm More... | |
PsiValue | psi_ratio_to_ref_det_ |
current psi over ref single det More... | |
PsiValue | new_psi_ratio_to_new_ref_det_ |
new psi over new ref single det when one particle is moved More... | |
size_t | ActiveSpin |
PsiValue | curRatio |
std::vector< OffloadVector< ValueType > > | C_otherDs |
C_n x D^1_n x D^2_n ... D^3_n with one D removed. Summed by group. [spin, unique det id]. More... | |
ParticleSet::ParticleGradient | myG |
ParticleSet::ParticleGradient | myG_temp |
ParticleSet::ParticleLaplacian | myL |
ParticleSet::ParticleLaplacian | myL_temp |
std::vector< ValueVector > | laplSum |
ParticleSet::ParticleGradient | gmPG |
std::vector< Matrix< RealType > > | dpsia |
std::vector< Matrix< RealType > > | dLa |
std::vector< Array< GradType, OHMMS_DIM > > | dGa |
ResourceHandle< MultiSlaterDetTableMethodMultiWalkerResource > | mw_res_handle_ |
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 86 of file MultiSlaterDetTableMethod.h.
using GGGType = TinyVector<HessType, OHMMS_DIM> |
Definition at line 84 of file MultiSlaterDetTableMethod.h.
Definition at line 85 of file MultiSlaterDetTableMethod.h.
using GradVector = OrbitalSetTraits<ValueType>::GradVector |
Definition at line 79 of file MultiSlaterDetTableMethod.h.
Definition at line 83 of file MultiSlaterDetTableMethod.h.
using HessMatrix = OrbitalSetTraits<ValueType>::HessMatrix |
Definition at line 80 of file MultiSlaterDetTableMethod.h.
using HessType = OrbitalSetTraits<ValueType>::HessType |
Definition at line 82 of file MultiSlaterDetTableMethod.h.
using IndexVector = OrbitalSetTraits<ValueType>::IndexVector |
Definition at line 77 of file MultiSlaterDetTableMethod.h.
using OffloadVector = Vector<DT, OffloadPinnedAllocator<DT> > |
Definition at line 74 of file MultiSlaterDetTableMethod.h.
Definition at line 76 of file MultiSlaterDetTableMethod.h.
using ValueMatrix = OrbitalSetTraits<ValueType>::ValueMatrix |
Definition at line 81 of file MultiSlaterDetTableMethod.h.
using ValueVector = OrbitalSetTraits<ValueType>::ValueVector |
Definition at line 78 of file MultiSlaterDetTableMethod.h.
using Walker_t = ParticleSet::Walker_t |
Definition at line 87 of file MultiSlaterDetTableMethod.h.
MultiSlaterDetTableMethod | ( | ParticleSet & | targetPtcl, |
std::vector< std::unique_ptr< MultiDiracDeterminant >> && | dets, | ||
bool | use_pre_computing | ||
) |
constructor
Definition at line 42 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C_otherDs, MultiSlaterDetTableMethod::Dets, ParticleSet::getTotalNum(), ParticleSet::groups(), MultiSlaterDetTableMethod::Last, ParticleSet::last(), MultiSlaterDetTableMethod::myG, MultiSlaterDetTableMethod::myG_temp, MultiSlaterDetTableMethod::myL, MultiSlaterDetTableMethod::myL_temp, and Vector< T, Alloc >::resize().
|
overridedefault |
destructor
|
overridevirtual |
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 651 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::AccRejTimer, qmcplusplus::convertValueToLog(), MultiSlaterDetTableMethod::curRatio, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::getDetID(), WaveFunctionComponent::log_value_, MultiSlaterDetTableMethod::new_psi_ratio_to_new_ref_det_, and MultiSlaterDetTableMethod::psi_ratio_to_ref_det_.
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from WaveFunctionComponent.
Definition at line 1229 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::extract_DetRef_list(), RefVectorWithLeader< T >::getCastedLeader(), ResourceCollection::lendResource(), and MultiSlaterDetTableMethod::mw_res_handle_.
void buildOptVariables | ( | ) |
Definition at line 1155 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C2node, and MultiSlaterDetTableMethod::Dets.
Compute ratios of the individual Slater determinants and the total MSD value.
.
Definition at line 1005 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::csf_data_, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, and Vector< T, Alloc >::resize().
Referenced by SelfHealingOverlap::accumulate(), and SelfHealingOverlapLegacy::evaluate().
|
overridevirtual |
check in variational parameters to the global list of parameters used by the optimizer.
active | a super set of optimizable variables |
The existing checkInVariables implementation in WFC/SPO/.. are inclusive and it calls checkInVariables of its members class A: public SPOSet {} class B: public WFC { A objA; checkInVariables() { objA.checkInVariables(); } };
With OptimizableObject, class A: public OptimizableObject {} class B: public OptimizableObject { A objA; checkInVariablesExclusive() { // should not call objA.checkInVariablesExclusive() if objA has been extracted; } }; A vector of OptimizableObject, will be created by calling extractOptimizableObjects(). All the checkInVariablesExclusive() will be called through this vector and thus checkInVariablesExclusive implementation should only handle non-OptimizableObject members.
Implements OptimizableObject.
Definition at line 739 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::CI_Optimizable, VariableSet::insertFrom(), and MultiSlaterDetTableMethod::myVars.
|
overridevirtual |
check out variational optimizable variables
active | a super set of optimizable variables |
Reimplemented from WaveFunctionComponent.
Definition at line 748 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::CI_Optimizable, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::isOptimizable(), and MultiSlaterDetTableMethod::myVars.
|
private |
Definition at line 515 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::C_otherDs, MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::use_pre_computing_.
Referenced by MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::evaluateRatios(), and MultiSlaterDetTableMethod::ratio().
|
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 723 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::Dets, PooledMemory< T_scalar, Alloc >::get(), WaveFunctionComponent::log_value_, and MultiSlaterDetTableMethod::psi_ratio_to_ref_det_.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 1222 of file MultiSlaterDetTableMethod.cpp.
References ResourceCollection::addResource(), qmcplusplus::det(), and MultiSlaterDetTableMethod::Dets.
|
overridevirtual |
return the current gradient for the iat-th particle
P | quantum particle set |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 385 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::evalGrad_impl(), MultiSlaterDetTableMethod::evalGrad_impl_no_precompute(), MultiSlaterDetTableMethod::EvalGradTimer, and MultiSlaterDetTableMethod::use_pre_computing_.
|
private |
an implementation shared by evalGrad and ratioGrad.
Use precomputed data
newpos | to distinguish evalGrad(false) ratioGrad(true) |
Definition at line 174 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C_otherDs, MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::getDetID().
Referenced by MultiSlaterDetTableMethod::evalGrad(), and MultiSlaterDetTableMethod::ratioGrad().
|
private |
an implementation shared by evalGrad and ratioGrad.
No use of precomputed data
newpos | to distinguish evalGrad(false) ratioGrad(true) |
Definition at line 315 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::getDetID().
Referenced by MultiSlaterDetTableMethod::evalGrad(), and MultiSlaterDetTableMethod::ratioGrad().
|
overridevirtual |
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 398 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::EvalGradTimer, MultiSlaterDetTableMethod::evalGradWithSpin_impl(), MultiSlaterDetTableMethod::evalGradWithSpin_impl_no_precompute(), and MultiSlaterDetTableMethod::use_pre_computing_.
|
private |
Definition at line 204 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C_otherDs, MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::getDetID().
Referenced by MultiSlaterDetTableMethod::evalGradWithSpin(), and MultiSlaterDetTableMethod::ratioGradWithSpin().
|
private |
Definition at line 348 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::getDetID().
Referenced by MultiSlaterDetTableMethod::evalGradWithSpin(), and MultiSlaterDetTableMethod::ratioGradWithSpin().
WaveFunctionComponent::LogValue evaluate_vgl_impl | ( | const ParticleSet & | P, |
ParticleSet::ParticleGradient & | g_tmp, | ||
ParticleSet::ParticleLaplacian & | l_tmp | ||
) |
Compute VGL of this MultiSlaterDetTableMethod.
THis is introduced to remove redundant code in
Definition at line 111 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C_otherDs, qmcplusplus::convertValueToLog(), BLAS::czero, MultiSlaterDetTableMethod::Dets, qmcplusplus::n, MultiSlaterDetTableMethod::precomputeC_otherDs(), and MultiSlaterDetTableMethod::psi_ratio_to_ref_det_.
Referenced by MultiSlaterDetTableMethod::evaluateLog(), and MultiSlaterDetTableMethod::updateBuffer().
|
override |
Definition at line 802 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::C_otherDs, MultiSlaterDetTableMethod::CI_Optimizable, MultiSlaterDetTableMethod::csf_data_, MultiSlaterDetTableMethod::Dets, qmcplusplus::dot(), MultiSlaterDetTableMethod::evaluateDerivativesWF(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivatives(), ParticleSet::G, ParticleSet::getTotalNum(), MultiSlaterDetTableMethod::laplSum, MultiSlaterDetTableMethod::myG_temp, MultiSlaterDetTableMethod::myVars, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, and VariableSet::recompute().
|
private |
compute parameter derivatives of CI/CSF coefficients
dlogpsi | saved derivatives |
move | when one electron virtual move was proposed, pass the determinant group of the moved electron and the ratio of multideterminant and the reference single determinant |
Definition at line 1030 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::csf_data_, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, and Vector< T, Alloc >::resize().
Referenced by MultiSlaterDetTableMethod::evaluateDerivativesWF(), and MultiSlaterDetTableMethod::evaluateDerivRatios().
|
override |
Definition at line 969 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::CI_Optimizable, MultiSlaterDetTableMethod::csf_data_, MultiSlaterDetTableMethod::evaluateDerivativesMSD(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivativesWF(), MultiSlaterDetTableMethod::myVars, VariableSet::recompute(), and Vector< T, Alloc >::size().
Referenced by MultiSlaterDetTableMethod::evaluateDerivatives().
|
override |
Definition at line 1073 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::CI_Optimizable, MultiSlaterDetTableMethod::computeRatio_NewMultiDet_to_NewRefDet(), MultiSlaterDetTableMethod::csf_data_, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::evaluateDerivativesMSD(), MultiSlaterDetTableMethod::getDetID(), VirtualParticleSet::getTotalNum(), MultiSlaterDetTableMethod::myVars, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, VariableSet::recompute(), VirtualParticleSet::refPtcl, and Vector< T, Alloc >::size().
|
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 143 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::Dets, qmcplusplus::dot(), MultiSlaterDetTableMethod::evaluate_vgl_impl(), MultiSlaterDetTableMethod::EvaluateTimer, ParticleSet::isSpinor(), WaveFunctionComponent::log_value_, MultiSlaterDetTableMethod::myG, MultiSlaterDetTableMethod::myL, and Vector< T, Alloc >::size().
|
private |
Definition at line 939 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::C2node, qmcplusplus::det(), MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::psi_ratio_to_ref_det_.
Referenced by MultiSlaterDetTableMethod::evaluateDerivatives().
|
private |
Definition at line 1126 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::C2node, qmcplusplus::det(), MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::psi_ratio_to_ref_det_.
Referenced by MultiSlaterDetTableMethod::evaluateDerivativesWF().
|
override |
Definition at line 633 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::computeRatio_NewMultiDet_to_NewRefDet(), MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::getDetID(), VirtualParticleSet::getTotalNum(), MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, MultiSlaterDetTableMethod::RatioTimer, and VirtualParticleSet::refPtcl.
|
inlineoverride |
Definition at line 160 of file MultiSlaterDetTableMethod.h.
|
inlineprivate |
Definition at line 321 of file MultiSlaterDetTableMethod.h.
References MultiSlaterDetTableMethod::Dets, and RefVectorWithLeader< T >::getCastedLeader().
Referenced by MultiSlaterDetTableMethod::acquireResource(), MultiSlaterDetTableMethod::mw_accept_rejectMove(), and MultiSlaterDetTableMethod::releaseResource().
|
overridevirtual |
extract underlying OptimizableObject references
opt_obj_refs | aggregated list of optimizable object references |
Reimplemented from WaveFunctionComponent.
Definition at line 732 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::Dets, and UniqueOptObjRefs::push_back().
|
inlineoverridevirtual |
return class name
Implements WaveFunctionComponent.
Definition at line 98 of file MultiSlaterDetTableMethod.h.
|
inlineprivate |
Definition at line 214 of file MultiSlaterDetTableMethod.h.
References MultiSlaterDetTableMethod::Last.
Referenced by MultiSlaterDetTableMethod::acceptMove(), MultiSlaterDetTableMethod::evalGrad_impl(), MultiSlaterDetTableMethod::evalGrad_impl_no_precompute(), MultiSlaterDetTableMethod::evalGradWithSpin_impl(), MultiSlaterDetTableMethod::evalGradWithSpin_impl_no_precompute(), MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::evaluateRatios(), MultiSlaterDetTableMethod::mw_accept_rejectMove(), MultiSlaterDetTableMethod::mw_calcRatio(), MultiSlaterDetTableMethod::mw_evalGrad_impl(), MultiSlaterDetTableMethod::mw_ratioGrad(), MultiSlaterDetTableMethod::ratio(), MultiSlaterDetTableMethod::ratioGrad(), MultiSlaterDetTableMethod::ratioGradWithSpin(), and MultiSlaterDetTableMethod::restore().
const std::vector< WaveFunctionComponent::ValueType > & getLinearExpansionCoefs | ( | ) | const |
Definition at line 1022 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, and MultiSlaterDetTableMethod::csf_data_.
Referenced by SelfHealingOverlap::SelfHealingOverlap(), and SelfHealingOverlapLegacy::SelfHealingOverlapLegacy().
void initialize | ( | std::unique_ptr< std::vector< std::vector< size_t >>> | C2node_in, |
std::unique_ptr< std::vector< ValueType >> | C_in, | ||
std::unique_ptr< opt_variables_type > | myVars_in, | ||
std::unique_ptr< CSFData > | csf_data_in, | ||
bool | optimizable, | ||
bool | CI_optimizable | ||
) |
initialize a few objects and states by the builder YL: it should be part of the constructor.
It cannot be added to the constructor because the constructor is used by makeClone. The right way of fix needs:
Definition at line 70 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::C2node, MultiSlaterDetTableMethod::CI_Optimizable, MultiSlaterDetTableMethod::csf_data_, and MultiSlaterDetTableMethod::myVars.
|
inlinefinalvirtual |
true, if this component is fermionic
Reimplemented from WaveFunctionComponent.
Definition at line 99 of file MultiSlaterDetTableMethod.h.
|
inlinefinalvirtual |
true, if this component is multi-determinant
Reimplemented from WaveFunctionComponent.
Definition at line 100 of file MultiSlaterDetTableMethod.h.
|
inlineoverridevirtual |
if true, this contains optimizable components
Reimplemented from WaveFunctionComponent.
Definition at line 101 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::checkOutVariables().
|
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 86 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::C2node, MultiSlaterDetTableMethod::CI_Optimizable, qmcplusplus::clone, MultiSlaterDetTableMethod::csf_data_, qmcplusplus::det(), MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::myVars, and MultiSlaterDetTableMethod::use_pre_computing_.
|
overridevirtual |
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 671 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::AccRejTimer, qmcplusplus::convertValueToLog(), qmcplusplus::det(), MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::extract_DetRef_list(), RefVectorWithLeader< T >::getCastedElement(), and MultiSlaterDetTableMethod::getDetID().
|
override |
Definition at line 564 of file MultiSlaterDetTableMethod.cpp.
References qmcplusplus::det(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), MultiSlaterDetTableMethod::getDetID(), WaveFunctionComponent::mw_calcRatio(), WaveFunctionComponent::ORB_PBYP_RATIO, and MultiSlaterDetTableMethod::use_pre_computing_.
|
overridevirtual |
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 416 of file MultiSlaterDetTableMethod.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), WaveFunctionComponent::mw_evalGrad(), MultiSlaterDetTableMethod::mw_evalGrad_impl(), and MultiSlaterDetTableMethod::use_pre_computing_.
|
staticprivate |
multi walker version of evalGrad_impl
Definition at line 235 of file MultiSlaterDetTableMethod.cpp.
References qmcplusplus::det(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), and MultiSlaterDetTableMethod::getDetID().
Referenced by MultiSlaterDetTableMethod::mw_evalGrad(), and MultiSlaterDetTableMethod::mw_ratioGrad().
|
overridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 1168 of file MultiSlaterDetTableMethod.cpp.
References qmcplusplus::det(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), and MultiSlaterDetTableMethod::use_pre_computing_.
|
override |
Definition at line 480 of file MultiSlaterDetTableMethod.cpp.
References qmcplusplus::det(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), MultiSlaterDetTableMethod::getDetID(), MultiSlaterDetTableMethod::mw_evalGrad_impl(), WaveFunctionComponent::mw_ratioGrad(), and MultiSlaterDetTableMethod::use_pre_computing_.
|
private |
precompute C_otherDs for a given particle group
P | a particle set |
ig | group id |
Definition at line 1191 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::C_otherDs, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::PrepareGroupTimer, and qmcplusplus::MatrixOperators::product().
Referenced by MultiSlaterDetTableMethod::evaluate_vgl_impl(), and MultiSlaterDetTableMethod::prepareGroup().
|
overridevirtual |
Prepare internal data for updating WFC correspond to a particle group It should be called before moving particles of a given group.
This call can be used to handle the precomputation of data used for moving this group of particle. Such data should be static with respect to the moves of particles within this group. Particle groups usually correspond to determinants of different spins.
P | quantum particle set |
ig | particle group index |
Reimplemented from WaveFunctionComponent.
Definition at line 1161 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::precomputeC_otherDs(), and MultiSlaterDetTableMethod::use_pre_computing_.
|
overridevirtual |
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 549 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::computeRatio_NewMultiDet_to_NewRefDet(), MultiSlaterDetTableMethod::curRatio, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::getDetID(), MultiSlaterDetTableMethod::new_psi_ratio_to_new_ref_det_, WaveFunctionComponent::ORB_PBYP_RATIO, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, MultiSlaterDetTableMethod::RatioTimer, and WaveFunctionComponent::UpdateMode.
|
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 437 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::curRatio, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::evalGrad_impl(), MultiSlaterDetTableMethod::evalGrad_impl_no_precompute(), MultiSlaterDetTableMethod::getDetID(), MultiSlaterDetTableMethod::new_psi_ratio_to_new_ref_det_, WaveFunctionComponent::ORB_PBYP_PARTIAL, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, MultiSlaterDetTableMethod::RatioGradTimer, WaveFunctionComponent::UpdateMode, and MultiSlaterDetTableMethod::use_pre_computing_.
|
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 456 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::curRatio, MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::evalGradWithSpin_impl(), MultiSlaterDetTableMethod::evalGradWithSpin_impl_no_precompute(), MultiSlaterDetTableMethod::getDetID(), MultiSlaterDetTableMethod::new_psi_ratio_to_new_ref_det_, WaveFunctionComponent::ORB_PBYP_PARTIAL, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, MultiSlaterDetTableMethod::RatioGradTimer, WaveFunctionComponent::UpdateMode, and MultiSlaterDetTableMethod::use_pre_computing_.
|
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 693 of file MultiSlaterDetTableMethod.cpp.
References PooledMemory< T_scalar, Alloc >::add(), MultiSlaterDetTableMethod::Dets, WaveFunctionComponent::log_value_, and MultiSlaterDetTableMethod::psi_ratio_to_ref_det_.
|
overridevirtual |
return a shared resource to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 1241 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::Dets, MultiSlaterDetTableMethod::extract_DetRef_list(), RefVectorWithLeader< T >::getCastedLeader(), and ResourceCollection::takebackResource().
|
overridevirtual |
reset the parameters during optimizations.
Exclusive, see checkInVariablesExclusive
Implements OptimizableObject.
Definition at line 758 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::C, MultiSlaterDetTableMethod::CI_Optimizable, MultiSlaterDetTableMethod::csf_data_, and MultiSlaterDetTableMethod::myVars.
|
overridevirtual |
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 664 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::AccRejTimer, MultiSlaterDetTableMethod::curRatio, MultiSlaterDetTableMethod::Dets, and MultiSlaterDetTableMethod::getDetID().
|
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 702 of file MultiSlaterDetTableMethod.cpp.
References MultiSlaterDetTableMethod::Dets, qmcplusplus::dot(), MultiSlaterDetTableMethod::evaluate_vgl_impl(), ParticleSet::G, ParticleSet::L, WaveFunctionComponent::log_value_, MultiSlaterDetTableMethod::myG, MultiSlaterDetTableMethod::myL, MultiSlaterDetTableMethod::psi_ratio_to_ref_det_, PooledMemory< T_scalar, Alloc >::put(), and MultiSlaterDetTableMethod::UpdateTimer.
NewTimer & AccRejTimer |
Definition at line 71 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::acceptMove(), MultiSlaterDetTableMethod::mw_accept_rejectMove(), and MultiSlaterDetTableMethod::restore().
|
private |
Definition at line 301 of file MultiSlaterDetTableMethod.h.
|
private |
CI coefficients.
Definition at line 282 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::calcIndividualDetRatios(), MultiSlaterDetTableMethod::computeRatio_NewMultiDet_to_NewRefDet(), MultiSlaterDetTableMethod::evalGrad_impl_no_precompute(), MultiSlaterDetTableMethod::evalGradWithSpin_impl_no_precompute(), MultiSlaterDetTableMethod::evaluateDerivatives(), MultiSlaterDetTableMethod::evaluateDerivativesMSD(), MultiSlaterDetTableMethod::evaluateDerivativesWF(), MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivatives(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivativesWF(), MultiSlaterDetTableMethod::getLinearExpansionCoefs(), MultiSlaterDetTableMethod::initialize(), MultiSlaterDetTableMethod::makeClone(), MultiSlaterDetTableMethod::precomputeC_otherDs(), and MultiSlaterDetTableMethod::resetParametersExclusive().
|
private |
map determinant in linear combination to unique det list map global det id to unique det id.
[spin, global det id] = unique det id
Definition at line 280 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::buildOptVariables(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivatives(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivativesWF(), MultiSlaterDetTableMethod::initialize(), and MultiSlaterDetTableMethod::makeClone().
|
private |
C_n x D^1_n x D^2_n ... D^3_n with one D removed. Summed by group. [spin, unique det id].
Definition at line 306 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::computeRatio_NewMultiDet_to_NewRefDet(), MultiSlaterDetTableMethod::evalGrad_impl(), MultiSlaterDetTableMethod::evalGradWithSpin_impl(), MultiSlaterDetTableMethod::evaluate_vgl_impl(), MultiSlaterDetTableMethod::evaluateDerivatives(), MultiSlaterDetTableMethod::MultiSlaterDetTableMethod(), and MultiSlaterDetTableMethod::precomputeC_otherDs().
|
private |
if true, the CI coefficients are optimized
Definition at line 284 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::checkInVariablesExclusive(), MultiSlaterDetTableMethod::checkOutVariables(), MultiSlaterDetTableMethod::evaluateDerivatives(), MultiSlaterDetTableMethod::evaluateDerivativesWF(), MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::initialize(), MultiSlaterDetTableMethod::makeClone(), and MultiSlaterDetTableMethod::resetParametersExclusive().
|
private |
CSF data set. If nullptr, not using CSF.
Definition at line 289 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::calcIndividualDetRatios(), MultiSlaterDetTableMethod::evaluateDerivatives(), MultiSlaterDetTableMethod::evaluateDerivativesMSD(), MultiSlaterDetTableMethod::evaluateDerivativesWF(), MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::getLinearExpansionCoefs(), MultiSlaterDetTableMethod::initialize(), MultiSlaterDetTableMethod::makeClone(), and MultiSlaterDetTableMethod::resetParametersExclusive().
|
private |
Definition at line 302 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::acceptMove(), MultiSlaterDetTableMethod::ratio(), MultiSlaterDetTableMethod::ratioGrad(), MultiSlaterDetTableMethod::ratioGradWithSpin(), and MultiSlaterDetTableMethod::restore().
|
private |
determinant collection
Definition at line 275 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::acceptMove(), MultiSlaterDetTableMethod::acquireResource(), MultiSlaterDetTableMethod::buildOptVariables(), MultiSlaterDetTableMethod::calcIndividualDetRatios(), MultiSlaterDetTableMethod::checkOutVariables(), MultiSlaterDetTableMethod::computeRatio_NewMultiDet_to_NewRefDet(), MultiSlaterDetTableMethod::copyFromBuffer(), MultiSlaterDetTableMethod::createResource(), MultiSlaterDetTableMethod::evalGrad_impl(), MultiSlaterDetTableMethod::evalGrad_impl_no_precompute(), MultiSlaterDetTableMethod::evalGradWithSpin_impl(), MultiSlaterDetTableMethod::evalGradWithSpin_impl_no_precompute(), MultiSlaterDetTableMethod::evaluate_vgl_impl(), MultiSlaterDetTableMethod::evaluateDerivatives(), MultiSlaterDetTableMethod::evaluateDerivativesMSD(), MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::evaluateLog(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivatives(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivativesWF(), MultiSlaterDetTableMethod::evaluateRatios(), MultiSlaterDetTableMethod::extract_DetRef_list(), MultiSlaterDetTableMethod::extractOptimizableObjectRefs(), MultiSlaterDetTableMethod::makeClone(), MultiSlaterDetTableMethod::MultiSlaterDetTableMethod(), MultiSlaterDetTableMethod::mw_accept_rejectMove(), MultiSlaterDetTableMethod::precomputeC_otherDs(), MultiSlaterDetTableMethod::ratio(), MultiSlaterDetTableMethod::ratioGrad(), MultiSlaterDetTableMethod::ratioGradWithSpin(), MultiSlaterDetTableMethod::registerData(), MultiSlaterDetTableMethod::releaseResource(), MultiSlaterDetTableMethod::restore(), and MultiSlaterDetTableMethod::updateBuffer().
Definition at line 315 of file MultiSlaterDetTableMethod.h.
Definition at line 314 of file MultiSlaterDetTableMethod.h.
Definition at line 314 of file MultiSlaterDetTableMethod.h.
NewTimer& EvalGradTimer |
Definition at line 70 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::evalGrad(), and MultiSlaterDetTableMethod::evalGradWithSpin().
NewTimer & EvaluateTimer |
Definition at line 71 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::evaluateLog().
|
private |
Definition at line 313 of file MultiSlaterDetTableMethod.h.
|
private |
Definition at line 310 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::evaluateDerivatives().
|
private |
the last particle of each group
Definition at line 292 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::getDetID(), and MultiSlaterDetTableMethod::MultiSlaterDetTableMethod().
|
private |
Definition at line 317 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::acquireResource().
|
private |
Definition at line 308 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::evaluateLog(), MultiSlaterDetTableMethod::MultiSlaterDetTableMethod(), and MultiSlaterDetTableMethod::updateBuffer().
|
private |
Definition at line 308 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::evaluateDerivatives(), and MultiSlaterDetTableMethod::MultiSlaterDetTableMethod().
|
private |
Definition at line 309 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::evaluateLog(), MultiSlaterDetTableMethod::MultiSlaterDetTableMethod(), and MultiSlaterDetTableMethod::updateBuffer().
|
private |
Definition at line 309 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::MultiSlaterDetTableMethod().
|
private |
Definition at line 286 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::checkInVariablesExclusive(), MultiSlaterDetTableMethod::checkOutVariables(), MultiSlaterDetTableMethod::evaluateDerivatives(), MultiSlaterDetTableMethod::evaluateDerivativesWF(), MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::initialize(), MultiSlaterDetTableMethod::makeClone(), and MultiSlaterDetTableMethod::resetParametersExclusive().
|
private |
new psi over new ref single det when one particle is moved
Definition at line 299 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::acceptMove(), MultiSlaterDetTableMethod::ratio(), MultiSlaterDetTableMethod::ratioGrad(), and MultiSlaterDetTableMethod::ratioGradWithSpin().
NewTimer & offload_timer |
Definition at line 69 of file MultiSlaterDetTableMethod.h.
NewTimer& PrepareGroupTimer |
Definition at line 71 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::precomputeC_otherDs().
|
private |
current psi over ref single det
Definition at line 297 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::acceptMove(), MultiSlaterDetTableMethod::calcIndividualDetRatios(), MultiSlaterDetTableMethod::copyFromBuffer(), MultiSlaterDetTableMethod::evaluate_vgl_impl(), MultiSlaterDetTableMethod::evaluateDerivatives(), MultiSlaterDetTableMethod::evaluateDerivativesMSD(), MultiSlaterDetTableMethod::evaluateDerivRatios(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivatives(), MultiSlaterDetTableMethod::evaluateMultiDiracDeterminantDerivativesWF(), MultiSlaterDetTableMethod::evaluateRatios(), MultiSlaterDetTableMethod::ratio(), MultiSlaterDetTableMethod::ratioGrad(), MultiSlaterDetTableMethod::ratioGradWithSpin(), MultiSlaterDetTableMethod::registerData(), and MultiSlaterDetTableMethod::updateBuffer().
NewTimer & RatioGradTimer |
Definition at line 70 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::ratioGrad(), and MultiSlaterDetTableMethod::ratioGradWithSpin().
NewTimer& RatioTimer |
Definition at line 69 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::evaluateRatios(), and MultiSlaterDetTableMethod::ratio().
NewTimer & UpdateTimer |
Definition at line 71 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::updateBuffer().
|
private |
use pre-compute (fast) algorithm
Definition at line 294 of file MultiSlaterDetTableMethod.h.
Referenced by MultiSlaterDetTableMethod::computeRatio_NewMultiDet_to_NewRefDet(), MultiSlaterDetTableMethod::evalGrad(), MultiSlaterDetTableMethod::evalGradWithSpin(), MultiSlaterDetTableMethod::makeClone(), MultiSlaterDetTableMethod::mw_calcRatio(), MultiSlaterDetTableMethod::mw_evalGrad(), MultiSlaterDetTableMethod::mw_prepareGroup(), MultiSlaterDetTableMethod::mw_ratioGrad(), MultiSlaterDetTableMethod::prepareGroup(), MultiSlaterDetTableMethod::ratioGrad(), and MultiSlaterDetTableMethod::ratioGradWithSpin().
class qmcplusplus::J1OrbitalSoA |
Specialization for one-body Jastrow function using multiple functors.
Definition at line 46 of file J1OrbitalSoA.h.
Public Member Functions | |
J1OrbitalSoA (const std::string &obj_name, const ParticleSet &ions, ParticleSet &els, bool use_offload) | |
J1OrbitalSoA (const J1OrbitalSoA &rhs)=delete | |
~J1OrbitalSoA () | |
std::string | getClassName () const override |
return class name More... | |
void | initialize (const ParticleSet &els) |
void | addFunc (int source_type, std::unique_ptr< FT > afunc, int target_type=-1) |
void | checkSanity () const override |
Validate the internal consistency of the object. More... | |
const auto & | getFunctors () const |
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 | recompute (const ParticleSet &P) override |
recompute the value of the WaveFunctionComponents which require critical accuracy. More... | |
LogValue | evaluateLog (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override |
evaluate the value of the WaveFunctionComponent from scratch More... | |
void | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi) override |
PsiValue | ratio (ParticleSet &P, int iat) override |
evaluate the ratio of the new to old WaveFunctionComponent value More... | |
void | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) override |
void | mw_evaluateRatios (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, std::vector< std::vector< ValueType >> &ratios) const override |
void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi) override |
void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
GradType | evalGrad (ParticleSet &P, int iat) override |
compute the gradient during particle-by-particle update More... | |
PsiValue | ratioGrad (ParticleSet &P, int iat, GradType &grad_iat) override |
compute the gradient during particle-by-particle update More... | |
void | restore (int iat) override |
Rejected move. More... | |
void | acceptMove (ParticleSet &P, int iat, bool safe_to_delay=false) override |
Accpted move. 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... | |
std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const override |
make clone More... | |
void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) override |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int isrc) override |
return the logarithmic gradient for the iat-th particle of the source particleset More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int isrc, TinyVector< ParticleSet::ParticleGradient, OHMMS_DIM > &grad_grad, TinyVector< ParticleSet::ParticleLaplacian, OHMMS_DIM > &lapl_grad) override |
Adds the gradient w.r.t. More... | |
bool | isOptimizable () const override |
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... | |
![]() | |
const LogValue & | get_log_value () const |
WaveFunctionComponent (const std::string &obj_name="") | |
default constructor More... | |
virtual | ~WaveFunctionComponent () |
default destructor More... | |
const std::string & | getName () const |
return object name More... | |
PsiValue | getValue () const |
assembles the full value More... | |
virtual bool | isFermionic () const |
true, if this component is fermionic More... | |
virtual bool | isMultiDet () const |
true, if this component is multi-determinant More... | |
virtual void | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const |
Register the component with the TWFFastDerivWrapper wrapper. 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 |
virtual GradType | evalGradWithSpin (ParticleSet &P, int iat, ComplexType &spingrad) |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. 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... | |
virtual PsiValue | ratioGradWithSpin (ParticleSet &P, int iat, GradType &grad_iat, ComplexType &spingrad_iat) |
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... | |
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 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 | completeUpdates () |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. 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... | |
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 | 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 void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
virtual void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) |
Calculates the derivatives of ![]() | |
virtual void | finalizeOptimization () |
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 | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) |
evaluate ratios to evaluate the non-local PP 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... | |
virtual void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) |
evaluate ratios to evaluate the non-local PP More... | |
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 Attributes | |
std::vector< std::unique_ptr< FT > > | J1UniqueFunctors |
container for the unique Jastrow functions More... | |
![]() | |
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 Types | |
using | FuncType = FT |
alias FuncType More... | |
using | valT = typename FT::real_type |
type of each component U, dU, d2U; More... | |
using | posT = TinyVector< valT, OHMMS_DIM > |
element position type More... | |
using | DistRow = DistanceTable::DistRow |
use the same container More... | |
using | DisplRow = DistanceTable::DisplRow |
using | GradDerivVec = ParticleAttrib< QTFull::GradType > |
using | ValueDerivVec = ParticleAttrib< QTFull::ValueType > |
Private Member Functions | |
void | resizeWFOptVectors () |
QTFull::RealType | computeGL (ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) const |
compute G and L from internally stored data More... | |
LogValue | evaluateGL (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L, bool fromscratch=false) override |
compute gradients and laplacian of the TWF with respect to each particle. More... | |
valT | accumulateGL (const valT *restrict du, const valT *restrict d2u, const DisplRow &displ, posT &grad) const |
compute gradient and lap More... | |
valT | computeU (const DistRow &dist) |
void | computeU3 (const ParticleSet &P, int iat, const DistRow &dist) |
compute U, dU and d2U More... | |
Private Attributes | |
const bool | use_offload_ |
if true use offload More... | |
const int | myTableID |
table index More... | |
const int | Nions |
number of ions More... | |
const int | Nelec |
number of electrons More... | |
const int | NumGroups |
number of ion groups More... | |
const ParticleSet & | Ions |
reference to the sources (ions) More... | |
Vector< int, OffloadPinnedAllocator< int > > | grp_ids |
the group_id of each particle More... | |
opt_variables_type | myVars |
variables handled by this orbital More... | |
valT | curAt |
valT | curLap |
posT | curGrad |
Vector< valT > | Vat |
![]() | |
aligned_vector< valT > | U |
aligned_vector< valT > | dU |
aligned_vector< valT > | d2U |
aligned_vector< valT > | d3U |
aligned_vector< valT > | DistCompressed |
aligned_vector< int > | DistIndice |
Vector< posT > | Grad |
Vector< valT > | Lap |
std::vector< FT * > | J1Functors |
Container for ![]() | |
std::vector< FT * > | GroupFunctors |
functor for each ion group Conceptually, this is different from unique functions. More... | |
std::vector< std::pair< int, int > > | OffSet |
Vector< RealType > | dLogPsi |
std::vector< GradDerivVec > | gradLogPsi |
std::vector< ValueDerivVec > | lapLogPsi |
ResourceHandle< J1OrbitalSoAMultiWalkerMem< RealType > > | mw_mem_handle_ |
|
private |
Definition at line 56 of file J1OrbitalSoA.h.
|
private |
use the same container
Definition at line 55 of file J1OrbitalSoA.h.
|
private |
alias FuncType
Definition at line 49 of file J1OrbitalSoA.h.
|
private |
Definition at line 58 of file J1OrbitalSoA.h.
|
private |
element position type
Definition at line 53 of file J1OrbitalSoA.h.
|
private |
type of each component U, dU, d2U;
Definition at line 51 of file J1OrbitalSoA.h.
|
private |
Definition at line 59 of file J1OrbitalSoA.h.
J1OrbitalSoA | ( | const std::string & | obj_name, |
const ParticleSet & | ions, | ||
ParticleSet & | els, | ||
bool | use_offload | ||
) |
Definition at line 48 of file J1OrbitalSoA.cpp.
References qmcplusplus::ALL_OFF, qmcplusplus::DC_POS_OFFLOAD, ParticleSet::first(), ParticleSet::getCoordinates(), DynamicCoordinates::getKind(), J1OrbitalSoA< FT >::grp_ids, J1OrbitalSoA< FT >::initialize(), ParticleSet::last(), WaveFunctionComponent::my_name_, qmcplusplus::NEED_VP_FULL_TABLE_ON_HOST, J1OrbitalSoA< FT >::Nions, J1OrbitalSoA< FT >::NumGroups, and J1OrbitalSoA< FT >::use_offload_.
|
delete |
|
default |
|
inlineoverridevirtual |
Accpted move.
Update Vat[iat],Grad[iat] and Lap[iat]
Implements WaveFunctionComponent.
Definition at line 458 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::accumulateGL(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::curAt, J1OrbitalSoA< FT >::curGrad, J1OrbitalSoA< FT >::curLap, J1OrbitalSoA< FT >::d2U, J1OrbitalSoA< FT >::dU, ParticleSet::getDistTableAB(), DistanceTableAB::getTempDispls(), DistanceTableAB::getTempDists(), J1OrbitalSoA< FT >::Grad, J1OrbitalSoA< FT >::Lap, WaveFunctionComponent::log_value_, J1OrbitalSoA< FT >::myTableID, WaveFunctionComponent::ORB_PBYP_RATIO, WaveFunctionComponent::UpdateMode, and J1OrbitalSoA< FT >::Vat.
|
inlineprivate |
compute gradient and lap
Definition at line 136 of file J1OrbitalSoA.h.
References VectorSoaContainer< T, D, Alloc >::data(), J1OrbitalSoA< FT >::Nions, OHMMS_DIM, and qmcplusplus::Units::time::s.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::ratioGrad(), and J1OrbitalSoA< FT >::recompute().
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from WaveFunctionComponent.
Definition at line 94 of file J1OrbitalSoA.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), ResourceCollection::lendResource(), and J1OrbitalSoA< FT >::mw_mem_handle_.
|
inline |
Definition at line 219 of file J1OrbitalSoA.h.
References ParticleSet::getGroupID(), J1OrbitalSoA< FT >::GroupFunctors, J1OrbitalSoA< FT >::Ions, J1OrbitalSoA< FT >::J1Functors, and J1OrbitalSoA< FT >::J1UniqueFunctors.
|
inlineoverridevirtual |
check out variational optimizable variables
active | a super set of optimizable variables |
Reimplemented from WaveFunctionComponent.
Definition at line 533 of file J1OrbitalSoA.h.
References VariableSet::clear(), VariableSet::getIndex(), VariableSet::Index, VariableSet::insertFrom(), J1OrbitalSoA< FT >::J1Functors, J1OrbitalSoA< FT >::J1UniqueFunctors, J1OrbitalSoA< FT >::myVars, qmcplusplus::n, J1OrbitalSoA< FT >::OffSet, and VariableSet::size().
|
overridevirtual |
Validate the internal consistency of the object.
Reimplemented from WaveFunctionComponent.
Definition at line 79 of file J1OrbitalSoA.cpp.
References qmcplusplus::app_warning().
|
inlineprivate |
compute G and L from internally stored data
Definition at line 115 of file J1OrbitalSoA.h.
References qmcplusplus::simd::accumulate_n(), Vector< T, Alloc >::data(), J1OrbitalSoA< FT >::Grad, J1OrbitalSoA< FT >::Lap, J1OrbitalSoA< FT >::Nelec, and J1OrbitalSoA< FT >::Vat.
Referenced by J1OrbitalSoA< FT >::evaluateGL(), J1OrbitalSoA< FT >::evaluateLog(), and J1OrbitalSoA< FT >::updateBuffer().
Definition at line 155 of file J1OrbitalSoA.h.
References Vector< T, Alloc >::data(), J1OrbitalSoA< FT >::DistCompressed, ParticleSet::first(), J1OrbitalSoA< FT >::Ions, J1OrbitalSoA< FT >::J1UniqueFunctors, ParticleSet::last(), and J1OrbitalSoA< FT >::NumGroups.
Referenced by J1OrbitalSoA< FT >::evaluateRatios(), and J1OrbitalSoA< FT >::ratio().
|
inlineprivate |
compute U, dU and d2U
P | quantum particleset |
iat | the moving particle |
dist | starting address of the distances of the ions wrt the iat-th particle |
Definition at line 172 of file J1OrbitalSoA.h.
References BLAS::czero, J1OrbitalSoA< FT >::d2U, Vector< T, Alloc >::data(), J1OrbitalSoA< FT >::DistCompressed, J1OrbitalSoA< FT >::DistIndice, J1OrbitalSoA< FT >::dU, OMPstd::fill_n(), ParticleSet::first(), J1OrbitalSoA< FT >::Ions, J1OrbitalSoA< FT >::J1UniqueFunctors, ParticleSet::last(), J1OrbitalSoA< FT >::Nions, J1OrbitalSoA< FT >::NumGroups, and J1OrbitalSoA< FT >::U.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::ratioGrad(), and J1OrbitalSoA< FT >::recompute().
|
inlineoverridevirtual |
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 500 of file J1OrbitalSoA.h.
References Vector< T, Alloc >::attachReference(), J1OrbitalSoA< FT >::Grad, J1OrbitalSoA< FT >::Lap, PooledMemory< T_scalar, Alloc >::lendReference(), J1OrbitalSoA< FT >::Nelec, and J1OrbitalSoA< FT >::Vat.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 88 of file J1OrbitalSoA.cpp.
References ResourceCollection::addResource().
|
inlineoverridevirtual |
compute the gradient during particle-by-particle update
P | quantum particleset |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 435 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::Grad.
|
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 626 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::d2U, J1OrbitalSoA< FT >::d3U, J1OrbitalSoA< FT >::dU, ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), J1OrbitalSoA< FT >::J1UniqueFunctors, J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::Nelec, and J1OrbitalSoA< FT >::U.
|
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 648 of file J1OrbitalSoA.h.
References APP_ABORT, J1OrbitalSoA< FT >::d2U, J1OrbitalSoA< FT >::d3U, J1OrbitalSoA< FT >::dU, ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), J1OrbitalSoA< FT >::J1UniqueFunctors, J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::Nelec, OHMMS_DIM, and J1OrbitalSoA< FT >::U.
|
inlineoverride |
Definition at line 305 of file J1OrbitalSoA.h.
References qmcplusplus::Dot(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), ParticleSet::G, J1OrbitalSoA< FT >::gradLogPsi, J1OrbitalSoA< FT >::lapLogPsi, J1OrbitalSoA< FT >::myVars, VariableSet::recompute(), VariableSet::size(), qmcplusplus::Sum(), and VariableSet::where().
|
inlineoverride |
Definition at line 337 of file J1OrbitalSoA.h.
References BLAS::cone, J1OrbitalSoA< FT >::dLogPsi, DistanceTableAB::getDisplRow(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), ParticleSet::getTotalNum(), J1OrbitalSoA< FT >::gradLogPsi, J1OrbitalSoA< FT >::J1Functors, J1OrbitalSoA< FT >::lapLogPsi, J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::myVars, qmcplusplus::Units::time::ns, J1OrbitalSoA< FT >::OffSet, OHMMS_DIM, VariableSet::recompute(), J1OrbitalSoA< FT >::resizeWFOptVectors(), qmcplusplus::Units::second, VariableSet::size(), and VariableSet::where().
Referenced by J1OrbitalSoA< FT >::evaluateDerivatives().
|
inlineoverride |
Definition at line 566 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::evaluateRatios(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), VirtualParticleSet::getRefPS(), VirtualParticleSet::getTotalNum(), J1OrbitalSoA< FT >::J1Functors, J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::myVars, qmcplusplus::Units::time::ns, J1OrbitalSoA< FT >::OffSet, VariableSet::recompute(), VirtualParticleSet::refPtcl, qmcplusplus::Units::second, VariableSet::size(), and VariableSet::where().
|
inlineoverrideprivatevirtual |
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 125 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::computeGL(), and WaveFunctionComponent::log_value_.
|
inlineoverridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 259 of file J1OrbitalSoA.h.
References Tensor< T, D >::diagonal(), ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), J1OrbitalSoA< FT >::Ions, J1OrbitalSoA< FT >::J1UniqueFunctors, J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::Nelec, J1OrbitalSoA< FT >::Nions, and qmcplusplus::outerProduct().
|
inlineoverridevirtual |
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 251 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::computeGL(), WaveFunctionComponent::log_value_, and J1OrbitalSoA< FT >::recompute().
|
inlineoverride |
Definition at line 295 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::computeU(), qmcplusplus::exp(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), J1OrbitalSoA< FT >::myTableID, VirtualParticleSet::refPtcl, and J1OrbitalSoA< FT >::Vat.
Referenced by J1OrbitalSoA< FT >::evaluateDerivRatios().
|
inlineoverride |
Definition at line 417 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::curAt, J1OrbitalSoA< FT >::DistCompressed, qmcplusplus::exp(), ParticleSet::first(), ParticleSet::getDistTableAB(), DistanceTableAB::getTempDists(), J1OrbitalSoA< FT >::Ions, J1OrbitalSoA< FT >::J1UniqueFunctors, ParticleSet::last(), J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::Nelec, J1OrbitalSoA< FT >::NumGroups, and J1OrbitalSoA< FT >::Vat.
|
inlineoverridevirtual |
extract underlying OptimizableObject references
opt_obj_refs | aggregated list of optimizable object references |
Reimplemented from WaveFunctionComponent.
Definition at line 526 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::J1UniqueFunctors, and UniqueOptObjRefs::push_back().
|
inlineoverridevirtual |
|
inline |
Definition at line 230 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::J1Functors.
|
inline |
Definition at line 202 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::d2U, J1OrbitalSoA< FT >::d3U, J1OrbitalSoA< FT >::DistCompressed, J1OrbitalSoA< FT >::DistIndice, J1OrbitalSoA< FT >::dU, ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), J1OrbitalSoA< FT >::Grad, J1OrbitalSoA< FT >::GroupFunctors, J1OrbitalSoA< FT >::Ions, J1OrbitalSoA< FT >::J1Functors, J1OrbitalSoA< FT >::J1UniqueFunctors, J1OrbitalSoA< FT >::Lap, J1OrbitalSoA< FT >::Nelec, J1OrbitalSoA< FT >::Nions, J1OrbitalSoA< FT >::NumGroups, Vector< T, Alloc >::resize(), J1OrbitalSoA< FT >::U, and J1OrbitalSoA< FT >::Vat.
Referenced by J1OrbitalSoA< FT >::J1OrbitalSoA().
|
inlineoverridevirtual |
WaveFunctionComponent virtual functions that are not essential for the development
Reimplemented from WaveFunctionComponent.
Definition at line 524 of file J1OrbitalSoA.h.
|
inlineoverridevirtual |
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 507 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::Ions, J1OrbitalSoA< FT >::J1UniqueFunctors, WaveFunctionComponent::my_name_, J1OrbitalSoA< FT >::myVars, qmcplusplus::n, J1OrbitalSoA< FT >::OffSet, and J1OrbitalSoA< FT >::use_offload_.
|
override |
Definition at line 110 of file J1OrbitalSoA.cpp.
References qmcplusplus::exp(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), VirtualParticleSet::getTotalNum(), WaveFunctionComponent::mw_evaluateRatios(), and J1OrbitalSoA< FT >::mw_mem_handle_.
|
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 288 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::computeU(), J1OrbitalSoA< FT >::curAt, qmcplusplus::exp(), ParticleSet::getDistTableAB(), DistanceTableAB::getTempDists(), J1OrbitalSoA< FT >::myTableID, WaveFunctionComponent::ORB_PBYP_RATIO, WaveFunctionComponent::UpdateMode, and J1OrbitalSoA< FT >::Vat.
|
inlineoverridevirtual |
compute the gradient during particle-by-particle update
P | quantum particleset |
iat | particle index |
Using getTempDists(). curAt, curGrad and curLap are computed.
Reimplemented from WaveFunctionComponent.
Definition at line 443 of file J1OrbitalSoA.h.
References qmcplusplus::simd::accumulate_n(), J1OrbitalSoA< FT >::accumulateGL(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::curAt, J1OrbitalSoA< FT >::curGrad, J1OrbitalSoA< FT >::curLap, J1OrbitalSoA< FT >::d2U, J1OrbitalSoA< FT >::dU, qmcplusplus::exp(), ParticleSet::getDistTableAB(), DistanceTableAB::getTempDispls(), DistanceTableAB::getTempDists(), J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::Nions, WaveFunctionComponent::ORB_PBYP_PARTIAL, J1OrbitalSoA< FT >::U, WaveFunctionComponent::UpdateMode, and J1OrbitalSoA< FT >::Vat.
|
inlineoverridevirtual |
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 240 of file J1OrbitalSoA.h.
References qmcplusplus::simd::accumulate_n(), J1OrbitalSoA< FT >::accumulateGL(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::d2U, J1OrbitalSoA< FT >::dU, ParticleSet::getDistTableAB(), J1OrbitalSoA< FT >::Grad, J1OrbitalSoA< FT >::Lap, J1OrbitalSoA< FT >::myTableID, J1OrbitalSoA< FT >::Nelec, J1OrbitalSoA< FT >::Nions, J1OrbitalSoA< FT >::U, and J1OrbitalSoA< FT >::Vat.
Referenced by J1OrbitalSoA< FT >::evaluateLog().
|
inlineoverridevirtual |
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 473 of file J1OrbitalSoA.h.
References PooledMemory< T_scalar, Alloc >::add(), Vector< T, Alloc >::begin(), WaveFunctionComponent::Bytes_in_WFBuffer, PooledMemory< T_scalar, Alloc >::current(), Vector< T, Alloc >::end(), PooledMemory< T_scalar, Alloc >::forward(), Vector< T, Alloc >::free(), J1OrbitalSoA< FT >::Grad, J1OrbitalSoA< FT >::Lap, and J1OrbitalSoA< FT >::Vat.
|
overridevirtual |
return a shared resource to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 102 of file J1OrbitalSoA.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), and ResourceCollection::takebackResource().
|
inlineprivate |
Definition at line 107 of file J1OrbitalSoA.h.
References J1OrbitalSoA< FT >::dLogPsi, J1OrbitalSoA< FT >::gradLogPsi, J1OrbitalSoA< FT >::lapLogPsi, J1OrbitalSoA< FT >::myVars, J1OrbitalSoA< FT >::Nelec, Vector< T, Alloc >::resize(), and VariableSet::size().
Referenced by J1OrbitalSoA< FT >::evaluateDerivativesWF().
|
inlineoverridevirtual |
Rejected move.
Nothing to do
Implements WaveFunctionComponent.
Definition at line 455 of file J1OrbitalSoA.h.
|
inlineoverridevirtual |
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 493 of file J1OrbitalSoA.h.
References WaveFunctionComponent::Bytes_in_WFBuffer, J1OrbitalSoA< FT >::computeGL(), PooledMemory< T_scalar, Alloc >::forward(), ParticleSet::G, ParticleSet::L, and WaveFunctionComponent::log_value_.
|
private |
Definition at line 80 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), J1OrbitalSoA< FT >::ratio(), and J1OrbitalSoA< FT >::ratioGrad().
|
private |
Definition at line 82 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), and J1OrbitalSoA< FT >::ratioGrad().
|
private |
Definition at line 81 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), and J1OrbitalSoA< FT >::ratioGrad().
|
private |
Definition at line 86 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evalGradSource(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::ratioGrad(), and J1OrbitalSoA< FT >::recompute().
|
private |
Definition at line 86 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::evalGradSource(), and J1OrbitalSoA< FT >::initialize().
|
private |
Definition at line 87 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::computeU(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), and J1OrbitalSoA< FT >::initialize().
|
private |
Definition at line 88 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::computeU3(), and J1OrbitalSoA< FT >::initialize().
Definition at line 101 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::evaluateDerivativesWF(), and J1OrbitalSoA< FT >::resizeWFOptVectors().
|
private |
Definition at line 86 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evalGradSource(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::ratioGrad(), and J1OrbitalSoA< FT >::recompute().
Definition at line 89 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::computeGL(), J1OrbitalSoA< FT >::copyFromBuffer(), J1OrbitalSoA< FT >::evalGrad(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::recompute(), and J1OrbitalSoA< FT >::registerData().
|
private |
Definition at line 102 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::evaluateDerivatives(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), and J1OrbitalSoA< FT >::resizeWFOptVectors().
|
private |
functor for each ion group Conceptually, this is different from unique functions.
In a spin polarized system, two species may share the same J1 functor. FIXME However this is not supported right now. Each species needs its dedicated function.
Definition at line 98 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::addFunc(), and J1OrbitalSoA< FT >::initialize().
|
private |
the group_id of each particle
Definition at line 75 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::J1OrbitalSoA().
|
private |
reference to the sources (ions)
Definition at line 73 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::addFunc(), J1OrbitalSoA< FT >::computeU(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evaluateHessian(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), J1OrbitalSoA< FT >::initialize(), and J1OrbitalSoA< FT >::makeClone().
|
private |
Container for .
Definition at line 92 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::addFunc(), J1OrbitalSoA< FT >::checkOutVariables(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), J1OrbitalSoA< FT >::evaluateDerivRatios(), J1OrbitalSoA< FT >::getFunctors(), and J1OrbitalSoA< FT >::initialize().
|
protected |
container for the unique Jastrow functions
Definition at line 190 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::addFunc(), J1OrbitalSoA< FT >::checkOutVariables(), J1OrbitalSoA< FT >::computeU(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evalGradSource(), J1OrbitalSoA< FT >::evaluateHessian(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), J1OrbitalSoA< FT >::extractOptimizableObjectRefs(), J1OrbitalSoA< FT >::initialize(), and J1OrbitalSoA< FT >::makeClone().
Definition at line 90 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::computeGL(), J1OrbitalSoA< FT >::copyFromBuffer(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::recompute(), and J1OrbitalSoA< FT >::registerData().
|
private |
Definition at line 103 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::evaluateDerivatives(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), and J1OrbitalSoA< FT >::resizeWFOptVectors().
|
private |
Definition at line 105 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acquireResource(), and J1OrbitalSoA< FT >::mw_evaluateRatios().
|
private |
table index
Definition at line 65 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::evalGradSource(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), J1OrbitalSoA< FT >::evaluateDerivRatios(), J1OrbitalSoA< FT >::evaluateHessian(), J1OrbitalSoA< FT >::evaluateRatios(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), J1OrbitalSoA< FT >::ratio(), J1OrbitalSoA< FT >::ratioGrad(), and J1OrbitalSoA< FT >::recompute().
|
private |
variables handled by this orbital
Definition at line 78 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::checkOutVariables(), J1OrbitalSoA< FT >::evaluateDerivatives(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), J1OrbitalSoA< FT >::evaluateDerivRatios(), J1OrbitalSoA< FT >::makeClone(), and J1OrbitalSoA< FT >::resizeWFOptVectors().
|
private |
number of electrons
Definition at line 69 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::computeGL(), J1OrbitalSoA< FT >::copyFromBuffer(), J1OrbitalSoA< FT >::evalGradSource(), J1OrbitalSoA< FT >::evaluateHessian(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::recompute(), and J1OrbitalSoA< FT >::resizeWFOptVectors().
|
private |
number of ions
Definition at line 67 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::accumulateGL(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evaluateHessian(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::J1OrbitalSoA(), J1OrbitalSoA< FT >::ratioGrad(), and J1OrbitalSoA< FT >::recompute().
|
private |
number of ion groups
Definition at line 71 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::computeU(), J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), J1OrbitalSoA< FT >::initialize(), and J1OrbitalSoA< FT >::J1OrbitalSoA().
|
private |
Definition at line 100 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::checkOutVariables(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), J1OrbitalSoA< FT >::evaluateDerivRatios(), and J1OrbitalSoA< FT >::makeClone().
|
private |
Definition at line 86 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::computeU3(), J1OrbitalSoA< FT >::evalGradSource(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::ratioGrad(), and J1OrbitalSoA< FT >::recompute().
|
private |
if true use offload
Definition at line 62 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::J1OrbitalSoA(), and J1OrbitalSoA< FT >::makeClone().
Definition at line 85 of file J1OrbitalSoA.h.
Referenced by J1OrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::computeGL(), J1OrbitalSoA< FT >::copyFromBuffer(), J1OrbitalSoA< FT >::evaluateRatios(), J1OrbitalSoA< FT >::evaluateRatiosAlltoOne(), J1OrbitalSoA< FT >::initialize(), J1OrbitalSoA< FT >::ratio(), J1OrbitalSoA< FT >::ratioGrad(), J1OrbitalSoA< FT >::recompute(), and J1OrbitalSoA< FT >::registerData().
struct qmcplusplus::J1Spin |
Specialization for one-body Jastrow function using multiple functors.
Public Types | |
using | FuncType = FT |
alias FuncType More... | |
using | valT = typename FT::real_type |
type of each component U, dU, d2U; More... | |
using | posT = TinyVector< valT, OHMMS_DIM > |
element position type More... | |
using | DistRow = DistanceTable::DistRow |
use the same container More... | |
using | DisplRow = DistanceTable::DisplRow |
using | GradDerivVec = ParticleAttrib< QTFull::GradType > |
using | ValueDerivVec = ParticleAttrib< QTFull::ValueType > |
![]() | |
enum | { ORB_PBYP_RATIO, ORB_PBYP_ALL, ORB_PBYP_PARTIAL, ORB_WALKER, ORB_ALLWALKER } |
enum for a update mode More... | |
using | Walker_t = ParticleSet::Walker_t |
using | WFBufferType = Walker_t::WFBuffer_t |
using | BufferType = Walker_t::Buffer_t |
using | RealMatrix_t = OrbitalSetTraits< RealType >::ValueMatrix |
using | ValueVector = OrbitalSetTraits< ValueType >::ValueVector |
using | ValueMatrix = OrbitalSetTraits< ValueType >::ValueMatrix |
using | GradMatrix = OrbitalSetTraits< ValueType >::GradMatrix |
using | HessType = OrbitalSetTraits< ValueType >::HessType |
using | HessVector = OrbitalSetTraits< ValueType >::HessVector |
using | LogValue = std::complex< QTFull::RealType > |
using | PsiValue = QTFull::ValueType |
![]() | |
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 | |
void | resizeWFOptVectors () |
J1Spin (const std::string &obj_name, const ParticleSet &ions, ParticleSet &els, bool use_offload) | |
J1Spin (const J1Spin &rhs)=delete | |
J1Spin (const J1Spin &rhs, ParticleSet &tqp) | |
std::string | getClassName () const override |
return class name More... | |
void | initialize (ParticleSet &els) |
void | addFunc (int source_type, std::unique_ptr< FT > afunc, int target_type=-1) |
void | recompute (const ParticleSet &P) override |
recompute the value of the WaveFunctionComponents which require critical accuracy. More... | |
LogValue | evaluateLog (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override |
evaluate the value of the WaveFunctionComponent from scratch More... | |
void | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi) override |
PsiValue | ratio (ParticleSet &P, int iat) override |
evaluate the ratio of the new to old WaveFunctionComponent value More... | |
void | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) override |
void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi) override |
valT | computeU (const ParticleSet &P, int iat, const DistRow &dist) |
void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
QTFull::RealType | computeGL (ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) const |
compute G and L from internally stored data More... | |
LogValue | evaluateGL (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L, bool fromscratch=false) override |
compute gradients and laplacian of the TWF with respect to each particle. More... | |
valT | accumulateGL (const valT *restrict du, const valT *restrict d2u, const DisplRow &displ, posT &grad) const |
compute gradient and lap More... | |
void | computeU3 (const ParticleSet &P, int iat, const DistRow &dist) |
compute U, dU and d2U More... | |
GradType | evalGrad (ParticleSet &P, int iat) override |
compute the gradient during particle-by-particle update More... | |
PsiValue | ratioGrad (ParticleSet &P, int iat, GradType &grad_iat) override |
compute the gradient during particle-by-particle update More... | |
void | restore (int iat) override |
Rejected move. More... | |
void | acceptMove (ParticleSet &P, int iat, bool safe_to_delay=false) override |
Accpted move. 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... | |
std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const override |
make clone More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int isrc) override |
return the logarithmic gradient for the iat-th particle of the source particleset More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int isrc, TinyVector< ParticleSet::ParticleGradient, OHMMS_DIM > &grad_grad, TinyVector< ParticleSet::ParticleLaplacian, OHMMS_DIM > &lapl_grad) override |
Adds the gradient w.r.t. More... | |
bool | isOptimizable () const override |
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... | |
![]() | |
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 | isFermionic () const |
true, if this component is fermionic More... | |
virtual bool | isMultiDet () const |
true, if this component is multi-determinant More... | |
virtual void | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const |
Register the component with the TWFFastDerivWrapper wrapper. 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 |
virtual GradType | evalGradWithSpin (ParticleSet &P, int iat, ComplexType &spingrad) |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. 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... | |
virtual PsiValue | ratioGradWithSpin (ParticleSet &P, int iat, GradType &grad_iat, ComplexType &spingrad_iat) |
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... | |
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 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 | completeUpdates () |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. 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... | |
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 void | createResource (ResourceCollection &collection) const |
initialize a shared resource and hand it to a collection More... | |
virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
acquire a shared resource from a collection More... | |
virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
return a shared resource to a collection More... | |
virtual RealType | KECorrection () |
Return the Chiesa kinetic energy correction. 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 void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
virtual void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) |
Calculates the derivatives of ![]() | |
virtual void | finalizeOptimization () |
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 | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) |
evaluate ratios to evaluate the non-local PP 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... | |
virtual void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) |
evaluate ratios to evaluate the non-local PP More... | |
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... | |
Public Attributes | |
const int | myTableID |
table index More... | |
const int | Nions |
number of ions More... | |
const int | Nelec |
number of electrons More... | |
const int | NumGroups |
const int | NumTargetGroups |
const ParticleSet & | Ions |
reference to the sources (ions) More... | |
opt_variables_type | myVars |
variables handled by this orbital More... | |
valT | curAt |
valT | curLap |
posT | curGrad |
Vector< valT > | Vat |
![]() | |
aligned_vector< valT > | U |
aligned_vector< valT > | dU |
aligned_vector< valT > | d2U |
aligned_vector< valT > | d3U |
aligned_vector< valT > | DistCompressed |
aligned_vector< int > | DistIndice |
Vector< posT > | Grad |
Vector< valT > | Lap |
std::vector< std::unique_ptr< FT > > | J1UniqueFunctors |
container for the unique Jastrow functors (size NumGroups x NumTargetGroups) More... | |
std::vector< std::pair< int, int > > | OffSet |
Vector< RealType > | dLogPsi |
std::vector< GradDerivVec > | gradLogPsi |
std::vector< ValueDerivVec > | lapLogPsi |
![]() | |
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... | |
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 ![]() | |
using DisplRow = DistanceTable::DisplRow |
using DistRow = DistanceTable::DistRow |
using GradDerivVec = ParticleAttrib<QTFull::GradType> |
using posT = TinyVector<valT, OHMMS_DIM> |
using valT = typename FT::real_type |
using ValueDerivVec = ParticleAttrib<QTFull::ValueType> |
|
inline |
Definition at line 93 of file J1Spin.h.
References J1Spin< FT >::initialize(), and WaveFunctionComponent::my_name_.
|
inline |
Definition at line 109 of file J1Spin.h.
References J1Spin< FT >::addFunc(), J1Spin< FT >::initialize(), J1Spin< FT >::J1UniqueFunctors, J1Spin< FT >::myVars, J1Spin< FT >::NumGroups, J1Spin< FT >::NumTargetGroups, and J1Spin< FT >::OffSet.
|
inlineoverridevirtual |
Accpted move.
Update Vat[iat],Grad[iat] and Lap[iat]
Implements WaveFunctionComponent.
Definition at line 458 of file J1Spin.h.
References J1Spin< FT >::accumulateGL(), J1Spin< FT >::computeU3(), J1Spin< FT >::curAt, J1Spin< FT >::curGrad, J1Spin< FT >::curLap, J1Spin< FT >::d2U, J1Spin< FT >::dU, ParticleSet::getDistTableAB(), DistanceTableAB::getTempDispls(), DistanceTableAB::getTempDists(), J1Spin< FT >::Grad, J1Spin< FT >::Lap, WaveFunctionComponent::log_value_, J1Spin< FT >::myTableID, WaveFunctionComponent::ORB_PBYP_RATIO, WaveFunctionComponent::UpdateMode, and J1Spin< FT >::Vat.
|
inline |
compute gradient and lap
Definition at line 391 of file J1Spin.h.
References VectorSoaContainer< T, D, Alloc >::data(), J1Spin< FT >::Nions, OHMMS_DIM, and qmcplusplus::Units::time::s.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::ratioGrad(), and J1Spin< FT >::recompute().
|
inline |
Definition at line 148 of file J1Spin.h.
References J1Spin< FT >::J1UniqueFunctors, and J1Spin< FT >::NumTargetGroups.
Referenced by J1Spin< FT >::J1Spin().
|
inlineoverridevirtual |
check out variational optimizable variables
active | a super set of optimizable variables |
Reimplemented from WaveFunctionComponent.
Definition at line 522 of file J1Spin.h.
References VariableSet::clear(), VariableSet::getIndex(), VariableSet::Index, VariableSet::insertFrom(), J1Spin< FT >::J1UniqueFunctors, J1Spin< FT >::myVars, J1Spin< FT >::OffSet, VariableSet::print(), and VariableSet::size().
|
inline |
compute G and L from internally stored data
Definition at line 370 of file J1Spin.h.
References qmcplusplus::simd::accumulate_n(), Vector< T, Alloc >::data(), J1Spin< FT >::Grad, J1Spin< FT >::Lap, J1Spin< FT >::Nelec, and J1Spin< FT >::Vat.
Referenced by J1Spin< FT >::evaluateGL(), J1Spin< FT >::evaluateLog(), and J1Spin< FT >::updateBuffer().
|
inline |
Definition at line 337 of file J1Spin.h.
References Vector< T, Alloc >::data(), J1Spin< FT >::DistCompressed, ParticleSet::first(), ParticleSet::getGroupID(), J1Spin< FT >::Ions, J1Spin< FT >::J1UniqueFunctors, ParticleSet::last(), J1Spin< FT >::NumGroups, and J1Spin< FT >::NumTargetGroups.
Referenced by J1Spin< FT >::evaluateRatios(), and J1Spin< FT >::ratio().
|
inline |
compute U, dU and d2U
P | quantum particleset |
iat | the moving particle |
dist | starting address of the distances of the ions wrt the iat-th particle |
Definition at line 415 of file J1Spin.h.
References BLAS::czero, J1Spin< FT >::d2U, Vector< T, Alloc >::data(), J1Spin< FT >::DistCompressed, J1Spin< FT >::DistIndice, J1Spin< FT >::dU, OMPstd::fill_n(), ParticleSet::first(), ParticleSet::getGroupID(), J1Spin< FT >::Ions, J1Spin< FT >::J1UniqueFunctors, ParticleSet::last(), J1Spin< FT >::Nions, J1Spin< FT >::NumGroups, J1Spin< FT >::NumTargetGroups, and J1Spin< FT >::U.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::ratioGrad(), and J1Spin< FT >::recompute().
|
inlineoverridevirtual |
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 500 of file J1Spin.h.
References Vector< T, Alloc >::attachReference(), J1Spin< FT >::Grad, J1Spin< FT >::Lap, PooledMemory< T_scalar, Alloc >::lendReference(), J1Spin< FT >::Nelec, and J1Spin< FT >::Vat.
|
inlineoverridevirtual |
compute the gradient during particle-by-particle update
P | quantum particleset |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 435 of file J1Spin.h.
References J1Spin< FT >::Grad.
|
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 568 of file J1Spin.h.
References J1Spin< FT >::d2U, J1Spin< FT >::d3U, J1Spin< FT >::dU, ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), J1Spin< FT >::J1UniqueFunctors, J1Spin< FT >::myTableID, J1Spin< FT >::Nelec, J1Spin< FT >::NumTargetGroups, and J1Spin< FT >::U.
|
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 589 of file J1Spin.h.
References J1Spin< FT >::d2U, J1Spin< FT >::d3U, J1Spin< FT >::dU, ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), J1Spin< FT >::J1UniqueFunctors, J1Spin< FT >::myTableID, J1Spin< FT >::Nelec, J1Spin< FT >::NumTargetGroups, OHMMS_DIM, and J1Spin< FT >::U.
|
inlineoverride |
Definition at line 222 of file J1Spin.h.
References qmcplusplus::Dot(), J1Spin< FT >::evaluateDerivativesWF(), ParticleSet::G, J1Spin< FT >::gradLogPsi, J1Spin< FT >::lapLogPsi, J1Spin< FT >::myVars, VariableSet::recompute(), VariableSet::size(), qmcplusplus::Sum(), and VariableSet::where().
|
inlineoverride |
Definition at line 254 of file J1Spin.h.
References BLAS::cone, J1Spin< FT >::dLogPsi, DistanceTableAB::getDisplRow(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), ParticleSet::getTotalNum(), J1Spin< FT >::gradLogPsi, J1Spin< FT >::Ions, J1Spin< FT >::J1UniqueFunctors, J1Spin< FT >::lapLogPsi, J1Spin< FT >::myTableID, J1Spin< FT >::myVars, qmcplusplus::Units::time::ns, J1Spin< FT >::NumTargetGroups, J1Spin< FT >::OffSet, OHMMS_DIM, VariableSet::recompute(), J1Spin< FT >::resizeWFOptVectors(), qmcplusplus::Units::second, VariableSet::size(), and VariableSet::where().
Referenced by J1Spin< FT >::evaluateDerivatives().
|
inlineoverridevirtual |
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 380 of file J1Spin.h.
References J1Spin< FT >::computeGL(), and WaveFunctionComponent::log_value_.
|
inlineoverridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 179 of file J1Spin.h.
References Tensor< T, D >::diagonal(), ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), J1Spin< FT >::Ions, J1Spin< FT >::J1UniqueFunctors, J1Spin< FT >::myTableID, J1Spin< FT >::Nelec, J1Spin< FT >::Nions, J1Spin< FT >::NumTargetGroups, and qmcplusplus::outerProduct().
|
inlineoverridevirtual |
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 171 of file J1Spin.h.
References J1Spin< FT >::computeGL(), WaveFunctionComponent::log_value_, and J1Spin< FT >::recompute().
|
inlineoverride |
Definition at line 215 of file J1Spin.h.
References J1Spin< FT >::computeU(), qmcplusplus::exp(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), VirtualParticleSet::getRefPS(), J1Spin< FT >::myTableID, VirtualParticleSet::refPtcl, and J1Spin< FT >::Vat.
|
inlineoverride |
Definition at line 350 of file J1Spin.h.
References J1Spin< FT >::curAt, J1Spin< FT >::DistCompressed, qmcplusplus::exp(), ParticleSet::first(), ParticleSet::getDistTableAB(), DistanceTableAB::getTempDists(), J1Spin< FT >::Ions, J1Spin< FT >::J1UniqueFunctors, ParticleSet::last(), J1Spin< FT >::myTableID, J1Spin< FT >::Nelec, J1Spin< FT >::NumGroups, J1Spin< FT >::NumTargetGroups, and J1Spin< FT >::Vat.
|
inlineoverridevirtual |
extract underlying OptimizableObject references
opt_obj_refs | aggregated list of optimizable object references |
Reimplemented from WaveFunctionComponent.
Definition at line 516 of file J1Spin.h.
References J1Spin< FT >::J1UniqueFunctors, and UniqueOptObjRefs::push_back().
|
inlineoverridevirtual |
return class name
Implements WaveFunctionComponent.
|
inline |
Definition at line 133 of file J1Spin.h.
References J1Spin< FT >::d2U, J1Spin< FT >::d3U, J1Spin< FT >::DistCompressed, J1Spin< FT >::DistIndice, J1Spin< FT >::dU, J1Spin< FT >::Grad, J1Spin< FT >::J1UniqueFunctors, J1Spin< FT >::Lap, J1Spin< FT >::Nelec, J1Spin< FT >::Nions, J1Spin< FT >::NumGroups, J1Spin< FT >::NumTargetGroups, Vector< T, Alloc >::resize(), J1Spin< FT >::U, and J1Spin< FT >::Vat.
Referenced by J1Spin< FT >::J1Spin().
|
inlineoverridevirtual |
WaveFunctionComponent virtual functions that are not essential for the development
Reimplemented from WaveFunctionComponent.
|
inlineoverridevirtual |
make clone
tqp | target Quantum ParticleSet |
deepcopy | if true, make a decopy |
If not true, return a proxy class
Reimplemented from WaveFunctionComponent.
|
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 208 of file J1Spin.h.
References J1Spin< FT >::computeU(), J1Spin< FT >::curAt, qmcplusplus::exp(), ParticleSet::getDistTableAB(), DistanceTableAB::getTempDists(), J1Spin< FT >::myTableID, WaveFunctionComponent::ORB_PBYP_RATIO, WaveFunctionComponent::UpdateMode, and J1Spin< FT >::Vat.
|
inlineoverridevirtual |
compute the gradient during particle-by-particle update
P | quantum particleset |
iat | particle index |
Using getTempDists(). curAt, curGrad and curLap are computed.
Reimplemented from WaveFunctionComponent.
Definition at line 443 of file J1Spin.h.
References qmcplusplus::simd::accumulate_n(), J1Spin< FT >::accumulateGL(), J1Spin< FT >::computeU3(), J1Spin< FT >::curAt, J1Spin< FT >::curGrad, J1Spin< FT >::curLap, J1Spin< FT >::d2U, J1Spin< FT >::dU, qmcplusplus::exp(), ParticleSet::getDistTableAB(), DistanceTableAB::getTempDispls(), DistanceTableAB::getTempDists(), J1Spin< FT >::myTableID, J1Spin< FT >::Nions, WaveFunctionComponent::ORB_PBYP_PARTIAL, J1Spin< FT >::U, WaveFunctionComponent::UpdateMode, and J1Spin< FT >::Vat.
|
inlineoverridevirtual |
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 160 of file J1Spin.h.
References qmcplusplus::simd::accumulate_n(), J1Spin< FT >::accumulateGL(), J1Spin< FT >::computeU3(), J1Spin< FT >::d2U, J1Spin< FT >::dU, ParticleSet::getDistTableAB(), J1Spin< FT >::Grad, J1Spin< FT >::Lap, J1Spin< FT >::myTableID, J1Spin< FT >::Nelec, J1Spin< FT >::Nions, J1Spin< FT >::U, and J1Spin< FT >::Vat.
Referenced by J1Spin< FT >::evaluateLog().
|
inlineoverridevirtual |
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 473 of file J1Spin.h.
References PooledMemory< T_scalar, Alloc >::add(), Vector< T, Alloc >::begin(), WaveFunctionComponent::Bytes_in_WFBuffer, PooledMemory< T_scalar, Alloc >::current(), Vector< T, Alloc >::end(), PooledMemory< T_scalar, Alloc >::forward(), Vector< T, Alloc >::free(), J1Spin< FT >::Grad, J1Spin< FT >::Lap, and J1Spin< FT >::Vat.
|
inline |
Definition at line 86 of file J1Spin.h.
References J1Spin< FT >::dLogPsi, J1Spin< FT >::gradLogPsi, J1Spin< FT >::lapLogPsi, J1Spin< FT >::myVars, J1Spin< FT >::Nelec, Vector< T, Alloc >::resize(), and VariableSet::size().
Referenced by J1Spin< FT >::evaluateDerivativesWF().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
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 493 of file J1Spin.h.
References WaveFunctionComponent::Bytes_in_WFBuffer, J1Spin< FT >::computeGL(), PooledMemory< T_scalar, Alloc >::forward(), ParticleSet::G, ParticleSet::L, and WaveFunctionComponent::log_value_.
valT curAt |
Definition at line 67 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::evaluateRatiosAlltoOne(), J1Spin< FT >::ratio(), and J1Spin< FT >::ratioGrad().
posT curGrad |
Definition at line 69 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), and J1Spin< FT >::ratioGrad().
valT curLap |
Definition at line 68 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), and J1Spin< FT >::ratioGrad().
aligned_vector<valT> d2U |
Definition at line 73 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::computeU3(), J1Spin< FT >::evalGradSource(), J1Spin< FT >::initialize(), J1Spin< FT >::ratioGrad(), and J1Spin< FT >::recompute().
aligned_vector<valT> d3U |
Definition at line 73 of file J1Spin.h.
Referenced by J1Spin< FT >::evalGradSource(), and J1Spin< FT >::initialize().
aligned_vector<valT> DistCompressed |
Definition at line 74 of file J1Spin.h.
Referenced by J1Spin< FT >::computeU(), J1Spin< FT >::computeU3(), J1Spin< FT >::evaluateRatiosAlltoOne(), and J1Spin< FT >::initialize().
aligned_vector<int> DistIndice |
Definition at line 75 of file J1Spin.h.
Referenced by J1Spin< FT >::computeU3(), and J1Spin< FT >::initialize().
Definition at line 82 of file J1Spin.h.
Referenced by J1Spin< FT >::evaluateDerivativesWF(), and J1Spin< FT >::resizeWFOptVectors().
aligned_vector<valT> dU |
Definition at line 73 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::computeU3(), J1Spin< FT >::evalGradSource(), J1Spin< FT >::initialize(), J1Spin< FT >::ratioGrad(), and J1Spin< FT >::recompute().
Definition at line 76 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::computeGL(), J1Spin< FT >::copyFromBuffer(), J1Spin< FT >::evalGrad(), J1Spin< FT >::initialize(), J1Spin< FT >::recompute(), and J1Spin< FT >::registerData().
std::vector<GradDerivVec> gradLogPsi |
Definition at line 83 of file J1Spin.h.
Referenced by J1Spin< FT >::evaluateDerivatives(), J1Spin< FT >::evaluateDerivativesWF(), and J1Spin< FT >::resizeWFOptVectors().
const ParticleSet& Ions |
reference to the sources (ions)
Definition at line 62 of file J1Spin.h.
Referenced by J1Spin< FT >::computeU(), J1Spin< FT >::computeU3(), J1Spin< FT >::evaluateDerivativesWF(), J1Spin< FT >::evaluateHessian(), and J1Spin< FT >::evaluateRatiosAlltoOne().
std::vector<std::unique_ptr<FT> > J1UniqueFunctors |
container for the unique Jastrow functors (size NumGroups x NumTargetGroups)
Definition at line 79 of file J1Spin.h.
Referenced by J1Spin< FT >::addFunc(), J1Spin< FT >::checkOutVariables(), J1Spin< FT >::computeU(), J1Spin< FT >::computeU3(), J1Spin< FT >::evalGradSource(), J1Spin< FT >::evaluateDerivativesWF(), J1Spin< FT >::evaluateHessian(), J1Spin< FT >::evaluateRatiosAlltoOne(), J1Spin< FT >::extractOptimizableObjectRefs(), J1Spin< FT >::initialize(), and J1Spin< FT >::J1Spin().
Definition at line 77 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::computeGL(), J1Spin< FT >::copyFromBuffer(), J1Spin< FT >::initialize(), J1Spin< FT >::recompute(), and J1Spin< FT >::registerData().
std::vector<ValueDerivVec> lapLogPsi |
Definition at line 84 of file J1Spin.h.
Referenced by J1Spin< FT >::evaluateDerivatives(), J1Spin< FT >::evaluateDerivativesWF(), and J1Spin< FT >::resizeWFOptVectors().
const int myTableID |
table index
Definition at line 50 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::evalGradSource(), J1Spin< FT >::evaluateDerivativesWF(), J1Spin< FT >::evaluateHessian(), J1Spin< FT >::evaluateRatios(), J1Spin< FT >::evaluateRatiosAlltoOne(), J1Spin< FT >::ratio(), J1Spin< FT >::ratioGrad(), and J1Spin< FT >::recompute().
opt_variables_type myVars |
variables handled by this orbital
Definition at line 65 of file J1Spin.h.
Referenced by J1Spin< FT >::checkOutVariables(), J1Spin< FT >::evaluateDerivatives(), J1Spin< FT >::evaluateDerivativesWF(), J1Spin< FT >::J1Spin(), and J1Spin< FT >::resizeWFOptVectors().
const int Nelec |
number of electrons
Definition at line 54 of file J1Spin.h.
Referenced by J1Spin< FT >::computeGL(), J1Spin< FT >::copyFromBuffer(), J1Spin< FT >::evalGradSource(), J1Spin< FT >::evaluateHessian(), J1Spin< FT >::evaluateRatiosAlltoOne(), J1Spin< FT >::initialize(), J1Spin< FT >::recompute(), and J1Spin< FT >::resizeWFOptVectors().
const int Nions |
number of ions
Definition at line 52 of file J1Spin.h.
Referenced by J1Spin< FT >::accumulateGL(), J1Spin< FT >::computeU3(), J1Spin< FT >::evaluateHessian(), J1Spin< FT >::initialize(), J1Spin< FT >::ratioGrad(), and J1Spin< FT >::recompute().
const int NumGroups |
Definition at line 58 of file J1Spin.h.
Referenced by J1Spin< FT >::computeU(), J1Spin< FT >::computeU3(), J1Spin< FT >::evaluateRatiosAlltoOne(), J1Spin< FT >::initialize(), and J1Spin< FT >::J1Spin().
const int NumTargetGroups |
Definition at line 60 of file J1Spin.h.
Referenced by J1Spin< FT >::addFunc(), J1Spin< FT >::computeU(), J1Spin< FT >::computeU3(), J1Spin< FT >::evalGradSource(), J1Spin< FT >::evaluateDerivativesWF(), J1Spin< FT >::evaluateHessian(), J1Spin< FT >::evaluateRatiosAlltoOne(), J1Spin< FT >::initialize(), and J1Spin< FT >::J1Spin().
std::vector<std::pair<int, int> > OffSet |
Definition at line 81 of file J1Spin.h.
Referenced by J1Spin< FT >::checkOutVariables(), J1Spin< FT >::evaluateDerivativesWF(), and J1Spin< FT >::J1Spin().
Definition at line 73 of file J1Spin.h.
Referenced by J1Spin< FT >::computeU3(), J1Spin< FT >::evalGradSource(), J1Spin< FT >::initialize(), J1Spin< FT >::ratioGrad(), and J1Spin< FT >::recompute().
Definition at line 72 of file J1Spin.h.
Referenced by J1Spin< FT >::acceptMove(), J1Spin< FT >::computeGL(), J1Spin< FT >::copyFromBuffer(), J1Spin< FT >::evaluateRatios(), J1Spin< FT >::evaluateRatiosAlltoOne(), J1Spin< FT >::initialize(), J1Spin< FT >::ratio(), J1Spin< FT >::ratioGrad(), J1Spin< FT >::recompute(), and J1Spin< FT >::registerData().
class qmcplusplus::JeeIOrbitalSoA |
Specialization for three-body Jastrow function using multiple functors.
Each pair-type can have distinct function . For electrons, distinct pair correlation functions are used for spins up-up/down-down and up-down/down-up.
Definition at line 36 of file JeeIOrbitalSoA.h.
Public Types | |
using | FuncType = FT |
alias FuncType More... | |
![]() | |
enum | { ORB_PBYP_RATIO, ORB_PBYP_ALL, ORB_PBYP_PARTIAL, ORB_WALKER, ORB_ALLWALKER } |
enum for a update mode More... | |
using | Walker_t = ParticleSet::Walker_t |
using | WFBufferType = Walker_t::WFBuffer_t |
using | BufferType = Walker_t::Buffer_t |
using | RealMatrix_t = OrbitalSetTraits< RealType >::ValueMatrix |
using | ValueVector = OrbitalSetTraits< ValueType >::ValueVector |
using | ValueMatrix = OrbitalSetTraits< ValueType >::ValueMatrix |
using | GradMatrix = OrbitalSetTraits< ValueType >::GradMatrix |
using | HessType = OrbitalSetTraits< ValueType >::HessType |
using | HessVector = OrbitalSetTraits< ValueType >::HessVector |
using | LogValue = std::complex< QTFull::RealType > |
using | PsiValue = QTFull::ValueType |
![]() | |
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 | |
JeeIOrbitalSoA (const std::string &obj_name, const ParticleSet &ions, ParticleSet &elecs) | |
std::string | getClassName () const override |
return class name More... | |
std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &elecs) const override |
make clone More... | |
void | init (ParticleSet &p) |
void | addFunc (int iSpecies, int eSpecies1, int eSpecies2, std::unique_ptr< FT > j) |
void | check_complete () |
check that correlation information is complete 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 optimizable variables More... | |
void | build_compact_list (const ParticleSet &P) |
LogValue | evaluateLog (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override |
evaluate the value of the WaveFunctionComponent from scratch More... | |
PsiValue | ratio (ParticleSet &P, int iat) override |
evaluate the ratio of the new to old WaveFunctionComponent value More... | |
void | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) override |
void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
GradType | evalGrad (ParticleSet &P, int iat) override |
return the current gradient for the iat-th particle 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... | |
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 | recompute (const ParticleSet &P) override |
recompute the value of the WaveFunctionComponents which require critical accuracy. More... | |
valT | computeU (const ParticleSet &P, int jel, int jg, const DistRow &distjI, const DistRow &distjk, std::vector< int > &ions_nearby) |
void | computeU3_engine (const ParticleSet &P, const FT &feeI, int kel_counter, valT &Uj, posT &dUj, valT &d2Uj, Vector< valT > &Uk, gContainer_type &dUk, Vector< valT > &d2Uk) |
void | computeU3 (const ParticleSet &P, int jel, const DistRow &distjI, const DisplRow &displjI, const DistRow &distjk, const DisplRow &displjk, valT &Uj, posT &dUj, valT &d2Uj, Vector< valT > &Uk, gContainer_type &dUk, Vector< valT > &d2Uk, std::vector< int > &ions_nearby, bool triangle=false) |
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... | |
LogValue | evaluateGL (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L, bool fromscratch=false) override |
compute gradients and laplacian of the TWF with respect to each particle. More... | |
void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) override |
void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) override |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int isrc) override |
return the logarithmic gradient for the iat-th particle of the source particleset More... | |
GradType | evalGradSource (ParticleSet &P, ParticleSet &source, int isrc, TinyVector< ParticleSet::ParticleGradient, OHMMS_DIM > &grad_grad, TinyVector< ParticleSet::ParticleLaplacian, OHMMS_DIM > &lapl_grad) override |
Adds the gradient w.r.t. 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 | isFermionic () const |
true, if this component is fermionic More... | |
virtual bool | isMultiDet () const |
true, if this component is multi-determinant More... | |
virtual void | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const |
Register the component with the TWFFastDerivWrapper wrapper. 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 | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi_all) |
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 |
virtual GradType | evalGradWithSpin (ParticleSet &P, int iat, ComplexType &spingrad) |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. 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... | |
virtual PsiValue | ratioGradWithSpin (ParticleSet &P, int iat, GradType &grad_iat, ComplexType &spingrad_iat) |
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... | |
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 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 | completeUpdates () |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. 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... | |
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 void | createResource (ResourceCollection &collection) const |
initialize a shared resource and hand it to a collection More... | |
virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
acquire a shared resource from a collection More... | |
virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
return a shared resource to a collection More... | |
virtual RealType | KECorrection () |
Return the Chiesa kinetic energy correction. 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 void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
virtual void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) |
Calculates the derivatives of ![]() | |
virtual void | finalizeOptimization () |
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 | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) |
evaluate ratios to evaluate the non-local PP 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... | |
virtual void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) |
evaluate ratios to evaluate the non-local PP More... | |
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... | |
Private Types | |
using | valT = typename FT::real_type |
type of each component U, dU, d2U; More... | |
using | posT = TinyVector< valT, OHMMS_DIM > |
element position type More... | |
using | DistRow = DistanceTable::DistRow |
use the same container More... | |
using | DisplRow = DistanceTable::DisplRow |
using | gContainer_type = VectorSoaContainer< valT, OHMMS_DIM > |
![]() | |
Private Member Functions | |
void | resizeWFOptVectors () |
QTFull::RealType | computeGL (ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) const |
compute G and L from internally stored data More... | |
Private Attributes | |
const int | ee_Table_ID_ |
table index for el-el More... | |
const int | ei_Table_ID_ |
table index for i-el More... | |
int | Nelec |
int | Nion |
size_t | Nelec_padded |
number of particles + padded More... | |
int | eGroups |
int | iGroups |
const ParticleSet & | Ions |
reference to the sources (ions) More... | |
RealType | DiffVal |
diff value More... | |
Vector< valT > | Uat |
![]() | |
Vector< valT > | oldUk |
Vector< valT > | newUk |
gContainer_type | dUat |
gContainer_type | olddUk |
gContainer_type | newdUk |
Vector< valT > | d2Uat |
![]() | |
Vector< valT > | oldd2Uk |
Vector< valT > | newd2Uk |
valT | cur_Uat |
current values during PbyP More... | |
valT | cur_d2Uat |
posT | cur_dUat |
posT | dUat_temp |
Array< FT *, 3 > | F |
container for the Jastrow functions More... | |
std::map< std::string, std::unique_ptr< FT > > | J3Unique |
std::map< FT *, int > | J3UniqueIndex |
std::vector< valT > | Ion_cutoff |
the cutoff for e-I pairs More... | |
Array< std::vector< int >, 2 > | elecs_inside |
the electrons around ions within the cutoff radius, grouped by species More... | |
Array< std::vector< valT >, 2 > | elecs_inside_dist |
Array< std::vector< posT >, 2 > | elecs_inside_displ |
std::vector< int > | ions_nearby_old |
the ids of ions within the cutoff radius of an electron on which a move is proposed More... | |
std::vector< int > | ions_nearby_new |
size_t | Nbuffer |
work buffer size More... | |
aligned_vector< valT > | Distjk_Compressed |
compressed distances More... | |
aligned_vector< valT > | DistkI_Compressed |
aligned_vector< valT > | DistjI_Compressed |
std::vector< int > | DistIndice_k |
gContainer_type | Disp_jk_Compressed |
compressed displacements More... | |
gContainer_type | Disp_jI_Compressed |
gContainer_type | Disp_kI_Compressed |
VectorSoaContainer< valT, 9 > | mVGL |
work result buffer More... | |
Array< std::pair< int, int >, 3 > | VarOffset |
Vector< RealType > | dLogPsi |
Array< PosType, 2 > | gradLogPsi |
Array< RealType, 2 > | lapLogPsi |
std::vector< std::vector< RealType > > | du_dalpha |
std::vector< std::vector< PosType > > | dgrad_dalpha |
std::vector< std::vector< Tensor< RealType, 3 > > > | dhess_dalpha |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
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 |
Definition at line 44 of file JeeIOrbitalSoA.h.
|
private |
use the same container
Definition at line 43 of file JeeIOrbitalSoA.h.
using FuncType = FT |
alias FuncType
Definition at line 146 of file JeeIOrbitalSoA.h.
|
private |
Definition at line 63 of file JeeIOrbitalSoA.h.
|
private |
element position type
Definition at line 41 of file JeeIOrbitalSoA.h.
|
private |
type of each component U, dU, d2U;
Definition at line 39 of file JeeIOrbitalSoA.h.
|
inline |
Definition at line 148 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::init(), and WaveFunctionComponent::my_name_.
|
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 453 of file JeeIOrbitalSoA.h.
References qmcplusplus::abs(), Array< T, D, ALLOC >::begin(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::cur_d2Uat, JeeIOrbitalSoA< FT >::cur_dUat, JeeIOrbitalSoA< FT >::cur_Uat, JeeIOrbitalSoA< FT >::d2Uat, VectorSoaContainer< T, D, Alloc >::data(), JeeIOrbitalSoA< FT >::dUat, JeeIOrbitalSoA< FT >::dUat_temp, JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::ei_Table_ID_, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_displ, JeeIOrbitalSoA< FT >::elecs_inside_dist, ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), ParticleSet::GroupID, JeeIOrbitalSoA< FT >::Ion_cutoff, JeeIOrbitalSoA< FT >::ions_nearby_new, JeeIOrbitalSoA< FT >::ions_nearby_old, WaveFunctionComponent::log_value_, JeeIOrbitalSoA< FT >::Nelec, JeeIOrbitalSoA< FT >::newd2Uk, JeeIOrbitalSoA< FT >::newdUk, JeeIOrbitalSoA< FT >::newUk, OHMMS_DIM, JeeIOrbitalSoA< FT >::oldd2Uk, JeeIOrbitalSoA< FT >::olddUk, JeeIOrbitalSoA< FT >::oldUk, WaveFunctionComponent::ORB_PBYP_RATIO, JeeIOrbitalSoA< FT >::Uat, and WaveFunctionComponent::UpdateMode.
|
inline |
Definition at line 226 of file JeeIOrbitalSoA.h.
References APP_ABORT, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::F, ParticleSet::GroupID, JeeIOrbitalSoA< FT >::Ion_cutoff, JeeIOrbitalSoA< FT >::Ions, JeeIOrbitalSoA< FT >::J3Unique, and JeeIOrbitalSoA< FT >::Nion.
|
inline |
Definition at line 354 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::ei_Table_ID_, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_displ, JeeIOrbitalSoA< FT >::elecs_inside_dist, ParticleSet::first(), DistanceTableAB::getDisplacements(), DistanceTableAB::getDistances(), ParticleSet::getDistTableAB(), JeeIOrbitalSoA< FT >::Ion_cutoff, ParticleSet::last(), and JeeIOrbitalSoA< FT >::Nion.
Referenced by JeeIOrbitalSoA< FT >::copyFromBuffer(), JeeIOrbitalSoA< FT >::evalGradSource(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::recompute().
|
inline |
check that correlation information is complete
Definition at line 263 of file JeeIOrbitalSoA.h.
References APP_ABORT, qmcplusplus::app_log(), JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::F, ParticleSet::GroupID, JeeIOrbitalSoA< FT >::iGroups, JeeIOrbitalSoA< FT >::Ion_cutoff, JeeIOrbitalSoA< FT >::Ions, and JeeIOrbitalSoA< FT >::Nion.
|
inlineoverridevirtual |
check out optimizable variables
Reimplemented from WaveFunctionComponent.
Definition at line 325 of file JeeIOrbitalSoA.h.
References VariableSet::clear(), JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::F, VariableSet::getIndex(), JeeIOrbitalSoA< FT >::iGroups, VariableSet::Index, VariableSet::insertFrom(), JeeIOrbitalSoA< FT >::J3Unique, qmcplusplus::Units::mass::kg, WaveFunctionComponent::myVars, Array< T, D, ALLOC >::resize(), Array< T, D, ALLOC >::size(), VariableSet::size(), and JeeIOrbitalSoA< FT >::VarOffset.
|
inlineprivate |
compute G and L from internally stored data
Definition at line 133 of file JeeIOrbitalSoA.h.
References qmcplusplus::simd::accumulate_n(), JeeIOrbitalSoA< FT >::d2Uat, Vector< T, Alloc >::data(), JeeIOrbitalSoA< FT >::dUat, JeeIOrbitalSoA< FT >::Nelec, and JeeIOrbitalSoA< FT >::Uat.
Referenced by JeeIOrbitalSoA< FT >::evaluateGL(), JeeIOrbitalSoA< FT >::evaluateLog(), and JeeIOrbitalSoA< FT >::updateBuffer().
|
inline |
Definition at line 574 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::DistjI_Compressed, JeeIOrbitalSoA< FT >::Distjk_Compressed, JeeIOrbitalSoA< FT >::DistkI_Compressed, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_dist, JeeIOrbitalSoA< FT >::F, ParticleSet::GroupID, JeeIOrbitalSoA< FT >::Ion_cutoff, JeeIOrbitalSoA< FT >::Ions, qmcplusplus::Units::mass::kg, JeeIOrbitalSoA< FT >::Nbuffer, JeeIOrbitalSoA< FT >::Nion, and Array< T, D, ALLOC >::size().
Referenced by JeeIOrbitalSoA< FT >::evaluateRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), and JeeIOrbitalSoA< FT >::ratio().
|
inline |
Definition at line 713 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::computeU3_engine(), BLAS::czero, Vector< T, Alloc >::data(), VectorSoaContainer< T, D, Alloc >::data(), JeeIOrbitalSoA< FT >::Disp_jI_Compressed, JeeIOrbitalSoA< FT >::Disp_jk_Compressed, JeeIOrbitalSoA< FT >::Disp_kI_Compressed, JeeIOrbitalSoA< FT >::DistIndice_k, JeeIOrbitalSoA< FT >::DistjI_Compressed, JeeIOrbitalSoA< FT >::Distjk_Compressed, JeeIOrbitalSoA< FT >::DistkI_Compressed, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_displ, JeeIOrbitalSoA< FT >::elecs_inside_dist, JeeIOrbitalSoA< FT >::F, OMPstd::fill_n(), ParticleSet::GroupID, JeeIOrbitalSoA< FT >::Ion_cutoff, JeeIOrbitalSoA< FT >::Ions, qmcplusplus::Units::mass::kg, JeeIOrbitalSoA< FT >::Nbuffer, JeeIOrbitalSoA< FT >::Nelec, JeeIOrbitalSoA< FT >::Nion, OHMMS_DIM, and Array< T, D, ALLOC >::size().
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::ratioGrad(), and JeeIOrbitalSoA< FT >::recompute().
|
inline |
Definition at line 625 of file JeeIOrbitalSoA.h.
References qmcplusplus::simd::accumulate_n(), BLAS::cone, BLAS::czero, VectorSoaContainer< T, D, Alloc >::data(), JeeIOrbitalSoA< FT >::Disp_jI_Compressed, JeeIOrbitalSoA< FT >::Disp_jk_Compressed, JeeIOrbitalSoA< FT >::Disp_kI_Compressed, JeeIOrbitalSoA< FT >::DistIndice_k, JeeIOrbitalSoA< FT >::DistjI_Compressed, JeeIOrbitalSoA< FT >::Distjk_Compressed, JeeIOrbitalSoA< FT >::DistkI_Compressed, OMPstd::fill_n(), JeeIOrbitalSoA< FT >::mVGL, and OHMMS_DIM.
Referenced by JeeIOrbitalSoA< FT >::computeU3().
|
inlineoverridevirtual |
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 814 of file JeeIOrbitalSoA.h.
References Vector< T, Alloc >::attachReference(), VectorSoaContainer< T, D, Alloc >::attachReference(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::d2Uat, JeeIOrbitalSoA< FT >::dUat, PooledMemory< T_scalar, Alloc >::lendReference(), JeeIOrbitalSoA< FT >::Nelec, JeeIOrbitalSoA< FT >::Nelec_padded, OHMMS_DIM, and JeeIOrbitalSoA< FT >::Uat.
|
inlineoverridevirtual |
return the current gradient for the iat-th particle
P | quantum particle set |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 436 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::dUat.
|
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 1120 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::evaluateLog(), ParticleSet::getTotalNum(), ParticleSet::R, Vector< T, Alloc >::resize(), and ParticleSet::update().
|
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 1163 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::evaluateLog(), ParticleSet::getTotalNum(), ParticleSet::R, Vector< T, Alloc >::resize(), and ParticleSet::update().
|
inlineoverride |
Definition at line 830 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::build_compact_list(), BLAS::cone, BLAS::czero, JeeIOrbitalSoA< FT >::dgrad_dalpha, JeeIOrbitalSoA< FT >::dhess_dalpha, JeeIOrbitalSoA< FT >::dLogPsi, qmcplusplus::dot(), JeeIOrbitalSoA< FT >::du_dalpha, JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_displ, JeeIOrbitalSoA< FT >::elecs_inside_dist, JeeIOrbitalSoA< FT >::F, ParticleSet::G, DistanceTableAA::getDistances(), ParticleSet::getDistTableAA(), JeeIOrbitalSoA< FT >::gradLogPsi, ParticleSet::GroupID, JeeIOrbitalSoA< FT >::Ions, JeeIOrbitalSoA< FT >::J3UniqueIndex, qmcplusplus::Units::mass::kg, JeeIOrbitalSoA< FT >::lapLogPsi, WaveFunctionComponent::myVars, JeeIOrbitalSoA< FT >::Nelec, JeeIOrbitalSoA< FT >::Nion, OHMMS_DIM, VariableSet::recompute(), JeeIOrbitalSoA< FT >::resizeWFOptVectors(), Array< T, D, ALLOC >::size(), VariableSet::size(), JeeIOrbitalSoA< FT >::VarOffset, and VariableSet::where().
|
inlineoverride |
Definition at line 950 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::build_compact_list(), BLAS::cone, BLAS::czero, JeeIOrbitalSoA< FT >::dgrad_dalpha, JeeIOrbitalSoA< FT >::dhess_dalpha, JeeIOrbitalSoA< FT >::dLogPsi, JeeIOrbitalSoA< FT >::du_dalpha, JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_displ, JeeIOrbitalSoA< FT >::elecs_inside_dist, JeeIOrbitalSoA< FT >::F, DistanceTableAA::getDistances(), ParticleSet::getDistTableAA(), JeeIOrbitalSoA< FT >::gradLogPsi, ParticleSet::GroupID, JeeIOrbitalSoA< FT >::Ions, JeeIOrbitalSoA< FT >::J3UniqueIndex, qmcplusplus::Units::mass::kg, JeeIOrbitalSoA< FT >::lapLogPsi, WaveFunctionComponent::myVars, JeeIOrbitalSoA< FT >::Nion, OHMMS_DIM, VariableSet::recompute(), JeeIOrbitalSoA< FT >::resizeWFOptVectors(), Array< T, D, ALLOC >::size(), VariableSet::size(), JeeIOrbitalSoA< FT >::VarOffset, and VariableSet::where().
|
inlineoverride |
Definition at line 1034 of file JeeIOrbitalSoA.h.
References BLAS::czero, JeeIOrbitalSoA< FT >::dLogPsi, JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::ei_Table_ID_, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_dist, JeeIOrbitalSoA< FT >::evaluateRatios(), JeeIOrbitalSoA< FT >::F, DistanceTableAA::getDistances(), DistanceTableAB::getDistances(), ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), ParticleSet::getGroupID(), VirtualParticleSet::getRefPS(), VirtualParticleSet::getTotalNum(), JeeIOrbitalSoA< FT >::Ions, qmcplusplus::Units::mass::kg, WaveFunctionComponent::myVars, JeeIOrbitalSoA< FT >::Nion, VariableSet::recompute(), VirtualParticleSet::refPtcl, Vector< T, Alloc >::resize(), Array< T, D, ALLOC >::size(), VariableSet::size(), JeeIOrbitalSoA< FT >::VarOffset, and VariableSet::where().
|
inlineoverridevirtual |
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 822 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::computeGL(), and WaveFunctionComponent::log_value_.
|
inlineoverridevirtual |
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 378 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::computeGL(), WaveFunctionComponent::log_value_, and JeeIOrbitalSoA< FT >::recompute().
Referenced by JeeIOrbitalSoA< FT >::evalGradSource().
|
inlineoverride |
Definition at line 397 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::ei_Table_ID_, qmcplusplus::exp(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), VirtualParticleSet::getRefPS(), VirtualParticleSet::getTotalNum(), ParticleSet::GroupID, JeeIOrbitalSoA< FT >::ions_nearby_old, VirtualParticleSet::refPtcl, and JeeIOrbitalSoA< FT >::Uat.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivRatios().
|
inlineoverride |
Definition at line 407 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::ei_Table_ID_, qmcplusplus::exp(), JeeIOrbitalSoA< FT >::F, ParticleSet::first(), DistanceTableAB::getDistances(), ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), ParticleSet::GroupID, JeeIOrbitalSoA< FT >::Ion_cutoff, JeeIOrbitalSoA< FT >::Ions, JeeIOrbitalSoA< FT >::ions_nearby_new, ParticleSet::last(), JeeIOrbitalSoA< FT >::Nion, and JeeIOrbitalSoA< FT >::Uat.
|
inlineoverridevirtual |
extract underlying OptimizableObject references
opt_obj_refs | aggregated list of optimizable object references |
Reimplemented from WaveFunctionComponent.
Definition at line 317 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::J3Unique, and UniqueOptObjRefs::push_back().
|
inlineoverridevirtual |
return class name
Implements WaveFunctionComponent.
Definition at line 159 of file JeeIOrbitalSoA.h.
|
inline |
Definition at line 186 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::d2Uat, JeeIOrbitalSoA< FT >::Disp_jI_Compressed, JeeIOrbitalSoA< FT >::Disp_jk_Compressed, JeeIOrbitalSoA< FT >::Disp_kI_Compressed, JeeIOrbitalSoA< FT >::DistIndice_k, JeeIOrbitalSoA< FT >::DistjI_Compressed, JeeIOrbitalSoA< FT >::Distjk_Compressed, JeeIOrbitalSoA< FT >::DistkI_Compressed, JeeIOrbitalSoA< FT >::dUat, JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::elecs_inside, JeeIOrbitalSoA< FT >::elecs_inside_displ, JeeIOrbitalSoA< FT >::elecs_inside_dist, JeeIOrbitalSoA< FT >::F, ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), ParticleSet::getTotalNum(), ParticleSet::groups(), JeeIOrbitalSoA< FT >::iGroups, JeeIOrbitalSoA< FT >::Ion_cutoff, JeeIOrbitalSoA< FT >::Ions, JeeIOrbitalSoA< FT >::ions_nearby_new, JeeIOrbitalSoA< FT >::ions_nearby_old, JeeIOrbitalSoA< FT >::mVGL, JeeIOrbitalSoA< FT >::Nbuffer, JeeIOrbitalSoA< FT >::Nelec, JeeIOrbitalSoA< FT >::Nelec_padded, JeeIOrbitalSoA< FT >::newd2Uk, JeeIOrbitalSoA< FT >::newdUk, JeeIOrbitalSoA< FT >::newUk, JeeIOrbitalSoA< FT >::Nion, JeeIOrbitalSoA< FT >::oldd2Uk, JeeIOrbitalSoA< FT >::olddUk, JeeIOrbitalSoA< FT >::oldUk, Array< T, D, ALLOC >::resize(), VectorSoaContainer< T, D, Alloc >::resize(), Vector< T, Alloc >::resize(), and JeeIOrbitalSoA< FT >::Uat.
Referenced by JeeIOrbitalSoA< FT >::JeeIOrbitalSoA().
|
inlineoverridevirtual |
if true, this contains optimizable components
Reimplemented from WaveFunctionComponent.
Definition at line 315 of file JeeIOrbitalSoA.h.
|
inlineoverridevirtual |
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 161 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::eGroups, JeeIOrbitalSoA< FT >::F, JeeIOrbitalSoA< FT >::iGroups, JeeIOrbitalSoA< FT >::Ions, WaveFunctionComponent::my_name_, WaveFunctionComponent::myVars, and JeeIOrbitalSoA< FT >::VarOffset.
|
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 386 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::cur_Uat, JeeIOrbitalSoA< FT >::DiffVal, JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::ei_Table_ID_, qmcplusplus::exp(), ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), ParticleSet::GroupID, JeeIOrbitalSoA< FT >::ions_nearby_new, WaveFunctionComponent::ORB_PBYP_RATIO, JeeIOrbitalSoA< FT >::Uat, and WaveFunctionComponent::UpdateMode.
|
inlineoverridevirtual |
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 438 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::cur_d2Uat, JeeIOrbitalSoA< FT >::cur_dUat, JeeIOrbitalSoA< FT >::cur_Uat, JeeIOrbitalSoA< FT >::DiffVal, JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::ei_Table_ID_, qmcplusplus::exp(), ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), JeeIOrbitalSoA< FT >::ions_nearby_new, JeeIOrbitalSoA< FT >::newd2Uk, JeeIOrbitalSoA< FT >::newdUk, JeeIOrbitalSoA< FT >::newUk, WaveFunctionComponent::ORB_PBYP_PARTIAL, JeeIOrbitalSoA< FT >::Uat, and WaveFunctionComponent::UpdateMode.
|
inlineoverridevirtual |
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 543 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::d2Uat, VectorSoaContainer< T, D, Alloc >::data(), JeeIOrbitalSoA< FT >::dUat, JeeIOrbitalSoA< FT >::dUat_temp, JeeIOrbitalSoA< FT >::ee_Table_ID_, JeeIOrbitalSoA< FT >::ei_Table_ID_, ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), JeeIOrbitalSoA< FT >::ions_nearby_new, JeeIOrbitalSoA< FT >::Nelec, JeeIOrbitalSoA< FT >::newd2Uk, JeeIOrbitalSoA< FT >::newdUk, JeeIOrbitalSoA< FT >::newUk, OHMMS_DIM, and JeeIOrbitalSoA< FT >::Uat.
Referenced by JeeIOrbitalSoA< FT >::evaluateLog().
|
inlineoverridevirtual |
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 787 of file JeeIOrbitalSoA.h.
References PooledMemory< T_scalar, Alloc >::add(), Vector< T, Alloc >::begin(), WaveFunctionComponent::Bytes_in_WFBuffer, PooledMemory< T_scalar, Alloc >::current(), JeeIOrbitalSoA< FT >::d2Uat, VectorSoaContainer< T, D, Alloc >::data(), JeeIOrbitalSoA< FT >::dUat, Vector< T, Alloc >::end(), VectorSoaContainer< T, D, Alloc >::end(), PooledMemory< T_scalar, Alloc >::forward(), VectorSoaContainer< T, D, Alloc >::free(), Vector< T, Alloc >::free(), and JeeIOrbitalSoA< FT >::Uat.
|
inlineprivate |
Definition at line 109 of file JeeIOrbitalSoA.h.
References JeeIOrbitalSoA< FT >::dgrad_dalpha, JeeIOrbitalSoA< FT >::dhess_dalpha, JeeIOrbitalSoA< FT >::dLogPsi, JeeIOrbitalSoA< FT >::du_dalpha, JeeIOrbitalSoA< FT >::gradLogPsi, JeeIOrbitalSoA< FT >::J3Unique, JeeIOrbitalSoA< FT >::J3UniqueIndex, JeeIOrbitalSoA< FT >::lapLogPsi, WaveFunctionComponent::myVars, JeeIOrbitalSoA< FT >::Nelec, Array< T, D, ALLOC >::resize(), Vector< T, Alloc >::resize(), and VariableSet::size().
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), and JeeIOrbitalSoA< FT >::evaluateDerivativesWF().
|
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 451 of file JeeIOrbitalSoA.h.
|
inlineoverridevirtual |
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 807 of file JeeIOrbitalSoA.h.
References WaveFunctionComponent::Bytes_in_WFBuffer, JeeIOrbitalSoA< FT >::computeGL(), PooledMemory< T_scalar, Alloc >::forward(), ParticleSet::G, ParticleSet::L, and WaveFunctionComponent::log_value_.
|
private |
Definition at line 68 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), and JeeIOrbitalSoA< FT >::ratioGrad().
|
private |
Definition at line 69 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), and JeeIOrbitalSoA< FT >::ratioGrad().
|
private |
current values during PbyP
Definition at line 68 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::ratio(), and JeeIOrbitalSoA< FT >::ratioGrad().
Definition at line 66 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::computeGL(), JeeIOrbitalSoA< FT >::copyFromBuffer(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::recompute(), and JeeIOrbitalSoA< FT >::registerData().
|
private |
Definition at line 106 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
Definition at line 107 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
|
private |
diff value
Definition at line 58 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::ratio(), and JeeIOrbitalSoA< FT >::ratioGrad().
|
private |
Definition at line 92 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
|
private |
compressed displacements
Definition at line 92 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
|
private |
Definition at line 92 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
|
private |
Definition at line 90 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
|
private |
Definition at line 89 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
|
private |
compressed distances
Definition at line 89 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
|
private |
Definition at line 89 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
Definition at line 98 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
|
private |
Definition at line 105 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
|
private |
Definition at line 64 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::computeGL(), JeeIOrbitalSoA< FT >::copyFromBuffer(), JeeIOrbitalSoA< FT >::evalGrad(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::recompute(), and JeeIOrbitalSoA< FT >::registerData().
|
private |
Definition at line 69 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), and JeeIOrbitalSoA< FT >::recompute().
|
private |
table index for el-el
Definition at line 46 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), JeeIOrbitalSoA< FT >::evaluateRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), JeeIOrbitalSoA< FT >::ratio(), JeeIOrbitalSoA< FT >::ratioGrad(), and JeeIOrbitalSoA< FT >::recompute().
|
private |
Definition at line 54 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::addFunc(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::check_complete(), JeeIOrbitalSoA< FT >::checkOutVariables(), JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), JeeIOrbitalSoA< FT >::init(), and JeeIOrbitalSoA< FT >::makeClone().
|
private |
table index for i-el
Definition at line 48 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), JeeIOrbitalSoA< FT >::evaluateRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), JeeIOrbitalSoA< FT >::ratio(), JeeIOrbitalSoA< FT >::ratioGrad(), and JeeIOrbitalSoA< FT >::recompute().
|
private |
the electrons around ions within the cutoff radius, grouped by species
Definition at line 80 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), and JeeIOrbitalSoA< FT >::init().
Definition at line 82 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::init().
Definition at line 81 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), and JeeIOrbitalSoA< FT >::init().
|
private |
container for the Jastrow functions
Definition at line 71 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::addFunc(), JeeIOrbitalSoA< FT >::check_complete(), JeeIOrbitalSoA< FT >::checkOutVariables(), JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), JeeIOrbitalSoA< FT >::init(), and JeeIOrbitalSoA< FT >::makeClone().
Definition at line 99 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
|
private |
Definition at line 54 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::check_complete(), JeeIOrbitalSoA< FT >::checkOutVariables(), JeeIOrbitalSoA< FT >::init(), and JeeIOrbitalSoA< FT >::makeClone().
|
private |
the cutoff for e-I pairs
Definition at line 78 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::addFunc(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::check_complete(), JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), and JeeIOrbitalSoA< FT >::init().
|
private |
reference to the sources (ions)
Definition at line 56 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::addFunc(), JeeIOrbitalSoA< FT >::check_complete(), JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), JeeIOrbitalSoA< FT >::init(), and JeeIOrbitalSoA< FT >::makeClone().
|
private |
Definition at line 84 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::ratio(), JeeIOrbitalSoA< FT >::ratioGrad(), and JeeIOrbitalSoA< FT >::recompute().
|
private |
the ids of ions within the cutoff radius of an electron on which a move is proposed
Definition at line 84 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::evaluateRatios(), and JeeIOrbitalSoA< FT >::init().
|
private |
Definition at line 73 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::addFunc(), JeeIOrbitalSoA< FT >::checkOutVariables(), JeeIOrbitalSoA< FT >::extractOptimizableObjectRefs(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
|
private |
Definition at line 75 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
Definition at line 100 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
|
private |
work result buffer
Definition at line 94 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU3_engine(), and JeeIOrbitalSoA< FT >::init().
|
private |
work buffer size
Definition at line 87 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), and JeeIOrbitalSoA< FT >::init().
|
private |
Definition at line 50 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::computeGL(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::copyFromBuffer(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::recompute(), and JeeIOrbitalSoA< FT >::resizeWFOptVectors().
|
private |
number of particles + padded
Definition at line 52 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::copyFromBuffer(), and JeeIOrbitalSoA< FT >::init().
Definition at line 66 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::ratioGrad(), and JeeIOrbitalSoA< FT >::recompute().
|
private |
Definition at line 64 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::ratioGrad(), and JeeIOrbitalSoA< FT >::recompute().
Definition at line 61 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::ratioGrad(), and JeeIOrbitalSoA< FT >::recompute().
|
private |
Definition at line 50 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::addFunc(), JeeIOrbitalSoA< FT >::build_compact_list(), JeeIOrbitalSoA< FT >::check_complete(), JeeIOrbitalSoA< FT >::computeU(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), and JeeIOrbitalSoA< FT >::init().
Definition at line 66 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), and JeeIOrbitalSoA< FT >::init().
|
private |
Definition at line 64 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), and JeeIOrbitalSoA< FT >::init().
Definition at line 61 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), and JeeIOrbitalSoA< FT >::init().
Definition at line 61 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), JeeIOrbitalSoA< FT >::computeGL(), JeeIOrbitalSoA< FT >::copyFromBuffer(), JeeIOrbitalSoA< FT >::evaluateRatios(), JeeIOrbitalSoA< FT >::evaluateRatiosAlltoOne(), JeeIOrbitalSoA< FT >::init(), JeeIOrbitalSoA< FT >::ratio(), JeeIOrbitalSoA< FT >::ratioGrad(), JeeIOrbitalSoA< FT >::recompute(), and JeeIOrbitalSoA< FT >::registerData().
|
private |
Definition at line 97 of file JeeIOrbitalSoA.h.
Referenced by JeeIOrbitalSoA< FT >::checkOutVariables(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), and JeeIOrbitalSoA< FT >::makeClone().
class qmcplusplus::TwoBodyJastrow |
Specialization for two-body Jastrow function using multiple functors.
Each pair-type can have distinct function . For electrons, distinct pair correlation functions are used for spins up-up/down-down and up-down/down-up.
Based on TwoBodyJastrow.h with these considerations
Definition at line 56 of file TwoBodyJastrow.h.
Public Types | |
using | FuncType = FT |
alias FuncType More... | |
using | valT = typename FT::real_type |
type of each component U, dU, d2U; More... | |
using | posT = TinyVector< valT, DIM > |
element position type More... | |
using | DistRow = DistanceTable::DistRow |
use the same container More... | |
using | DisplRow = DistanceTable::DisplRow |
using | GradDerivVec = ParticleAttrib< QTFull::GradType > |
using | ValueDerivVec = ParticleAttrib< QTFull::ValueType > |
![]() | |
enum | { ORB_PBYP_RATIO, ORB_PBYP_ALL, ORB_PBYP_PARTIAL, ORB_WALKER, ORB_ALLWALKER } |
enum for a update mode More... | |
using | Walker_t = ParticleSet::Walker_t |
using | WFBufferType = Walker_t::WFBuffer_t |
using | BufferType = Walker_t::Buffer_t |
using | RealMatrix_t = OrbitalSetTraits< RealType >::ValueMatrix |
using | ValueVector = OrbitalSetTraits< ValueType >::ValueVector |
using | ValueMatrix = OrbitalSetTraits< ValueType >::ValueMatrix |
using | GradMatrix = OrbitalSetTraits< ValueType >::GradMatrix |
using | HessType = OrbitalSetTraits< ValueType >::HessType |
using | HessVector = OrbitalSetTraits< ValueType >::HessVector |
using | LogValue = std::complex< QTFull::RealType > |
using | PsiValue = QTFull::ValueType |
![]() | |
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 | |
TwoBodyJastrow (const std::string &obj_name, ParticleSet &p, bool use_offload) | |
TwoBodyJastrow (const TwoBodyJastrow &rhs)=delete | |
~TwoBodyJastrow () override | |
void | addFunc (int ia, int ib, std::unique_ptr< FT > j) |
add functor for (ia,ib) pair More... | |
void | checkSanity () const override |
Validate the internal consistency of the object. 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... | |
std::string | getClassName () const override |
return class name 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 optimizable variables More... | |
void | finalizeOptimization () override |
std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const override |
make clone 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... | |
void | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi) override |
void | recompute (const ParticleSet &P) override |
recompute internal data assuming distance table is fully ready More... | |
void | mw_recompute (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< bool > &recompute) const override |
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 |
void | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) override |
void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
void | mw_evaluateRatios (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, std::vector< std::vector< ValueType >> &ratios) const override |
GradType | evalGrad (ParticleSet &P, int iat) override |
return the current gradient for the iat-th particle 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... | |
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 |
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 | restore (int iat) override |
If a move for iat-th particle is rejected, restore to the content. More... | |
LogValue | evaluateGL (const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L, bool fromscratch=false) override |
compute G and L after the sweep 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 | registerData (ParticleSet &P, WFBufferType &buf) override |
For particle-by-particle move. More... | |
void | copyFromBuffer (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... | |
RealType | ChiesaKEcorrection () |
RealType | KECorrection () override |
Return the Chiesa kinetic energy correction. More... | |
const std::vector< FT * > & | getPairFunctions () const |
std::pair< int, int > | getComponentOffset (int index) |
opt_variables_type & | getComponentVars () |
void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi) override |
void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) override |
![]() | |
const LogValue & | get_log_value () const |
WaveFunctionComponent (const std::string &obj_name="") | |
default constructor More... | |
virtual | ~WaveFunctionComponent () |
default destructor More... | |
const std::string & | getName () const |
return object name More... | |
PsiValue | getValue () const |
assembles the full value More... | |
virtual bool | isFermionic () const |
true, if this component is fermionic More... | |
virtual bool | isMultiDet () const |
true, if this component is multi-determinant More... | |
virtual void | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const |
Register the component with the TWFFastDerivWrapper wrapper. 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 |
virtual GradType | evalGradWithSpin (ParticleSet &P, int iat, ComplexType &spingrad) |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. 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... | |
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 PsiValue | ratioGradWithSpin (ParticleSet &P, int iat, GradType &grad_iat, ComplexType &spingrad_iat) |
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... | |
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 void | completeUpdates () |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. 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... | |
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 | 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 void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
virtual void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) |
Calculates the derivatives of ![]() | |
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 | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) |
evaluate ratios to evaluate the non-local PP 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... | |
virtual void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) |
evaluate ratios to evaluate the non-local PP More... | |
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 Attributes | |
const size_t | N |
number of particles More... | |
const size_t | NumGroups |
number of groups of the target particleset More... | |
const size_t | ndim |
number of spatial dimensions More... | |
const valT | lapfac |
laplacian prefactor More... | |
![]() | |
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 | resizeInternalStorage () |
initialize storage Uat,dUat, d2Uat More... | |
void | resizeWFOptVectors () |
QTFull::RealType | computeGL (ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) const |
compute G and L from internally stored data More... | |
valT | computeU (const ParticleSet &P, int iat, const DistRow &dist) |
void | computeU3 (const ParticleSet &P, int iat, const DistRow &dist, RealType *restrict u, RealType *restrict du, RealType *restrict d2u, bool triangle=false) |
intenal function to compute ![]() | |
posT | accumulateG (const valT *restrict du, const DisplRow &displ) const |
compute gradient More... | |
Private Attributes | |
const bool | use_offload_ |
if true use offload More... | |
const size_t | N_padded |
number of particles + padded More... | |
Vector< int, OffloadPinnedAllocator< int > > | grp_ids |
the group_id of each particle More... | |
RealType | DiffVal |
diff value More... | |
RealType | KEcorr |
Correction. More... | |
Vector< valT, aligned_allocator< valT > > | Uat |
![]() | |
VectorSoaContainer< valT, DIM, aligned_allocator< valT > > | dUat |
![]() | |
Vector< valT, aligned_allocator< valT > > | d2Uat |
![]() | |
valT | cur_Uat |
aligned_vector< valT > | cur_u |
aligned_vector< valT > | cur_du |
aligned_vector< valT > | cur_d2u |
aligned_vector< valT > | old_u |
aligned_vector< valT > | old_du |
aligned_vector< valT > | old_d2u |
aligned_vector< valT > | DistCompressed |
aligned_vector< int > | DistIndice |
std::map< std::string, std::unique_ptr< FT > > | J2Unique |
Uniquue J2 set for cleanup. More... | |
std::vector< FT * > | F |
Container for ![]() | |
const int | my_table_ID_ |
e-e table ID More... | |
J2KECorrection< RealType, FT > | j2_ke_corr_helper |
std::vector< std::pair< int, int > > | OffSet |
Map indices from subcomponent variables to component variables. More... | |
Vector< RealType > | dLogPsi |
std::vector< GradDerivVec > | gradLogPsi |
std::vector< ValueDerivVec > | lapLogPsi |
ResourceHandle< TwoBodyJastrowMultiWalkerMem< RealType > > | mw_mem_handle_ |
Additional Inherited Members | |
![]() | |
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... | |
using DisplRow = DistanceTable::DisplRow |
Definition at line 67 of file TwoBodyJastrow.h.
using DistRow = DistanceTable::DistRow |
use the same container
Definition at line 66 of file TwoBodyJastrow.h.
using FuncType = FT |
alias FuncType
Definition at line 60 of file TwoBodyJastrow.h.
using GradDerivVec = ParticleAttrib<QTFull::GradType> |
Definition at line 69 of file TwoBodyJastrow.h.
using posT = TinyVector<valT, DIM> |
element position type
Definition at line 64 of file TwoBodyJastrow.h.
using valT = typename FT::real_type |
type of each component U, dU, d2U;
Definition at line 62 of file TwoBodyJastrow.h.
using ValueDerivVec = ParticleAttrib<QTFull::ValueType> |
Definition at line 70 of file TwoBodyJastrow.h.
TwoBodyJastrow | ( | const std::string & | obj_name, |
ParticleSet & | p, | ||
bool | use_offload | ||
) |
Definition at line 292 of file TwoBodyJastrow.cpp.
References TwoBodyJastrow< FT >::F, ParticleSet::first(), TwoBodyJastrow< FT >::grp_ids, TwoBodyJastrow< FT >::KEcorr, ParticleSet::last(), WaveFunctionComponent::my_name_, TwoBodyJastrow< FT >::N, TwoBodyJastrow< FT >::NumGroups, and TwoBodyJastrow< FT >::resizeInternalStorage().
|
delete |
|
overridedefault |
|
overridevirtual |
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 583 of file TwoBodyJastrow.cpp.
References TinyVector< T, D >::data(), ParticleSet::getDistTableAA(), DistanceTableAA::getTempDists(), and qmcplusplus::Units::force::N.
|
private |
compute gradient
Definition at line 275 of file TwoBodyJastrow.cpp.
References VectorSoaContainer< T, D, Alloc >::data(), qmcplusplus::Units::force::N, and qmcplusplus::Units::time::s.
|
overridevirtual |
acquire a shared resource from a collection
Reimplemented from WaveFunctionComponent.
Definition at line 57 of file TwoBodyJastrow.cpp.
References qmcplusplus::ewaldref::DIM, VectorSoaContainer< T, D, Alloc >::free(), Vector< T, Alloc >::free(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), ResourceCollection::lendResource(), TwoBodyJastrow< FT >::mw_mem_handle_, and qmcplusplus::Units::force::N.
void addFunc | ( | int | ia, |
int | ib, | ||
std::unique_ptr< FT > | j | ||
) |
add functor for (ia,ib) pair
Definition at line 352 of file TwoBodyJastrow.cpp.
References qmcplusplus::Units::force::N.
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
check out optimizable variables
Reimplemented from WaveFunctionComponent.
Definition at line 130 of file TwoBodyJastrow.cpp.
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
Validate the internal consistency of the object.
Reimplemented from WaveFunctionComponent.
Definition at line 326 of file TwoBodyJastrow.cpp.
References qmcplusplus::app_warning().
|
inline |
Definition at line 246 of file TwoBodyJastrow.h.
References J2KECorrection< RT, FT >::computeKEcorr(), TwoBodyJastrow< FT >::j2_ke_corr_helper, and TwoBodyJastrow< FT >::KEcorr.
|
private |
compute G and L from internally stored data
Definition at line 771 of file TwoBodyJastrow.cpp.
References qmcplusplus::simd::accumulate_n(), and qmcplusplus::Units::force::N.
|
private |
Definition at line 259 of file TwoBodyJastrow.cpp.
References Vector< T, Alloc >::data(), ParticleSet::first(), ParticleSet::GroupID, and ParticleSet::last().
|
private |
intenal function to compute
P | particleset |
iat | particle index |
dist | starting distance |
u | starting value |
du | starting first deriv |
d2u | starting second deriv |
Definition at line 422 of file TwoBodyJastrow.cpp.
References BLAS::czero, Vector< T, Alloc >::data(), OMPstd::fill_n(), ParticleSet::first(), ParticleSet::GroupID, ParticleSet::last(), omptarget::min(), and qmcplusplus::Units::force::N.
|
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 241 of file TwoBodyJastrow.cpp.
References qmcplusplus::ewaldref::DIM, PooledMemory< T_scalar, Alloc >::lendReference(), and qmcplusplus::Units::force::N.
|
overridevirtual |
initialize a shared resource and hand it to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 51 of file TwoBodyJastrow.cpp.
References ResourceCollection::addResource().
|
overridevirtual |
return the current gradient for the iat-th particle
P | quantum particle set |
iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 526 of file TwoBodyJastrow.cpp.
|
override |
Definition at line 847 of file TwoBodyJastrow.cpp.
References qmcplusplus::Dot(), ParticleSet::G, VariableSet::recompute(), and qmcplusplus::Sum().
Referenced by qmcplusplus::TEST_CASE().
|
override |
precomputed recalculation switch
Definition at line 883 of file TwoBodyJastrow.cpp.
References BLAS::cone, ParticleSet::getDistTableAA(), ParticleSet::GroupID, ParticleSet::groups(), qmcplusplus::n, and VariableSet::recompute().
Referenced by qmcplusplus::TEST_CASE().
|
override |
precomputed recalculation switch
Definition at line 981 of file TwoBodyJastrow.cpp.
References DistanceTableAA::getDistRow(), ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), VirtualParticleSet::getRefPS(), VirtualParticleSet::getTotalNum(), ParticleSet::GroupID, ParticleSet::groups(), qmcplusplus::n, VariableSet::recompute(), and VirtualParticleSet::refPtcl.
|
overridevirtual |
compute G and L after the sweep
Reimplemented from WaveFunctionComponent.
Definition at line 783 of file TwoBodyJastrow.cpp.
|
overridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 813 of file TwoBodyJastrow.cpp.
References Tensor< T, D >::diagonal(), ParticleSet::getDistTableAA(), ParticleSet::GroupID, qmcplusplus::Units::force::N, and qmcplusplus::outerProduct().
|
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 737 of file TwoBodyJastrow.cpp.
|
override |
Definition at line 169 of file TwoBodyJastrow.cpp.
References qmcplusplus::exp(), DistanceTableAB::getDistRow(), ParticleSet::getDistTableAB(), VirtualParticleSet::getRefPS(), and VirtualParticleSet::refPtcl.
|
override |
Definition at line 498 of file TwoBodyJastrow.cpp.
References qmcplusplus::exp(), ParticleSet::first(), ParticleSet::getDistTableAA(), DistanceTableAA::getTempDists(), and ParticleSet::last().
|
overridevirtual |
extract underlying OptimizableObject references
opt_obj_refs | aggregated list of optimizable object references |
Reimplemented from WaveFunctionComponent.
Definition at line 123 of file TwoBodyJastrow.cpp.
References UniqueOptObjRefs::push_back().
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 177 of file TwoBodyJastrow.h.
References J2KECorrection< RT, FT >::computeKEcorr(), TwoBodyJastrow< FT >::j2_ke_corr_helper, and TwoBodyJastrow< FT >::KEcorr.
|
inlineoverridevirtual |
return class name
Implements WaveFunctionComponent.
Definition at line 170 of file TwoBodyJastrow.h.
|
inline |
Definition at line 253 of file TwoBodyJastrow.h.
References TwoBodyJastrow< FT >::OffSet.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
Definition at line 255 of file TwoBodyJastrow.h.
References WaveFunctionComponent::myVars.
|
inline |
Definition at line 250 of file TwoBodyJastrow.h.
References TwoBodyJastrow< FT >::F.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
if true, this contains optimizable components
Reimplemented from WaveFunctionComponent.
Definition at line 171 of file TwoBodyJastrow.h.
|
inlineoverridevirtual |
Return the Chiesa kinetic energy correction.
Reimplemented from WaveFunctionComponent.
Definition at line 248 of file TwoBodyJastrow.h.
References TwoBodyJastrow< FT >::KEcorr.
|
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 386 of file TwoBodyJastrow.cpp.
|
overridevirtual |
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 633 of file TwoBodyJastrow.cpp.
References RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), WaveFunctionComponent::log_value_, WaveFunctionComponent::mw_accept_rejectMove(), and TwoBodyJastrow< FT >::N.
|
override |
Definition at line 460 of file TwoBodyJastrow.cpp.
References TwoBodyJastrow< FT >::cur_Uat, qmcplusplus::ewaldref::DIM, qmcplusplus::exp(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), WaveFunctionComponent::mw_calcRatio(), and TwoBodyJastrow< FT >::N.
|
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 792 of file TwoBodyJastrow.cpp.
References RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getLeader(), WaveFunctionComponent::log_value_, and WaveFunctionComponent::mw_evaluateGL().
|
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 746 of file TwoBodyJastrow.cpp.
References RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getLeader(), WaveFunctionComponent::log_value_, and WaveFunctionComponent::mw_evaluateLog().
|
override |
Definition at line 177 of file TwoBodyJastrow.cpp.
References qmcplusplus::exp(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), VirtualParticleSet::getTotalNum(), WaveFunctionComponent::mw_evaluateRatios(), and TwoBodyJastrow< FT >::mw_mem_handle_.
|
override |
Definition at line 544 of file TwoBodyJastrow.cpp.
References TwoBodyJastrow< FT >::cur_Uat, qmcplusplus::ewaldref::DIM, qmcplusplus::exp(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), WaveFunctionComponent::mw_ratioGrad(), and TwoBodyJastrow< FT >::N.
|
overridevirtual |
Reimplemented from WaveFunctionComponent.
Definition at line 718 of file TwoBodyJastrow.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), and WaveFunctionComponent::mw_recompute().
|
overridevirtual |
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 451 of file TwoBodyJastrow.cpp.
References qmcplusplus::exp(), ParticleSet::getDistTableAA(), and DistanceTableAA::getTempDists().
|
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 532 of file TwoBodyJastrow.cpp.
References qmcplusplus::simd::accumulate_n(), Vector< T, Alloc >::data(), qmcplusplus::exp(), ParticleSet::getDistTableAA(), DistanceTableAA::getTempDispls(), DistanceTableAA::getTempDists(), and qmcplusplus::Units::force::N.
|
overridevirtual |
recompute internal data assuming distance table is fully ready
Reimplemented from WaveFunctionComponent.
Definition at line 669 of file TwoBodyJastrow.cpp.
References qmcplusplus::simd::accumulate_n(), ParticleSet::first(), ParticleSet::getDistTableAA(), ParticleSet::last(), and qmcplusplus::Units::time::s.
|
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 220 of file TwoBodyJastrow.cpp.
References PooledMemory< T_scalar, Alloc >::add(), PooledMemory< T_scalar, Alloc >::current(), and PooledMemory< T_scalar, Alloc >::forward().
|
overridevirtual |
return a shared resource to a collection
Reimplemented from WaveFunctionComponent.
Definition at line 91 of file TwoBodyJastrow.cpp.
References qmcplusplus::ewaldref::DIM, VectorSoaContainer< T, D, Alloc >::free(), Vector< T, Alloc >::free(), RefVectorWithLeader< T >::getCastedElement(), RefVectorWithLeader< T >::getCastedLeader(), qmcplusplus::Units::force::N, and ResourceCollection::takebackResource().
|
private |
initialize storage Uat,dUat, d2Uat
Definition at line 335 of file TwoBodyJastrow.cpp.
References qmcplusplus::Units::force::N.
Referenced by TwoBodyJastrow< FT >::TwoBodyJastrow().
|
inlineprivate |
Definition at line 126 of file TwoBodyJastrow.h.
References TwoBodyJastrow< FT >::dLogPsi, TwoBodyJastrow< FT >::gradLogPsi, TwoBodyJastrow< FT >::lapLogPsi, WaveFunctionComponent::myVars, TwoBodyJastrow< FT >::N, Vector< T, Alloc >::resize(), and VariableSet::size().
|
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 226 of file TwoBodyJastrow.h.
|
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 TwoBodyJastrow.cpp.
References PooledMemory< T_scalar, Alloc >::forward(), ParticleSet::G, and ParticleSet::L.
|
private |
Definition at line 104 of file TwoBodyJastrow.h.
|
private |
Definition at line 104 of file TwoBodyJastrow.h.
|
private |
Definition at line 104 of file TwoBodyJastrow.h.
|
private |
Definition at line 103 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::mw_calcRatio(), and TwoBodyJastrow< FT >::mw_ratioGrad().
|
private |
Definition at line 102 of file TwoBodyJastrow.h.
|
private |
diff value
Definition at line 94 of file TwoBodyJastrow.h.
|
private |
Definition at line 106 of file TwoBodyJastrow.h.
|
private |
Definition at line 107 of file TwoBodyJastrow.h.
Definition at line 119 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::resizeWFOptVectors().
|
private |
Definition at line 100 of file TwoBodyJastrow.h.
|
private |
Container for . treat every pointer as a reference.
Definition at line 111 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::getPairFunctions(), and TwoBodyJastrow< FT >::TwoBodyJastrow().
|
private |
Definition at line 121 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::resizeWFOptVectors().
|
private |
the group_id of each particle
Definition at line 92 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::TwoBodyJastrow().
|
private |
Definition at line 115 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::ChiesaKEcorrection(), and TwoBodyJastrow< FT >::finalizeOptimization().
|
private |
Uniquue J2 set for cleanup.
Definition at line 109 of file TwoBodyJastrow.h.
|
private |
Correction.
Definition at line 96 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::ChiesaKEcorrection(), TwoBodyJastrow< FT >::finalizeOptimization(), TwoBodyJastrow< FT >::KECorrection(), and TwoBodyJastrow< FT >::TwoBodyJastrow().
|
protected |
laplacian prefactor
Definition at line 80 of file TwoBodyJastrow.h.
|
private |
Definition at line 122 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::resizeWFOptVectors().
|
private |
Definition at line 124 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::acquireResource(), and TwoBodyJastrow< FT >::mw_evaluateRatios().
|
private |
e-e table ID
Definition at line 113 of file TwoBodyJastrow.h.
|
protected |
number of particles
Definition at line 74 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::mw_accept_rejectMove(), TwoBodyJastrow< FT >::mw_calcRatio(), TwoBodyJastrow< FT >::mw_ratioGrad(), TwoBodyJastrow< FT >::resizeWFOptVectors(), and TwoBodyJastrow< FT >::TwoBodyJastrow().
|
private |
number of particles + padded
Definition at line 90 of file TwoBodyJastrow.h.
|
protected |
number of spatial dimensions
Definition at line 78 of file TwoBodyJastrow.h.
|
protected |
number of groups of the target particleset
Definition at line 76 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::TwoBodyJastrow().
|
private |
Map indices from subcomponent variables to component variables.
Definition at line 118 of file TwoBodyJastrow.h.
Referenced by TwoBodyJastrow< FT >::getComponentOffset().
|
private |
Definition at line 105 of file TwoBodyJastrow.h.
|
private |
Definition at line 105 of file TwoBodyJastrow.h.
|
private |
Definition at line 105 of file TwoBodyJastrow.h.
|
private |
Definition at line 98 of file TwoBodyJastrow.h.
|
private |
if true use offload
Definition at line 84 of file TwoBodyJastrow.h.
class qmcplusplus::WaveFunctionComponent |
An abstract class for a component of a many-body trial wave function.
mw_ prefix is a function name signature indicating it is for handling a batch of WaveFunctionComponent objects which are required to be base class pointers of the same derived class type. all the mw_ routines must be implemented in a way either stateless or maintains states of every walker.
Definition at line 59 of file WaveFunctionComponent.h.
Public Types | |
enum | { ORB_PBYP_RATIO, ORB_PBYP_ALL, ORB_PBYP_PARTIAL, ORB_WALKER, ORB_ALLWALKER } |
enum for a update mode More... | |
using | Walker_t = ParticleSet::Walker_t |
using | WFBufferType = Walker_t::WFBuffer_t |
using | BufferType = Walker_t::Buffer_t |
using | RealMatrix_t = OrbitalSetTraits< RealType >::ValueMatrix |
using | ValueVector = OrbitalSetTraits< ValueType >::ValueVector |
using | ValueMatrix = OrbitalSetTraits< ValueType >::ValueMatrix |
using | GradMatrix = OrbitalSetTraits< ValueType >::GradMatrix |
using | HessType = OrbitalSetTraits< ValueType >::HessType |
using | HessVector = OrbitalSetTraits< ValueType >::HessVector |
using | LogValue = std::complex< QTFull::RealType > |
using | PsiValue = QTFull::ValueType |
![]() | |
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 | |
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... | |
virtual std::string | getClassName () const =0 |
return class name More... | |
PsiValue | getValue () const |
assembles the full value More... | |
virtual bool | isFermionic () const |
true, if this component is fermionic More... | |
virtual bool | isMultiDet () const |
true, if this component is multi-determinant More... | |
virtual void | checkOutVariables (const opt_variables_type &active) |
check out variational optimizable variables More... | |
virtual void | registerTWFFastDerivWrapper (const ParticleSet &P, TWFFastDerivWrapper &twf) const |
Register the component with the TWFFastDerivWrapper wrapper. 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_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 | mw_recompute (const RefVectorWithLeader< WaveFunctionComponent > &wfc_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< bool > &recompute) const |
virtual void | evaluateHessian (ParticleSet &P, HessVector &grad_grad_psi_all) |
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 |
virtual GradType | evalGrad (ParticleSet &P, int iat) |
return the current gradient for the iat-th particle More... | |
virtual GradType | evalGradWithSpin (ParticleSet &P, int iat, ComplexType &spingrad) |
return the current spin gradient for the iat-th particle Default implementation assumes that WaveFunctionComponent does not explicitly depend on Spin. 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... | |
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 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 PsiValue | ratioGradWithSpin (ParticleSet &P, int iat, GradType &grad_iat, ComplexType &spingrad_iat) |
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... | |
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 void | acceptMove (ParticleSet &P, int iat, bool safe_to_delay=false)=0 |
a move for iat-th particle is accepted. 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 | completeUpdates () |
complete all the delayed or asynchronous operations before leaving the p-by-p move region. 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... | |
virtual void | restore (int iat)=0 |
If a move for iat-th particle is rejected, restore to the content. More... | |
virtual PsiValue | ratio (ParticleSet &P, int iat)=0 |
evaluate the ratio of the new to old WaveFunctionComponent value 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 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 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 | 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 | copyFromBuffer (ParticleSet &P, WFBufferType &buf)=0 |
For particle-by-particle move. 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< WaveFunctionComponent > &wfc_list) const |
acquire a shared resource from a collection More... | |
virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< WaveFunctionComponent > &wfc_list) const |
return a shared resource to a collection More... | |
virtual std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const |
make clone More... | |
virtual RealType | KECorrection () |
Return the Chiesa kinetic energy correction. More... | |
virtual bool | isOptimizable () const |
if true, this contains optimizable components More... | |
virtual void | extractOptimizableObjectRefs (UniqueOptObjRefs &opt_obj_refs) |
extract underlying OptimizableObject references 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 void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi) |
Compute the derivatives of the log of the wavefunction with respect to optimizable parameters. More... | |
virtual void | evaluateGradDerivatives (const ParticleSet::ParticleGradient &G_in, std::vector< ValueType > &dgradlogpsi) |
Calculates the derivatives of ![]() | |
virtual void | finalizeOptimization () |
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 | evaluateRatios (const VirtualParticleSet &VP, std::vector< ValueType > &ratios) |
evaluate ratios to evaluate the non-local PP 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... | |
virtual void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios) |
evaluate ratios to evaluate the non-local PP More... | |
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... | |
Public Attributes | |
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... | |
Protected Attributes | |
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 ![]() | |
using BufferType = Walker_t::Buffer_t |
Definition at line 74 of file WaveFunctionComponent.h.
using GradMatrix = OrbitalSetTraits<ValueType>::GradMatrix |
Definition at line 78 of file WaveFunctionComponent.h.
using HessType = OrbitalSetTraits<ValueType>::HessType |
Definition at line 79 of file WaveFunctionComponent.h.
using HessVector = OrbitalSetTraits<ValueType>::HessVector |
Definition at line 80 of file WaveFunctionComponent.h.
using LogValue = std::complex<QTFull::RealType> |
Definition at line 83 of file WaveFunctionComponent.h.
using PsiValue = QTFull::ValueType |
Definition at line 85 of file WaveFunctionComponent.h.
using RealMatrix_t = OrbitalSetTraits<RealType>::ValueMatrix |
Definition at line 75 of file WaveFunctionComponent.h.
using ValueMatrix = OrbitalSetTraits<ValueType>::ValueMatrix |
Definition at line 77 of file WaveFunctionComponent.h.
using ValueVector = OrbitalSetTraits<ValueType>::ValueVector |
Definition at line 76 of file WaveFunctionComponent.h.
using Walker_t = ParticleSet::Walker_t |
Definition at line 72 of file WaveFunctionComponent.h.
using WFBufferType = Walker_t::WFBuffer_t |
Definition at line 73 of file WaveFunctionComponent.h.
anonymous enum |
enum for a update mode
Definition at line 63 of file WaveFunctionComponent.h.
WaveFunctionComponent | ( | const std::string & | obj_name = "" | ) |
default constructor
Definition at line 25 of file WaveFunctionComponent.cpp.
|
virtualdefault |
default destructor
|
pure virtual |
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. |
Implemented in J1OrbitalSoA< FT >, J1Spin< FT >, JeeIOrbitalSoA< FT >, CountingJastrow< RegionType >, TwoBodyJastrow< FT >, DiracDeterminantBatched< PL, VT, FPVT >, MultiDiracDeterminant, SlaterDet, kSpaceJastrow, MultiSlaterDetTableMethod, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, SlaterDetWithBackflow, RPAJastrow, AGPDeterminant, LatticeGaussianProduct, LinearOrbital, ExampleHeComponent, DummyDiracDetWithoutMW, and ConstantOrbital.
|
inlinevirtual |
acquire a shared resource from a collection
Reimplemented in DiracDeterminantBatched< PL, VT, FPVT >, J1OrbitalSoA< FT >, DiracDeterminant< DU_TYPE >, MultiSlaterDetTableMethod, TwoBodyJastrow< FT >, and SlaterDet.
Definition at line 430 of file WaveFunctionComponent.h.
|
virtual |
check out variational optimizable variables
active | a super set of optimizable variables |
Reimplemented in J1OrbitalSoA< FT >, J1Spin< FT >, JeeIOrbitalSoA< FT >, TwoBodyJastrow< FT >, kSpaceJastrow, MultiDiracDeterminant, CountingJastrow< RegionType >, MultiSlaterDetTableMethod, DiracDeterminantBase, RPAJastrow, SlaterDet, SlaterDetWithBackflow, and ExampleHeComponent.
Definition at line 205 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::getClassName(), and WaveFunctionComponent::isOptimizable().
Referenced by RPAJastrow::checkOutVariables(), and qmcplusplus::test_J3_polynomial3D().
|
inlinevirtual |
Validate the internal consistency of the object.
Reimplemented in J1OrbitalSoA< FT >, and TwoBodyJastrow< FT >.
Definition at line 117 of file WaveFunctionComponent.h.
|
inlinevirtual |
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 in SlaterDet, DiracDeterminantBatched< PL, VT, FPVT >, and DiracDeterminant< DU_TYPE >.
Definition at line 338 of file WaveFunctionComponent.h.
Referenced by WaveFunctionComponent::mw_completeUpdates().
|
pure virtual |
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 |
Implemented in JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, J1Spin< FT >, CountingJastrow< RegionType >, TwoBodyJastrow< FT >, MultiDiracDeterminant, kSpaceJastrow, MultiSlaterDetTableMethod, DiracDeterminantBatched< PL, VT, FPVT >, SlaterDet, DiracDeterminant< DU_TYPE >, RPAJastrow, DiracDeterminantWithBackflow, DummyDiracDetWithoutMW, LinearOrbital, ExampleHeComponent, LatticeGaussianProduct, SlaterDetWithBackflow, AGPDeterminant, and ConstantOrbital.
|
inlinevirtual |
initialize a shared resource and hand it to a collection
Reimplemented in DiracDeterminantBatched< PL, VT, FPVT >, J1OrbitalSoA< FT >, MultiDiracDeterminant, DiracDeterminant< DU_TYPE >, MultiSlaterDetTableMethod, TwoBodyJastrow< FT >, and SlaterDet.
Definition at line 426 of file WaveFunctionComponent.h.
Referenced by qmcplusplus::test_J3_polynomial3D().
|
inlinevirtual |
return the current gradient for the iat-th particle
P | quantum particle set |
iat | particle index |
Reimplemented in JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, J1Spin< FT >, CountingJastrow< RegionType >, MultiDiracDeterminant, TwoBodyJastrow< FT >, DiracDeterminantBatched< PL, VT, FPVT >, kSpaceJastrow, SlaterDet, MultiSlaterDetTableMethod, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, SlaterDetWithBackflow, RPAJastrow, LatticeGaussianProduct, LinearOrbital, ExampleHeComponent, ConstantOrbital, and DummyDiracDetWithoutMW.
Definition at line 206 of file WaveFunctionComponent.h.
References APP_ABORT, and WaveFunctionComponent::getClassName().
Referenced by WaveFunctionComponent::evalGradWithSpin(), and WaveFunctionComponent::mw_evalGrad().
|
inlinevirtual |
return the logarithmic gradient for the iat-th particle of the source particleset
Pquantum | particle set |
iat | particle index |
Reimplemented in JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, J1Spin< FT >, DiracDeterminantBatched< PL, VT, FPVT >, SlaterDet, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, and SlaterDetWithBackflow.
Definition at line 247 of file WaveFunctionComponent.h.
|
inlinevirtual |
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 in JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, J1Spin< FT >, DiracDeterminantBatched< PL, VT, FPVT >, SlaterDet, DiracDeterminant< DU_TYPE >, and SlaterDetWithBackflow.
Definition at line 264 of file WaveFunctionComponent.h.
|
inlinevirtual |
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 in DiracDeterminantBatched< PL, VT, FPVT >, DiracDeterminantBase, SlaterDet, MultiSlaterDetTableMethod, DiracDeterminant< DU_TYPE >, and DummyDiracDetWithoutMW.
Definition at line 219 of file WaveFunctionComponent.h.
References WaveFunctionComponent::evalGrad().
|
pure virtual |
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. ![]() ![]() ![]() ![]() |
Implemented in SlaterDet, SlaterDetWithBackflow, AGPDeterminant, RPAJastrow, DummyDiracDetWithoutMW, LinearOrbital, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, ConstantOrbital, and ExampleHeComponent.
Referenced by qmcplusplus::test_J3_polynomial3D().
|
virtual |
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 in SlaterDet, DiracDeterminantBatched< PL, VT, FPVT >, DiracDeterminantBase, and DiracDeterminant< DU_TYPE >.
Definition at line 213 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::getClassName().
Referenced by qmcplusplus::test_J3_polynomial3D().
|
virtual |
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 in DiracDeterminantBatched< PL, VT, FPVT >, DiracDeterminant< DU_TYPE >, and SlaterDet.
Definition at line 259 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evaluateRatios().
Referenced by qmcplusplus::test_J3_polynomial3D().
|
virtual |
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 in JeeIOrbitalSoA< FT >, J1Spin< FT >, DiracDeterminantBatched< PL, VT, FPVT >, TwoBodyJastrow< FT >, DiracDeterminant< DU_TYPE >, J1OrbitalSoA< FT >, and SlaterDet.
Definition at line 178 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evaluateLog().
Referenced by WaveFunctionComponent::mw_evaluateGL().
|
inlinevirtual |
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 in SlaterDet.
Definition at line 496 of file WaveFunctionComponent.h.
References APP_ABORT, and WaveFunctionComponent::getClassName().
|
inlinevirtual |
Reimplemented in DiracDeterminantBatched< PL, VT, FPVT >, J1OrbitalSoA< FT >, DiracDeterminant< DU_TYPE >, TwoBodyJastrow< FT >, J1Spin< FT >, and SlaterDet.
Definition at line 182 of file WaveFunctionComponent.h.
References APP_ABORT, and WaveFunctionComponent::getClassName().
|
pure virtual |
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
Implemented in JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, MultiDiracDeterminant, DiracDeterminantBatched< PL, VT, FPVT >, CountingJastrow< RegionType >, TwoBodyJastrow< FT >, DiracDeterminant< DU_TYPE >, J1Spin< FT >, kSpaceJastrow, MultiSlaterDetTableMethod, AGPDeterminant, RPAJastrow, SlaterDetWithBackflow, SlaterDet, LatticeGaussianProduct, ExampleHeComponent, LinearOrbital, DummyDiracDetWithoutMW, and ConstantOrbital.
Referenced by WaveFunctionComponent::evaluateGL(), WaveFunctionComponent::mw_evaluateLog(), WaveFunctionComponent::recompute(), and qmcplusplus::test_J3_polynomial3D().
|
virtual |
evaluate ratios to evaluate the non-local PP
VP | VirtualParticleSet |
ratios | ratios with new positions VP.R[k] the VP.refPtcl |
Reimplemented in DiracDeterminant< DU_TYPE >, and SlaterDet.
Definition at line 238 of file WaveFunctionComponent.cpp.
References APP_ABORT, and WaveFunctionComponent::getClassName().
Referenced by WaveFunctionComponent::evaluateDerivRatios(), WaveFunctionComponent::evaluateSpinorRatios(), WaveFunctionComponent::mw_evaluateRatios(), and qmcplusplus::test_J3_polynomial3D().
|
virtual |
evaluate the ratios of one virtual move with respect to all the particles
P | reference particleset |
ratios | ![]() |
Reimplemented in SlaterDet, DiracDeterminant< DU_TYPE >, SlaterDetWithBackflow, and DiracDeterminantWithBackflow.
Definition at line 231 of file WaveFunctionComponent.cpp.
References ParticleSet::getTotalNum(), and WaveFunctionComponent::ratio().
Referenced by qmcplusplus::test_J3_polynomial3D().
|
virtual |
Used by SOECPComponent for faster SOC evaluation.
Reimplemented in DiracDeterminant< DU_TYPE >, and SlaterDet.
Definition at line 245 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evaluateRatios().
|
virtual |
extract underlying OptimizableObject references
opt_obj_refs | aggregated list of optimizable object references |
Reimplemented in J1OrbitalSoA< FT >, J1Spin< FT >, JeeIOrbitalSoA< FT >, TwoBodyJastrow< FT >, kSpaceJastrow, MultiDiracDeterminant, CountingJastrow< RegionType >, MultiSlaterDetTableMethod, DiracDeterminantBase, RPAJastrow, SlaterDet, SlaterDetWithBackflow, and ExampleHeComponent.
Definition at line 197 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::getClassName(), and WaveFunctionComponent::isOptimizable().
Referenced by RPAJastrow::extractOptimizableObjectRefs(), and qmcplusplus::test_J3_polynomial3D().
|
inlinevirtual |
Reimplemented in TwoBodyJastrow< FT >.
Definition at line 502 of file WaveFunctionComponent.h.
|
inline |
Definition at line 109 of file WaveFunctionComponent.h.
References WaveFunctionComponent::log_value_.
Referenced by SlaterDet::acceptMove(), SlaterDet::mw_accept_rejectMove(), and qmcplusplus::TEST_CASE().
|
pure virtual |
return class name
Implemented in J1OrbitalSoA< FT >, TwoBodyJastrow< FT >, JeeIOrbitalSoA< FT >, kSpaceJastrow, MultiDiracDeterminant, J1Spin< FT >, DiracDeterminantBatched< PL, VT, FPVT >, CountingJastrow< RegionType >, MultiSlaterDetTableMethod, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, AGPDeterminant, LatticeGaussianProduct, SlaterDet, RPAJastrow, SlaterDetWithBackflow, ExampleHeComponent, LinearOrbital, DummyDiracDetWithoutMW, and ConstantOrbital.
Referenced by WaveFunctionComponent::checkOutVariables(), WaveFunctionComponent::evalGrad(), WaveFunctionComponent::evaluateDerivativesWF(), WaveFunctionComponent::evaluateGradDerivatives(), WaveFunctionComponent::evaluateHessian(), WaveFunctionComponent::evaluateRatios(), WaveFunctionComponent::extractOptimizableObjectRefs(), WaveFunctionComponent::makeClone(), WaveFunctionComponent::ratioGrad(), and WaveFunctionComponent::registerTWFFastDerivWrapper().
|
inline |
return object name
Definition at line 120 of file WaveFunctionComponent.h.
References WaveFunctionComponent::my_name_.
|
inline |
assembles the full value
Definition at line 126 of file WaveFunctionComponent.h.
References LogToValue< T >::convert(), and WaveFunctionComponent::log_value_.
|
inlinevirtual |
true, if this component is fermionic
Reimplemented in MultiDiracDeterminant, MultiSlaterDetTableMethod, DiracDeterminantBase, SlaterDet, and SlaterDetWithBackflow.
Definition at line 129 of file WaveFunctionComponent.h.
|
inlinevirtual |
true, if this component is multi-determinant
Reimplemented in MultiSlaterDetTableMethod.
Definition at line 132 of file WaveFunctionComponent.h.
|
inlinevirtual |
if true, this contains optimizable components
Reimplemented in J1OrbitalSoA< FT >, J1Spin< FT >, JeeIOrbitalSoA< FT >, TwoBodyJastrow< FT >, kSpaceJastrow, MultiDiracDeterminant, CountingJastrow< RegionType >, MultiSlaterDetTableMethod, DiracDeterminantBase, RPAJastrow, SlaterDet, SlaterDetWithBackflow, and ExampleHeComponent.
Definition at line 454 of file WaveFunctionComponent.h.
Referenced by WaveFunctionComponent::checkOutVariables(), and WaveFunctionComponent::extractOptimizableObjectRefs().
|
virtual |
Return the Chiesa kinetic energy correction.
Reimplemented in TwoBodyJastrow< FT >.
Definition at line 229 of file WaveFunctionComponent.cpp.
|
virtual |
make clone
tqp | target Quantum ParticleSet |
deepcopy | if true, make a decopy |
If not true, return a proxy class
Reimplemented in J1OrbitalSoA< FT >, J1Spin< FT >, CountingJastrow< RegionType >, SlaterDet, MultiDiracDeterminant, kSpaceJastrow, MultiSlaterDetTableMethod, TwoBodyJastrow< FT >, JeeIOrbitalSoA< FT >, DiracDeterminantBase, SlaterDetWithBackflow, AGPDeterminant, RPAJastrow, ExampleHeComponent, LatticeGaussianProduct, and ConstantOrbital.
Definition at line 223 of file WaveFunctionComponent.cpp.
References APP_ABORT, and WaveFunctionComponent::getClassName().
Referenced by qmcplusplus::test_J3_polynomial3D().
|
virtual |
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 in TwoBodyJastrow< FT >, DiracDeterminantBatched< PL, VT, FPVT >, SlaterDet, MultiSlaterDetTableMethod, and DiracDeterminant< DU_TYPE >.
Definition at line 157 of file WaveFunctionComponent.cpp.
References RefVectorWithLeader< T >::getLeader().
Referenced by TwoBodyJastrow< FT >::mw_accept_rejectMove().
|
virtual |
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 in SlaterDet.
Definition at line 104 of file WaveFunctionComponent.cpp.
References RefVectorWithLeader< T >::getLeader(), and WaveFunctionComponent::ratio().
Referenced by MultiSlaterDetTableMethod::mw_calcRatio(), and TwoBodyJastrow< FT >::mw_calcRatio().
|
virtual |
complete all the delayed or asynchronous operations for all the walkers in a batch before leaving the p-by-p move region.
Reimplemented in SlaterDet, DiracDeterminantBatched< PL, VT, FPVT >, and DiracDeterminant< DU_TYPE >.
Definition at line 171 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::completeUpdates(), and RefVectorWithLeader< T >::getLeader().
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
[out] | grad_now | the list of gradients in a walker batch, ![]() |
Definition at line 69 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::mw_evalGradWithSpin(), and qmcplusplus::POS_SPIN.
Referenced by MultiSlaterDetTableMethod::mw_evalGrad().
|
virtual |
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 in SlaterDet, MultiSlaterDetTableMethod, and DummyDiracDetWithMW.
Definition at line 80 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evalGrad(), and RefVectorWithLeader< T >::getLeader().
|
virtual |
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 in SlaterDet, and DummyDiracDetWithMW.
Definition at line 90 of file WaveFunctionComponent.cpp.
References RefVectorWithLeader< T >::getLeader().
Referenced by WaveFunctionComponent::mw_evalGrad().
|
virtual |
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 in DiracDeterminantBatched< PL, VT, FPVT >, TwoBodyJastrow< FT >, and SlaterDet.
Definition at line 186 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evaluateGL(), and RefVectorWithLeader< T >::getLeader().
Referenced by TwoBodyJastrow< FT >::mw_evaluateGL().
|
virtual |
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 in DiracDeterminantBatched< PL, VT, FPVT >, TwoBodyJastrow< FT >, and SlaterDet.
Definition at line 31 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evaluateLog(), and RefVectorWithLeader< T >::getLeader().
Referenced by TwoBodyJastrow< FT >::mw_evaluateLog().
|
virtual |
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 in SlaterDet, and DiracDeterminant< DU_TYPE >.
Definition at line 250 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evaluateRatios(), and RefVectorWithLeader< T >::getLeader().
Referenced by TwoBodyJastrow< FT >::mw_evaluateRatios(), J1OrbitalSoA< FT >::mw_evaluateRatios(), and qmcplusplus::test_J3_polynomial3D().
|
virtual |
Reimplemented in MultiSlaterDetTableMethod.
Definition at line 59 of file WaveFunctionComponent.cpp.
References RefVectorWithLeader< T >::getLeader(), and WaveFunctionComponent::prepareGroup().
void mw_ratioGrad | ( | const RefVectorWithLeader< WaveFunctionComponent > & | wfc_list, |
const RefVectorWithLeader< ParticleSet > & | p_list, | ||
int | iat, | ||
std::vector< PsiValue > & | ratios, | ||
TWFGrads< CT > & | grad_new | ||
) | const |
Definition at line 122 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::mw_ratioGradWithSpin(), and qmcplusplus::POS_SPIN.
Referenced by MultiSlaterDetTableMethod::mw_ratioGrad(), and TwoBodyJastrow< FT >::mw_ratioGrad().
|
virtual |
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 in SlaterDet, DiracDeterminant< DU_TYPE >, and DummyDiracDetWithMW.
Definition at line 134 of file WaveFunctionComponent.cpp.
References RefVectorWithLeader< T >::getLeader(), and WaveFunctionComponent::ratioGrad().
|
virtual |
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 in SlaterDet, and DummyDiracDetWithMW.
Definition at line 145 of file WaveFunctionComponent.cpp.
References RefVectorWithLeader< T >::getLeader(), and WaveFunctionComponent::ratioGradWithSpin().
Referenced by WaveFunctionComponent::mw_ratioGrad().
|
virtual |
Reimplemented in DiracDeterminantBatched< PL, VT, FPVT >, TwoBodyJastrow< FT >, and SlaterDet.
Definition at line 49 of file WaveFunctionComponent.cpp.
References RefVectorWithLeader< T >::getLeader(), and WaveFunctionComponent::recompute().
Referenced by TwoBodyJastrow< FT >::mw_recompute(), and qmcplusplus::test_J3_polynomial3D().
|
inlinevirtual |
Prepare internal data for updating WFC correspond to a particle group It should be called before moving particles of a given group.
This call can be used to handle the precomputation of data used for moving this group of particle. Such data should be static with respect to the moves of particles within this group. Particle groups usually correspond to determinants of different spins.
P | quantum particle set |
ig | particle group index |
Reimplemented in MultiSlaterDetTableMethod.
Definition at line 195 of file WaveFunctionComponent.h.
Referenced by WaveFunctionComponent::mw_prepareGroup().
|
pure virtual |
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
Implemented in CountingJastrow< RegionType >, JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, SlaterDet, MultiDiracDeterminant, J1Spin< FT >, TwoBodyJastrow< FT >, kSpaceJastrow, MultiSlaterDetTableMethod, DiracDeterminantBatched< PL, VT, FPVT >, SlaterDetWithBackflow, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, RPAJastrow, AGPDeterminant, LinearOrbital, LatticeGaussianProduct, ExampleHeComponent, ConstantOrbital, and DummyDiracDetWithoutMW.
Referenced by WaveFunctionComponent::evaluateRatiosAlltoOne(), WaveFunctionComponent::mw_calcRatio(), and qmcplusplus::test_J3_polynomial3D().
|
virtual |
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 in J1OrbitalSoA< FT >, J1Spin< FT >, JeeIOrbitalSoA< FT >, CountingJastrow< RegionType >, MultiDiracDeterminant, TwoBodyJastrow< FT >, kSpaceJastrow, MultiSlaterDetTableMethod, SlaterDet, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, RPAJastrow, LatticeGaussianProduct, SlaterDetWithBackflow, LinearOrbital, DummyDiracDetWithoutMW, ExampleHeComponent, and ConstantOrbital.
Definition at line 115 of file WaveFunctionComponent.cpp.
References APP_ABORT, and WaveFunctionComponent::getClassName().
Referenced by WaveFunctionComponent::mw_ratioGrad(), and WaveFunctionComponent::ratioGradWithSpin().
|
inlinevirtual |
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 in MultiSlaterDetTableMethod, DiracDeterminantBase, SlaterDet, DiracDeterminant< DU_TYPE >, and DummyDiracDetWithoutMW.
Definition at line 288 of file WaveFunctionComponent.h.
References WaveFunctionComponent::ratioGrad().
Referenced by WaveFunctionComponent::mw_ratioGradWithSpin().
|
virtual |
recompute the value of the WaveFunctionComponents which require critical accuracy.
needed for Slater Determinants but not needed for most types of WaveFunctionComponents
Reimplemented in JeeIOrbitalSoA< FT >, DiracDeterminantBatched< PL, VT, FPVT >, J1OrbitalSoA< FT >, CountingJastrow< RegionType >, TwoBodyJastrow< FT >, DiracDeterminant< DU_TYPE >, J1Spin< FT >, and SlaterDet.
Definition at line 41 of file WaveFunctionComponent.cpp.
References WaveFunctionComponent::evaluateLog(), and ParticleSet::getTotalNum().
Referenced by WaveFunctionComponent::mw_recompute().
|
pure virtual |
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 |
Implemented in JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, J1Spin< FT >, CountingJastrow< RegionType >, TwoBodyJastrow< FT >, MultiDiracDeterminant, kSpaceJastrow, MultiSlaterDetTableMethod, DiracDeterminantBatched< PL, VT, FPVT >, SlaterDet, RPAJastrow, DiracDeterminant< DU_TYPE >, DiracDeterminantWithBackflow, DummyDiracDetWithoutMW, LinearOrbital, ExampleHeComponent, SlaterDetWithBackflow, LatticeGaussianProduct, AGPDeterminant, and ConstantOrbital.
|
virtual |
Register the component with the TWFFastDerivWrapper wrapper.
Reimplemented in DiracDeterminantBatched< PL, VT, FPVT >, DiracDeterminant< DU_TYPE >, DiracDeterminantBase, and SlaterDet.
Definition at line 268 of file WaveFunctionComponent.cpp.
References APP_ABORT, and WaveFunctionComponent::getClassName().
|
inlinevirtual |
return a shared resource to a collection
Reimplemented in DiracDeterminantBatched< PL, VT, FPVT >, J1OrbitalSoA< FT >, DiracDeterminant< DU_TYPE >, MultiSlaterDetTableMethod, TwoBodyJastrow< FT >, and SlaterDet.
Definition at line 436 of file WaveFunctionComponent.h.
|
pure virtual |
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
Implemented in J1OrbitalSoA< FT >, J1Spin< FT >, JeeIOrbitalSoA< FT >, CountingJastrow< RegionType >, TwoBodyJastrow< FT >, DiracDeterminantBatched< PL, VT, FPVT >, MultiDiracDeterminant, SlaterDet, kSpaceJastrow, DiracDeterminant< DU_TYPE >, MultiSlaterDetTableMethod, DiracDeterminantWithBackflow, SlaterDetWithBackflow, RPAJastrow, AGPDeterminant, LatticeGaussianProduct, LinearOrbital, ExampleHeComponent, ConstantOrbital, and DummyDiracDetWithoutMW.
|
pure virtual |
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 |
Implemented in JeeIOrbitalSoA< FT >, J1OrbitalSoA< FT >, J1Spin< FT >, CountingJastrow< RegionType >, TwoBodyJastrow< FT >, MultiDiracDeterminant, kSpaceJastrow, MultiSlaterDetTableMethod, DiracDeterminantBatched< PL, VT, FPVT >, SlaterDet, DiracDeterminant< DU_TYPE >, RPAJastrow, DiracDeterminantWithBackflow, DummyDiracDetWithoutMW, LinearOrbital, ExampleHeComponent, LatticeGaussianProduct, SlaterDetWithBackflow, AGPDeterminant, and ConstantOrbital.
size_t Bytes_in_WFBuffer |
Bytes in WFBuffer.
Definition at line 92 of file WaveFunctionComponent.h.
Referenced by J1OrbitalSoA< FT >::registerData(), J1Spin< FT >::registerData(), JeeIOrbitalSoA< FT >::registerData(), J1Spin< FT >::updateBuffer(), J1OrbitalSoA< FT >::updateBuffer(), and JeeIOrbitalSoA< FT >::updateBuffer().
|
protected |
Current .
Exception! Slater Determinant most of the time has inconsistent a log_value inconsistent with the determinants it contains dduring a move sequence. That case the log_value_ would be more safely calculated on the fly.
There could be others.
Definition at line 106 of file WaveFunctionComponent.h.
Referenced by AGPDeterminant::acceptMove(), DiracDeterminantWithBackflow::acceptMove(), MultiSlaterDetTableMethod::acceptMove(), SlaterDet::acceptMove(), CountingJastrow< RegionType >::acceptMove(), JeeIOrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::acceptMove(), J1Spin< FT >::acceptMove(), AGPDeterminant::copyFromBuffer(), DiracDeterminantWithBackflow::copyFromBuffer(), MultiSlaterDetTableMethod::copyFromBuffer(), DiracDeterminantWithBackflow::dummyEvalLi(), CountingJastrow< RegionType >::evalGrad(), DiracDeterminantWithBackflow::evaluateDerivatives(), SlaterDet::evaluateGL(), J1OrbitalSoA< FT >::evaluateGL(), J1Spin< FT >::evaluateGL(), JeeIOrbitalSoA< FT >::evaluateGL(), LinearOrbital::evaluateLog(), ExampleHeComponent::evaluateLog(), LatticeGaussianProduct::evaluateLog(), SlaterDet::evaluateLog(), SlaterDetWithBackflow::evaluateLog(), RPAJastrow::evaluateLog(), AGPDeterminant::evaluateLog(), DiracDeterminantWithBackflow::evaluateLog(), MultiSlaterDetTableMethod::evaluateLog(), J1Spin< FT >::evaluateLog(), CountingJastrow< RegionType >::evaluateLog(), J1OrbitalSoA< FT >::evaluateLog(), JeeIOrbitalSoA< FT >::evaluateLog(), LatticeGaussianProduct::evaluateLogAndStore(), AGPDeterminant::evaluateLogAndStore(), WaveFunctionComponent::get_log_value(), WaveFunctionComponent::getValue(), SlaterDet::mw_accept_rejectMove(), TwoBodyJastrow< FT >::mw_accept_rejectMove(), SlaterDet::mw_evaluateGL(), TwoBodyJastrow< FT >::mw_evaluateGL(), SlaterDet::mw_evaluateLog(), TwoBodyJastrow< FT >::mw_evaluateLog(), DiracDeterminantWithBackflow::ratio(), DiracDeterminantWithBackflow::ratioGrad(), CountingJastrow< RegionType >::recompute(), AGPDeterminant::registerData(), DiracDeterminantWithBackflow::registerData(), MultiSlaterDetTableMethod::registerData(), kSpaceJastrow::registerData(), DiracDeterminantWithBackflow::testDerivFjj(), DiracDeterminantWithBackflow::testL(), AGPDeterminant::updateBuffer(), SlaterDetWithBackflow::updateBuffer(), LatticeGaussianProduct::updateBuffer(), DiracDeterminantWithBackflow::updateBuffer(), RPAJastrow::updateBuffer(), SlaterDet::updateBuffer(), MultiSlaterDetTableMethod::updateBuffer(), kSpaceJastrow::updateBuffer(), J1OrbitalSoA< FT >::updateBuffer(), J1Spin< FT >::updateBuffer(), and JeeIOrbitalSoA< FT >::updateBuffer().
|
protected |
Name of the object It is required to be different for objects of the same derived type like multiple J1.
It can be left empty for object which is unique per many-body WF.
Definition at line 99 of file WaveFunctionComponent.h.
Referenced by WaveFunctionComponent::getName(), J1OrbitalSoA< FT >::J1OrbitalSoA(), J1Spin< FT >::J1Spin(), JeeIOrbitalSoA< FT >::JeeIOrbitalSoA(), JeeIOrbitalSoA< FT >::makeClone(), J1OrbitalSoA< FT >::makeClone(), RPAJastrow::makeShortRange(), and TwoBodyJastrow< FT >::TwoBodyJastrow().
opt_variables_type myVars |
list of variables this WaveFunctionComponent handles
Definition at line 90 of file WaveFunctionComponent.h.
Referenced by CountingJastrow< RegionType >::checkInVariablesExclusive(), kSpaceJastrow::checkInVariablesExclusive(), SlaterDet::checkOutVariables(), CountingJastrow< RegionType >::checkOutVariables(), kSpaceJastrow::checkOutVariables(), JeeIOrbitalSoA< FT >::checkOutVariables(), kSpaceJastrow::copyFrom(), kSpaceJastrow::evaluateDerivatives(), SlaterDet::evaluateDerivatives(), CountingJastrow< RegionType >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), SlaterDet::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), TwoBodyJastrow< FT >::getComponentVars(), CountingJastrow< RegionType >::initialize(), kSpaceJastrow::kSpaceJastrow(), JeeIOrbitalSoA< FT >::makeClone(), CountingJastrow< RegionType >::reportStatus(), CountingJastrow< RegionType >::resetParametersExclusive(), kSpaceJastrow::resetParametersExclusive(), JeeIOrbitalSoA< FT >::resizeWFOptVectors(), TwoBodyJastrow< FT >::resizeWFOptVectors(), and kSpaceJastrow::setCoefficients().
int UpdateMode |
current update mode
Definition at line 88 of file WaveFunctionComponent.h.
Referenced by AGPDeterminant::acceptMove(), DiracDeterminantWithBackflow::acceptMove(), MultiDiracDeterminant::acceptMove(), JeeIOrbitalSoA< FT >::acceptMove(), J1OrbitalSoA< FT >::acceptMove(), J1Spin< FT >::acceptMove(), MultiDiracDeterminant::evaluateDetsAndGradsForPtclMove(), MultiDiracDeterminant::evaluateDetsAndGradsForPtclMoveWithSpin(), MultiDiracDeterminant::evaluateDetsForPtclMove(), MultiDiracDeterminant::mw_evaluateDetsAndGradsForPtclMove(), MultiDiracDeterminant::mw_evaluateDetsForPtclMove(), AGPDeterminant::ratio(), DiracDeterminantWithBackflow::ratio(), MultiSlaterDetTableMethod::ratio(), J1Spin< FT >::ratio(), J1OrbitalSoA< FT >::ratio(), JeeIOrbitalSoA< FT >::ratio(), DiracDeterminantWithBackflow::ratioGrad(), MultiSlaterDetTableMethod::ratioGrad(), JeeIOrbitalSoA< FT >::ratioGrad(), J1Spin< FT >::ratioGrad(), J1OrbitalSoA< FT >::ratioGrad(), MultiSlaterDetTableMethod::ratioGradWithSpin(), AGPDeterminant::restore(), and MultiDiracDeterminant::updateBuffer().