![]() |
QMCPACK
|
Inheritance diagram for kSpaceJastrow:
Collaboration diagram for kSpaceJastrow:Public Member Functions | |
| kSpaceJastrow (const ParticleSet &ions, ParticleSet &elecs, SymmetryType oneBodySymm, RealType oneBodyCutoff, std::string onebodyid, bool oneBodySpin, SymmetryType twoBodySymm, RealType twoBodyCutoff, std::string twobodyid, bool twoBodySpin) | |
| kSpaceJastrow (const ParticleSet &ions) | |
| constructor to initialize Ions More... | |
| void | setCoefficients (std::vector< RealType > &oneBodyCoefs, std::vector< RealType > &twoBodyCoefs) |
| std::string | getClassName () const override |
| return class name More... | |
| bool | isOptimizable () const override |
| if true, this contains optimizable components More... | |
| void | checkOutVariables (const opt_variables_type &active) override |
| check out variational optimizable variables More... | |
| void | extractOptimizableObjectRefs (UniqueOptObjRefs &opt_obj_refs) override |
| extract underlying OptimizableObject references More... | |
| void | checkInVariablesExclusive (opt_variables_type &active) final |
| check in variational parameters to the global list of parameters used by the optimizer. More... | |
| void | resetParametersExclusive (const opt_variables_type &active) final |
| reset the parameters during optimizations. More... | |
| 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... | |
| 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 | 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... | |
| bool | put (xmlNodePtr cur) |
| process input file More... | |
| void | printOneBody (std::ostream &os) |
| output jastrow coefficients More... | |
| void | printTwoBody (std::ostream &os) |
| bool | operator() (PosType G1, PosType G2) |
| std::unique_ptr< WaveFunctionComponent > | makeClone (ParticleSet &tqp) const override |
| make clone More... | |
| void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &active, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override |
| void | evaluateRatiosAlltoOne (ParticleSet &P, std::vector< ValueType > &ratios) override |
| evaluate the ratio More... | |
Public Member Functions inherited from WaveFunctionComponent | |
| 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 | 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 | 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 | 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 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 | 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 with respect to the optimizable parameters, and the dot product of this is then performed with the passed-in G_in gradient vector. More... | |
| 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 Member Functions inherited from OptimizableObject | |
| 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... | |
Private Types | |
| using | ComplexType = std::complex< RealType > |
Private Member Functions | |
| void | setupGvecs (RealType kcut, std::vector< PosType > &gvecs, bool useStructFact) |
| void | setupCoefs () |
| template<typename T > | |
| void | sortGvecs (std::vector< PosType > &gvecs, std::vector< kSpaceCoef< T >> &coefs, SymmetryType symm) |
| bool | Equivalent (PosType G1, PosType G2) |
| void | StructureFactor (PosType G, std::vector< ComplexType > &rho_G) |
| void | copyFrom (const kSpaceJastrow &old) |
Private Attributes | |
| RealType | CellVolume |
| RealType | NormConstant |
| int | num_elecs |
| int | NumSpins |
| int | NumIons |
| int | NumIonSpecies |
| std::vector< PosType > | OneBodyGvecs |
| std::vector< PosType > | TwoBodyGvecs |
| std::vector< kSpaceCoef< ComplexType > > | OneBodySymmCoefs |
| std::vector< kSpaceCoef< RealType > > | TwoBodySymmCoefs |
| std::vector< ComplexType > | OneBodyCoefs |
| std::vector< RealType > | TwoBodyCoefs |
| SymmetryType | OneBodySymmType |
| SymmetryType | TwoBodySymmType |
| std::vector< ComplexType > | Ion_rhoG |
| std::vector< ComplexType > | OneBody_rhoG |
| std::vector< ComplexType > | TwoBody_rhoG |
| std::vector< RealType > | OneBodyPhase |
| std::vector< RealType > | TwoBodyPhase |
| std::vector< ComplexType > | OneBody_e2iGr |
| std::vector< ComplexType > | TwoBody_e2iGr_new |
| std::vector< ComplexType > | TwoBody_e2iGr_old |
| Matrix< ComplexType > | Delta_e2iGr |
| const ParticleSet & | Ions |
| std::string | OneBodyID |
| std::string | TwoBodyID |
| double | Prefactor |
| std::vector< int > | TwoBodyVarMap |
| std::vector< int > | OneBodyVarMap |
Additional Inherited Members | |
Public Attributes inherited from WaveFunctionComponent | |
| 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 inherited from WaveFunctionComponent | |
| 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 . More... | |
Definition at line 68 of file kSpaceJastrow.h.
|
private |
Definition at line 79 of file kSpaceJastrow.h.
| enum SymmetryType |
| kSpaceJastrow | ( | const ParticleSet & | ions, |
| ParticleSet & | elecs, | ||
| SymmetryType | oneBodySymm, | ||
| RealType | oneBodyCutoff, | ||
| std::string | onebodyid, | ||
| bool | oneBodySpin, | ||
| SymmetryType | twoBodySymm, | ||
| RealType | twoBodyCutoff, | ||
| std::string | twobodyid, | ||
| bool | twoBodySpin | ||
| ) |
Definition at line 230 of file kSpaceJastrow.cpp.
References qmcplusplus::app_log(), qmcplusplus::cos(), kSpaceJastrow::Delta_e2iGr, qmcplusplus::dot(), ParticleSet::getLattice(), ParticleSet::getTotalNum(), ParticleSet::GroupID, VariableSet::insert(), kSpaceJastrow::Ion_rhoG, optimize::LOGLINEAR_P, WaveFunctionComponent::myVars, kSpaceJastrow::num_elecs, kSpaceJastrow::NumIonSpecies, kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBody_rhoG, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyID, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::OneBodySymmCoefs, kSpaceJastrow::Prefactor, ParticleSet::R, Matrix< T, Alloc >::resize(), kSpaceJastrow::setupGvecs(), qmcplusplus::sin(), kSpaceJastrow::sortGvecs(), kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_e2iGr_old, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, kSpaceJastrow::TwoBodyID, kSpaceJastrow::TwoBodyPhase, and kSpaceJastrow::TwoBodySymmCoefs.
| kSpaceJastrow | ( | const ParticleSet & | ions | ) |
constructor to initialize Ions
Definition at line 779 of file kSpaceJastrow.cpp.
|
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 622 of file kSpaceJastrow.cpp.
References kSpaceJastrow::Delta_e2iGr, kSpaceJastrow::TwoBody_e2iGr_new, and kSpaceJastrow::TwoBody_rhoG.
|
finalvirtual |
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 675 of file kSpaceJastrow.cpp.
References VariableSet::insertFrom(), WaveFunctionComponent::myVars, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodySymmCoefs, kSpaceJastrow::OneBodyVarMap, kSpaceJastrow::TwoBodyGvecs, kSpaceJastrow::TwoBodySymmCoefs, and kSpaceJastrow::TwoBodyVarMap.
|
overridevirtual |
check out variational optimizable variables
| active | a super set of optimizable variables |
Reimplemented from WaveFunctionComponent.
Definition at line 703 of file kSpaceJastrow.cpp.
References VariableSet::getIndex(), and WaveFunctionComponent::myVars.
Referenced by RPAJastrow::checkOutVariables().
|
private |
Definition at line 783 of file kSpaceJastrow.cpp.
References kSpaceJastrow::CellVolume, kSpaceJastrow::Delta_e2iGr, kSpaceJastrow::Ion_rhoG, WaveFunctionComponent::myVars, kSpaceJastrow::NormConstant, kSpaceJastrow::num_elecs, kSpaceJastrow::NumIons, kSpaceJastrow::NumIonSpecies, kSpaceJastrow::NumSpins, kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBody_rhoG, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyID, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::OneBodySymmCoefs, kSpaceJastrow::OneBodySymmType, kSpaceJastrow::OneBodyVarMap, kSpaceJastrow::Prefactor, kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_e2iGr_old, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, kSpaceJastrow::TwoBodyID, kSpaceJastrow::TwoBodyPhase, kSpaceJastrow::TwoBodySymmCoefs, kSpaceJastrow::TwoBodySymmType, and kSpaceJastrow::TwoBodyVarMap.
|
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 661 of file kSpaceJastrow.cpp.
References qmcplusplus::dot(), eval_e2iphi(), kSpaceJastrow::num_elecs, ParticleSet::R, kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, and kSpaceJastrow::TwoBodyPhase.
Definition at line 145 of file kSpaceJastrow.cpp.
References qmcplusplus::abs(), qmcplusplus::conj(), qmcplusplus::dot(), qmcplusplus::Units::charge::e, kSpaceJastrow::NumIonSpecies, and kSpaceJastrow::StructureFactor().
Referenced by kSpaceJastrow::sortGvecs().
|
overridevirtual |
return the current gradient for the iat-th particle
| P | quantum particle set |
| iat | particle index |
Reimplemented from WaveFunctionComponent.
Definition at line 429 of file kSpaceJastrow.cpp.
References qmcplusplus::conj(), qmcplusplus::dot(), eval_e2iphi(), ParticleSet::getTotalNum(), qmcplusplus::imag(), qmcplusplus::Units::force::N, kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::Prefactor, ParticleSet::R, qmcplusplus::real(), kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, and kSpaceJastrow::TwoBodyPhase.
|
override |
Definition at line 829 of file kSpaceJastrow.cpp.
References qmcplusplus::conj(), qmcplusplus::convertToReal(), qmcplusplus::dot(), eval_e2iphi(), ParticleSet::G, ParticleSet::getTotalNum(), qmcplusplus::imag(), WaveFunctionComponent::myVars, qmcplusplus::Units::force::N, norm(), kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::OneBodyVarMap, kSpaceJastrow::Prefactor, ParticleSet::R, qmcplusplus::real(), VariableSet::recompute(), VariableSet::size(), kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyGvecs, kSpaceJastrow::TwoBodyPhase, kSpaceJastrow::TwoBodyVarMap, and VariableSet::where().
|
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 369 of file kSpaceJastrow.cpp.
References qmcplusplus::conj(), qmcplusplus::dot(), eval_e2iphi(), ParticleSet::getTotalNum(), qmcplusplus::imag(), qmcplusplus::Units::force::N, norm(), kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::Prefactor, ParticleSet::R, qmcplusplus::real(), kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, and kSpaceJastrow::TwoBodyPhase.
Referenced by kSpaceJastrow::registerData(), and kSpaceJastrow::updateBuffer().
|
override |
evaluate the ratio
Definition at line 575 of file kSpaceJastrow.cpp.
References qmcplusplus::conj(), qmcplusplus::dot(), eval_e2iphi(), qmcplusplus::exp(), ParticleSet::getActivePos(), ParticleSet::getTotalNum(), qmcplusplus::Units::force::N, qmcplusplus::n, norm(), kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::Prefactor, ParticleSet::R, qmcplusplus::real(), kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_e2iGr_old, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, and kSpaceJastrow::TwoBodyPhase.
|
inlineoverridevirtual |
extract underlying OptimizableObject references
| opt_obj_refs | aggregated list of optimizable object references |
Reimplemented from WaveFunctionComponent.
Definition at line 163 of file kSpaceJastrow.h.
References UniqueOptObjRefs::push_back().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
if true, this contains optimizable components
Reimplemented from WaveFunctionComponent.
Definition at line 160 of file kSpaceJastrow.h.
|
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 756 of file kSpaceJastrow.cpp.
References kSpaceJastrow::Ions.
Definition at line 124 of file kSpaceJastrow.cpp.
References qmcplusplus::abs(), qmcplusplus::conj(), qmcplusplus::dot(), qmcplusplus::Units::charge::e, kSpaceJastrow::NumIonSpecies, and kSpaceJastrow::StructureFactor().
| void printOneBody | ( | std::ostream & | os | ) |
output jastrow coefficients
Definition at line 925 of file kSpaceJastrow.cpp.
References kSpaceJastrow::OneBodyCoefs, and kSpaceJastrow::OneBodyGvecs.
Referenced by kSpaceJastrowBuilder::outputJastrow().
| void printTwoBody | ( | std::ostream & | os | ) |
Definition at line 936 of file kSpaceJastrow.cpp.
References kSpaceJastrow::TwoBodyCoefs, and kSpaceJastrow::TwoBodyGvecs.
Referenced by kSpaceJastrowBuilder::outputJastrow().
| bool put | ( | xmlNodePtr | cur | ) |
|
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 536 of file kSpaceJastrow.cpp.
References qmcplusplus::conj(), qmcplusplus::dot(), eval_e2iphi(), qmcplusplus::exp(), ParticleSet::getActivePos(), norm(), kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::Prefactor, ParticleSet::R, qmcplusplus::real(), kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_e2iGr_old, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, and kSpaceJastrow::TwoBodyPhase.
|
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 484 of file kSpaceJastrow.cpp.
References qmcplusplus::conj(), qmcplusplus::dot(), eval_e2iphi(), qmcplusplus::exp(), ParticleSet::getActivePos(), qmcplusplus::imag(), norm(), kSpaceJastrow::OneBody_e2iGr, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodyGvecs, kSpaceJastrow::OneBodyPhase, kSpaceJastrow::Prefactor, ParticleSet::R, qmcplusplus::real(), kSpaceJastrow::TwoBody_e2iGr_new, kSpaceJastrow::TwoBody_e2iGr_old, kSpaceJastrow::TwoBody_rhoG, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodyGvecs, and kSpaceJastrow::TwoBodyPhase.
|
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 633 of file kSpaceJastrow.cpp.
References kSpaceJastrow::evaluateLog(), ParticleSet::G, ParticleSet::L, and WaveFunctionComponent::log_value_.
|
finalvirtual |
reset the parameters during optimizations.
Exclusive, see checkInVariablesExclusive
Implements OptimizableObject.
Definition at line 705 of file kSpaceJastrow.cpp.
References WaveFunctionComponent::myVars, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodySymmCoefs, kSpaceJastrow::TwoBodyCoefs, kSpaceJastrow::TwoBodySymmCoefs, and VariableSet::where().
|
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 616 of file kSpaceJastrow.cpp.
| void setCoefficients | ( | std::vector< RealType > & | oneBodyCoefs, |
| std::vector< RealType > & | twoBodyCoefs | ||
| ) |
Definition at line 312 of file kSpaceJastrow.cpp.
References qmcplusplus::app_warning(), WaveFunctionComponent::myVars, kSpaceJastrow::OneBodyCoefs, kSpaceJastrow::OneBodySymmCoefs, kSpaceJastrow::TwoBodyCoefs, and kSpaceJastrow::TwoBodySymmCoefs.
Referenced by RPAJastrow::makeLongRange().
|
private |
Definition at line 67 of file kSpaceJastrow.cpp.
References qmcplusplus::dot(), qmcplusplus::Units::charge::e, qmcplusplus::floor(), ParticleSet::getLattice(), qmcplusplus::Include(), kSpaceJastrow::Ions, norm(), kSpaceJastrow::NumIonSpecies, OHMMS_DIM, qmcplusplus::sqrt(), and kSpaceJastrow::StructureFactor().
Referenced by kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 167 of file kSpaceJastrow.cpp.
References kSpaceCoef< T >::cG, kSpaceJastrow::CRYSTAL, and kSpaceJastrow::Equivalent().
Referenced by kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 28 of file kSpaceJastrow.cpp.
References qmcplusplus::cos(), qmcplusplus::dot(), ParticleSet::getTotalNum(), ParticleSet::GroupID, kSpaceJastrow::Ions, kSpaceJastrow::NumIonSpecies, ParticleSet::R, and qmcplusplus::sin().
Referenced by kSpaceJastrow::Equivalent(), kSpaceJastrow::operator()(), and kSpaceJastrow::setupGvecs().
|
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 648 of file kSpaceJastrow.cpp.
References kSpaceJastrow::evaluateLog(), ParticleSet::G, ParticleSet::L, and WaveFunctionComponent::log_value_.
|
private |
Definition at line 83 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom().
|
private |
Definition at line 116 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::acceptMove(), kSpaceJastrow::copyFrom(), and kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 108 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), and kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 137 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::makeClone(), kSpaceJastrow::setupGvecs(), and kSpaceJastrow::StructureFactor().
|
private |
Definition at line 83 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom().
|
private |
Definition at line 84 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::copyFromBuffer(), and kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 86 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom().
|
private |
Definition at line 86 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::Equivalent(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::operator()(), kSpaceJastrow::setupGvecs(), and kSpaceJastrow::StructureFactor().
|
private |
Definition at line 85 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom().
|
private |
Definition at line 115 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 110 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), and kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 100 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::printOneBody(), kSpaceJastrow::ratio(), kSpaceJastrow::ratioGrad(), kSpaceJastrow::resetParametersExclusive(), and kSpaceJastrow::setCoefficients().
|
private |
Definition at line 90 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::checkInVariablesExclusive(), kSpaceJastrow::copyFrom(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::printOneBody(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 138 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), and kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 113 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 95 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::checkInVariablesExclusive(), kSpaceJastrow::copyFrom(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::resetParametersExclusive(), and kSpaceJastrow::setCoefficients().
|
private |
Definition at line 104 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom().
|
private |
Definition at line 212 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::checkInVariablesExclusive(), kSpaceJastrow::copyFrom(), and kSpaceJastrow::evaluateDerivatives().
|
private |
Definition at line 140 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 115 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::acceptMove(), kSpaceJastrow::copyFrom(), kSpaceJastrow::copyFromBuffer(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 115 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 110 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::acceptMove(), kSpaceJastrow::copyFrom(), kSpaceJastrow::copyFromBuffer(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 101 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::copyFromBuffer(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::printTwoBody(), kSpaceJastrow::ratio(), kSpaceJastrow::ratioGrad(), kSpaceJastrow::resetParametersExclusive(), and kSpaceJastrow::setCoefficients().
|
private |
Definition at line 91 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::checkInVariablesExclusive(), kSpaceJastrow::copyFrom(), kSpaceJastrow::copyFromBuffer(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::printTwoBody(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 139 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), and kSpaceJastrow::kSpaceJastrow().
|
private |
Definition at line 113 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom(), kSpaceJastrow::copyFromBuffer(), kSpaceJastrow::evalGrad(), kSpaceJastrow::evaluateDerivatives(), kSpaceJastrow::evaluateLog(), kSpaceJastrow::evaluateRatiosAlltoOne(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::ratio(), and kSpaceJastrow::ratioGrad().
|
private |
Definition at line 96 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::checkInVariablesExclusive(), kSpaceJastrow::copyFrom(), kSpaceJastrow::kSpaceJastrow(), kSpaceJastrow::resetParametersExclusive(), and kSpaceJastrow::setCoefficients().
|
private |
Definition at line 104 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::copyFrom().
|
private |
Definition at line 211 of file kSpaceJastrow.h.
Referenced by kSpaceJastrow::checkInVariablesExclusive(), kSpaceJastrow::copyFrom(), and kSpaceJastrow::evaluateDerivatives().