21 #ifndef QMCPLUSPLUS_LRHANLDERTEMP_H 22 #define QMCPLUSPLUS_LRHANLDERTEMP_H 39 template<
class Func,
class BreakupBasis = LPQHIBasis>
110 for (
int n = 0;
n <
coefs.size();
n++)
122 APP_ABORT(
"LRHandlerTemp::srDF not implemented (missing gcoefs)");
128 for (
int n = 0;
n <
coefs.size();
n++)
143 for (
int n = 0;
n <
coefs.size();
n++)
152 APP_ABORT(
"LRHandlerTemp::lrDF not implemented (missing gcoefs)");
156 for (
int n = 0;
n <
coefs.size();
n++)
169 for (
int n = 0;
n <
coefs.size();
n++)
171 return v0 * 2.0 * TWOPI /
Basis.get_CellVolume();
177 for (
int n = 0;
n <
coefs.size();
n++)
187 for (
int n = 0;
n <
Basis.NumBasisElem();
n++)
209 Basis.set_Lattice(ref);
213 Basis.set_NumKnots(NumKnots);
214 Basis.set_rc(ref.LR_rc);
232 app_log() <<
" finding kc: " << ref.LR_kc <<
" , " <<
LR_kc << std::endl;
233 app_log() <<
" LRBreakp parameter Kc =" << kc << std::endl;
234 app_log() <<
" Continuum approximation in k = [" << kcut <<
"," << kmax <<
")" << std::endl;
250 std::ios_base::fmtflags app_log_flags(
app_log().flags());
253 app_log() <<
"\n LR Breakup chi^2 = " << chisqr << std::endl;
255 app_log().flags(app_log_flags);
261 for (
int ki = 0; ki < KList.size(); ki++)
271 const std::vector<int>& kshell(KList.
kshell);
275 for (
int ks = 0, ki = 0; ks <
Fk_symm.
size(); ks++)
void resize(size_type n, Type_t val=Type_t())
Resize the container.
a class that defines a supercell in D-dimensional Euclean space.
const auto & getLRBox() const
std::vector< PosType > kpts_cart
K-vector in Cartesian coordinates.
helper functions for EinsplineSetBuilder
void resetTargetParticleSet(ParticleSet &ref, mRealType rs)
mRealType LR_kc
Maximum k cutoff.
void initBreakup(ParticleSet &ref) override
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > ParticleLayout
int SetupKVecs(mRealType kc, mRealType kcont, mRealType kmax)
setup KList
LRHandlerBase * makeClone(ParticleSet &ref) const override
make clone
mRealType evaluateLR_r0() const override
evaluate for the self-interaction term
DECLARE_COULOMB_TYPES int MaxKshell
Maxkimum Kshell for the given Kc.
EwaldHandler3D::mRealType mRealType
std::vector< mRealType > coefs
Fourier component for each k-shell Coefficient.
mRealType evalFk(mRealType k) const
mRealType evaluate_vlr_k(mRealType k) const override
void Breakup(ParticleSet &ref, mRealType rs_ext) override
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)
const auto & getSimulationCell() const
Specialized paritlce class for atomistic simulations.
mRealType evaluateSR_k0() const override
evaluate
void fillFk(const KContainer &KList)
size_type size() const
return the current size
void fillXk(std::vector< TinyVector< mRealType, 2 >> &KList)
mRealType lrDf(mRealType r) const override
evaluate the contribution from the long-range part for for spline
mRealType LR_rc
Maximum r cutoff.
void InitBreakup(const ParticleLayout &ref, int NumFunctions)
Initialise the basis and coefficients for the long-range beakup.
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
mRealType srDf(mRealType r, mRealType rinv) const override
evaluate the first derivative of the short range part at r
std::vector< int > kshell
kpts which belong to the ith-shell [kshell[i], kshell[i+1])
Vector< mRealType > Fk
Fourier component for all the k-point.
std::vector< mRealType > gcoefs
Coefficient for gradient fit.
mRealType DoBreakup(mRealType *Fk, mRealType *t, mRealType *adjust)
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
std::vector< RealType > ksq
squre of kpts in Cartesian coordniates
mRealType evaluateLR(mRealType r) const override
evaluate the contribution from the long-range part for for spline
mRealType evalXk(mRealType k) const
base class for LRHandlerTemp<FUNC,BASIS> and DummyLRHanlder<typename Func>
std::vector< TinyVector< mRealType, 2 > > KList
For each k, KList[k][0] = |k| and KList[k][1] = degeneracy.
mRealType evaluate(mRealType r, mRealType rinv) const override
Define LRHandlerBase and DummyLRHandler<typename Func>
LRHandlerTemp(ParticleSet &ref, mRealType kc_in=-1.0)
BreakupBasis BreakupBasisType
void resetTargetParticleSet(ParticleSet &ref) override
LRHandlerTemp(const LRHandlerTemp &aLR, ParticleSet &ref)
"copy" constructor
Vector< mRealType > Fk_symm
Fourier component for each k-shell.