![]() |
QMCPACK
|
Public Types | |
using | ParticleLayout = ParticleSet::ParticleLayout |
using | BreakupBasisType = BreakupBasis |
using | GridType = LinearGrid< mRealType > |
Public Member Functions | |
LRHandlerSRCoulomb (ParticleSet &ref, mRealType kc_in=-1.0) | |
~LRHandlerSRCoulomb () override | |
LRHandlerSRCoulomb (const LRHandlerSRCoulomb &aLR, ParticleSet &ref) | |
"copy" constructor More... | |
LRHandlerBase * | makeClone (ParticleSet &ref) const override |
make clone More... | |
void | initBreakup (ParticleSet &ref) override |
void | Breakup (ParticleSet &ref, mRealType rs_ext) override |
void | resetTargetParticleSet (ParticleSet &ref) override |
void | resetTargetParticleSet (ParticleSet &ref, mRealType rs) |
mRealType | evaluate (mRealType r, mRealType rinv) const override |
mRealType | evaluate_vlr_k (mRealType k) const override |
mRealType | srDf (mRealType r, mRealType rinv) const override |
evaluate the first derivative of the short range part at r More... | |
mRealType | srDf_strain (mRealType r, mRealType rinv) const |
mRealType | lrDf (mRealType r) const override |
mRealType | evaluateLR (mRealType r) const override |
evaluate the contribution from the long-range part for for spline More... | |
mRealType | evaluateSR_k0 () const override |
evaluate ![]() | |
mRealType | evaluateLR_r0 () const override |
evaluate ![]() | |
SymTensor< mRealType, OHMMS_DIM > | evaluateLR_dstrain (TinyVector< pRealType, OHMMS_DIM > k, pRealType kmag) const override |
SymTensor< mRealType, OHMMS_DIM > | evaluateSR_dstrain (TinyVector< pRealType, OHMMS_DIM > r, pRealType rmag) const override |
SymTensor< mRealType, OHMMS_DIM > | evaluateSR_k0_dstrain () const override |
mRealType | evaluateLR_r0_dstrain (int i, int j) const |
SymTensor< mRealType, OHMMS_DIM > | evaluateLR_r0_dstrain () const override |
These functions return the strain derivatives of all corresponding quantities in total energy. More... | |
![]() | |
LRHandlerBase (mRealType kc) | |
virtual | ~LRHandlerBase ()=default |
mRealType | get_rc () const |
mRealType | get_kc () const |
mRealType | evaluate_w_sk (const std::vector< int > &kshell, const pRealType *restrict sk) const |
mRealType | evaluate (const std::vector< int > &kshell, const pRealType *restrict rk1_r, const pRealType *restrict rk1_i, const pRealType *restrict rk2_r, const pRealType *restrict rk2_i) const |
evaluate ![]() | |
virtual mRealType | evaluate_slab (pRealType z, const std::vector< int > &kshell, const pRealType *restrict rk1_r, const pRealType *restrict rk1_i, const pRealType *restrict rk2_r, const pRealType *restrict rk2_i) const |
Evaluate the long-range potential with the open BC for the D-1 direction. More... | |
void | evaluateGrad (const ParticleSet &A, const ParticleSet &B, int specB, std::vector< pRealType > &Zat, std::vector< TinyVector< pRealType, OHMMS_DIM >> &grad1) const |
evaluate ![]() ![]() | |
SymTensor< pRealType, OHMMS_DIM > | evaluateStress (const std::vector< int > &kshell, const pRealType *rhokA_r, const pRealType *rhokA_i, const pRealType *rhokB_r, const pRealType *rhokB_i) const |
FIX_PRECISION. More... | |
Public Attributes | |
bool | FirstTime |
mRealType | rs |
BreakupBasisType | Basis |
Func | myFunc |
std::vector< mRealType > | Fk_copy |
![]() | |
DECLARE_COULOMB_TYPES int | MaxKshell |
Maxkimum Kshell for the given Kc. More... | |
mRealType | LR_kc |
Maximum k cutoff. More... | |
mRealType | LR_rc |
Maximum r cutoff. More... | |
Vector< mRealType > | Fk |
Fourier component for all the k-point. More... | |
Vector< mRealType > | Fkg |
Fourier component of the LR part, fit to optimize the gradients. More... | |
std::vector< SymTensor< mRealType, OHMMS_DIM > > | dFk_dstrain |
Fourier component of the LR part of strain tensor, by optimized breakup. More... | |
Vector< mRealType > | Fkgstrain |
Vector of df_k/dk, fit as to optimize strains. More... | |
Vector< mRealType > | Fk_symm |
Fourier component for each k-shell. More... | |
std::vector< mRealType > | coefs |
Fourier component for each k-shell Coefficient. More... | |
std::vector< mRealType > | gcoefs |
Coefficient for gradient fit. More... | |
std::vector< mRealType > | gstraincoefs |
Coefficient for strain fit. More... | |
Private Member Functions | |
mRealType | evalYk (mRealType k) const |
mRealType | evalYkg (mRealType k) const |
mRealType | evalYkgstrain (mRealType k) const |
mRealType | evaldYkgstrain (mRealType k) const |
void | InitBreakup (const ParticleLayout &ref, int NumFunctions) |
Initialise the basis and coefficients for the long-range beakup. More... | |
void | fillVk (std::vector< TinyVector< mRealType, 2 >> &KList) |
void | fillYk (KContainer &KList) |
void | fillYkg (const KContainer &KList) |
void | fillYkgstrain (KContainer &KList) |
void | filldFk_dk (KContainer &KList) |
Additional Inherited Members | |
![]() | |
std::string | ClassName |
Definition at line 43 of file LRHandlerSRCoulomb.h.
using BreakupBasisType = BreakupBasis |
Definition at line 48 of file LRHandlerSRCoulomb.h.
using GridType = LinearGrid<mRealType> |
Definition at line 49 of file LRHandlerSRCoulomb.h.
Definition at line 47 of file LRHandlerSRCoulomb.h.
|
inline |
Definition at line 60 of file LRHandlerSRCoulomb.h.
References LRHandlerBase::ClassName, and LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc.
|
inlineoverride |
Definition at line 68 of file LRHandlerSRCoulomb.h.
|
inline |
"copy" constructor
aLR | LRHandlerSRCoulomb |
ref | Particleset |
Copy the content of aLR References to ParticleSet or ParticleLayoutout_t are not copied.
Definition at line 77 of file LRHandlerSRCoulomb.h.
|
inlineoverridevirtual |
Implements LRHandlerBase.
Definition at line 98 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerSRCoulomb< Func, BreakupBasis >::fillYkg(), ParticleSet::getLRBox(), ParticleSet::getSimulationCell(), LRHandlerSRCoulomb< Func, BreakupBasis >::InitBreakup(), LRHandlerBase::LR_rc, LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc, and LRHandlerSRCoulomb< Func, BreakupBasis >::rs.
Definition at line 262 of file LRHandlerSRCoulomb.h.
References APP_ABORT, LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerBase::gstraincoefs, and LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateLR_dstrain().
Implements LRHandlerBase.
Definition at line 114 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, and LRHandlerBase::gcoefs.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateLR(), and qmcplusplus::TEST_CASE().
Implements LRHandlerBase.
Definition at line 121 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::evalYk().
evaluate the contribution from the long-range part for for spline
Implements LRHandlerBase.
Definition at line 148 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::evaluate(), and LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
Reimplemented from LRHandlerBase.
Definition at line 173 of file LRHandlerSRCoulomb.h.
References APP_ABORT, LRHandlerSRCoulomb< Func, BreakupBasis >::evaldYkgstrain(), LRHandlerSRCoulomb< Func, BreakupBasis >::evalYkgstrain(), and OHMMS_DIM.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::filldFk_dk().
|
inlineoverridevirtual |
evaluate for the self-interaction term
Reimplemented from LRHandlerBase.
Definition at line 164 of file LRHandlerSRCoulomb.h.
|
inline |
Definition at line 223 of file LRHandlerSRCoulomb.h.
References APP_ABORT.
These functions return the strain derivatives of all corresponding quantities in total energy.
See documentation (forthcoming).
Reimplemented from LRHandlerBase.
Definition at line 230 of file LRHandlerSRCoulomb.h.
References APP_ABORT.
|
inlineoverridevirtual |
Reimplemented from LRHandlerBase.
Definition at line 190 of file LRHandlerSRCoulomb.h.
References APP_ABORT, OHMMS_DIM, and LRHandlerSRCoulomb< Func, BreakupBasis >::srDf_strain().
|
inlineoverridevirtual |
evaluate
Reimplemented from LRHandlerBase.
Definition at line 155 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerBase::coefs, and qmcplusplus::n.
Reimplemented from LRHandlerBase.
Definition at line 206 of file LRHandlerSRCoulomb.h.
References APP_ABORT, LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerBase::coefs, LRHandlerBase::gstraincoefs, qmcplusplus::n, norm(), and OHMMS_DIM.
Definition at line 238 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerBase::coefs, and LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::evaluate_vlr_k(), and LRHandlerSRCoulomb< Func, BreakupBasis >::fillYk().
Definition at line 246 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerBase::gcoefs, and LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::fillYkg().
Definition at line 253 of file LRHandlerSRCoulomb.h.
References APP_ABORT, LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerBase::gstraincoefs, and LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateLR_dstrain(), and LRHandlerSRCoulomb< Func, BreakupBasis >::fillYkgstrain().
|
inlineprivate |
Definition at line 458 of file LRHandlerSRCoulomb.h.
References APP_ABORT, LRHandlerBase::dFk_dstrain, LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateLR_dstrain(), KContainer::kpts_cart, KContainer::ksq, and qmcplusplus::sqrt().
|
inlineprivate |
Definition at line 384 of file LRHandlerSRCoulomb.h.
References LRHandlerBase::Fk, LRHandlerBase::Fkg, LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc, and Vector< T, Alloc >::resize().
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::InitBreakup().
|
inlineprivate |
Definition at line 400 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::evalYk(), LRHandlerBase::Fk, LRHandlerBase::Fk_symm, KContainer::kpts_cart, KContainer::kshell, KContainer::ksq, LRHandlerBase::MaxKshell, Vector< T, Alloc >::resize(), Vector< T, Alloc >::size(), and qmcplusplus::sqrt().
|
inlineprivate |
Definition at line 420 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::evalYkg(), LRHandlerBase::Fk, LRHandlerBase::Fkg, KContainer::kpts_cart, KContainer::kshell, KContainer::ksq, LRHandlerBase::MaxKshell, Vector< T, Alloc >::resize(), Vector< T, Alloc >::size(), and qmcplusplus::sqrt().
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::Breakup(), and LRHandlerSRCoulomb< Func, BreakupBasis >::initBreakup().
|
inlineprivate |
Definition at line 444 of file LRHandlerSRCoulomb.h.
References APP_ABORT, LRHandlerSRCoulomb< Func, BreakupBasis >::evalYkgstrain(), LRHandlerBase::Fkgstrain, KContainer::kpts_cart, KContainer::kshell, KContainer::ksq, LRHandlerBase::MaxKshell, Vector< T, Alloc >::resize(), Vector< T, Alloc >::size(), and qmcplusplus::sqrt().
|
inlineoverridevirtual |
Implements LRHandlerBase.
Definition at line 88 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, LRHandlerSRCoulomb< Func, BreakupBasis >::fillYkg(), ParticleSet::getLRBox(), ParticleSet::getSimulationCell(), LRHandlerSRCoulomb< Func, BreakupBasis >::InitBreakup(), and LRHandlerBase::LR_rc.
Referenced by qmcplusplus::TEST_CASE().
|
inlineprivate |
Initialise the basis and coefficients for the long-range beakup.
We loocally create a breakup handler and pass in the basis that has been initialised here. We then discard the handler, leaving basis and coefs in a usable state. This method can be re-called later if lattice changes shape.
This is to make sure there's no cusp in the LR part.
Definition at line 277 of file LRHandlerSRCoulomb.h.
References qmcplusplus::app_log(), LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, Vector< T, Alloc >::data(), LRBreakup< BreakupBasis >::DoGradBreakup(), LRHandlerSRCoulomb< Func, BreakupBasis >::fillVk(), LRHandlerSRCoulomb< Func, BreakupBasis >::FirstTime, LRHandlerBase::Fkg, LRHandlerBase::gcoefs, LRBreakup< BreakupBasis >::KList, LRHandlerBase::LR_kc, LRHandlerBase::MaxKshell, qmcplusplus::pow(), Vector< T, Alloc >::resize(), and LRBreakup< BreakupBasis >::SetupKVecs().
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::Breakup(), and LRHandlerSRCoulomb< Func, BreakupBasis >::initBreakup().
Reimplemented from LRHandlerBase.
Definition at line 141 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc, and LRHandlerSRCoulomb< Func, BreakupBasis >::srDf().
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
make clone
Implements LRHandlerBase.
Definition at line 81 of file LRHandlerSRCoulomb.h.
|
inlineoverridevirtual |
Implements LRHandlerBase.
Definition at line 110 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc.
|
inline |
Definition at line 112 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::myFunc, and LRHandlerSRCoulomb< Func, BreakupBasis >::rs.
evaluate the first derivative of the short range part at r
r | radius |
rinv | 1/r |
Implements LRHandlerBase.
Definition at line 128 of file LRHandlerSRCoulomb.h.
References LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, and LRHandlerBase::gcoefs.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::lrDf(), and qmcplusplus::TEST_CASE().
Definition at line 134 of file LRHandlerSRCoulomb.h.
References APP_ABORT, LRHandlerSRCoulomb< Func, BreakupBasis >::Basis, and LRHandlerBase::gstraincoefs.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateSR_dstrain().
BreakupBasisType Basis |
Definition at line 53 of file LRHandlerSRCoulomb.h.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::Breakup(), LRHandlerSRCoulomb< Func, BreakupBasis >::evaldYkgstrain(), LRHandlerSRCoulomb< Func, BreakupBasis >::evaluate(), LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateSR_k0(), LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateSR_k0_dstrain(), LRHandlerSRCoulomb< Func, BreakupBasis >::evalYk(), LRHandlerSRCoulomb< Func, BreakupBasis >::evalYkg(), LRHandlerSRCoulomb< Func, BreakupBasis >::evalYkgstrain(), LRHandlerSRCoulomb< Func, BreakupBasis >::initBreakup(), LRHandlerSRCoulomb< Func, BreakupBasis >::InitBreakup(), LRHandlerSRCoulomb< Func, BreakupBasis >::srDf(), and LRHandlerSRCoulomb< Func, BreakupBasis >::srDf_strain().
bool FirstTime |
Definition at line 51 of file LRHandlerSRCoulomb.h.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::InitBreakup().
std::vector<mRealType> Fk_copy |
Definition at line 56 of file LRHandlerSRCoulomb.h.
Func myFunc |
Definition at line 54 of file LRHandlerSRCoulomb.h.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::Breakup(), LRHandlerSRCoulomb< Func, BreakupBasis >::evaldYkgstrain(), LRHandlerSRCoulomb< Func, BreakupBasis >::evaluateLR(), LRHandlerSRCoulomb< Func, BreakupBasis >::evalYk(), LRHandlerSRCoulomb< Func, BreakupBasis >::evalYkg(), LRHandlerSRCoulomb< Func, BreakupBasis >::evalYkgstrain(), LRHandlerSRCoulomb< Func, BreakupBasis >::fillVk(), LRHandlerSRCoulomb< Func, BreakupBasis >::lrDf(), LRHandlerSRCoulomb< Func, BreakupBasis >::LRHandlerSRCoulomb(), and LRHandlerSRCoulomb< Func, BreakupBasis >::resetTargetParticleSet().
mRealType rs |
Definition at line 52 of file LRHandlerSRCoulomb.h.
Referenced by LRHandlerSRCoulomb< Func, BreakupBasis >::Breakup(), and LRHandlerSRCoulomb< Func, BreakupBasis >::resetTargetParticleSet().