QMCPACK
EwaldHandlerQuasi2D.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2022 QMCPACK developers.
6 //
7 // File developed by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
8 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
9 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
10 // Yubo "Paul" Yang, yubo.paul.yang@gmail.com, CCQ @ Flatiron
11 //
12 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
13 //////////////////////////////////////////////////////////////////////////////////////
14 
15 #ifndef QMCPLUSPLUS_EWALD_QUASI2D_HANDLER_H
16 #define QMCPLUSPLUS_EWALD_QUASI2D_HANDLER_H
17 
19 
20 namespace qmcplusplus
21 {
22 /* LR breakup for the standard Ewald method in quasi-2D (slab geometry)
23  */
25 {
26 public:
27  EwaldHandlerQuasi2D(ParticleSet& ref, mRealType kc_in=-1.0);
28 
29  // copy constructor
30  LRHandlerBase* makeClone(ParticleSet& ref) const override { return new EwaldHandlerQuasi2D(*this); }
31 
32  // short-range part
33  inline mRealType evaluate(mRealType r, mRealType rinv) const override { return erfc(alpha*r) * rinv; }
34  inline mRealType evaluateLR_r0() const override { return 2.0 * alpha / std::sqrt(M_PI); }
35 
36  // long-range part
37  inline mRealType evaluateLR(mRealType r) const override { return erf(alpha*r) / r; }
38  inline mRealType evaluateSR_k0() const override { return slab_vsr_k0(0)/area; }
39  void fillFk(const KContainer& KList);
40 
41  // z-dependent long-range part
43  const std::vector<int>& kshell,
44  const pRealType* restrict rk1_r,
45  const pRealType* restrict rk1_i,
46  const pRealType* restrict rk2_r,
47  const pRealType* restrict rk2_i) const override;
48 
49  // begin required overrides
50  inline mRealType srDf(mRealType r, mRealType rinv) const override
51  {
52  throw std::runtime_error("Quasi2D Ewald sr derivative not implemented");
53  }
54  inline mRealType lrDf(mRealType r) const override
55  {
56  throw std::runtime_error("Quasi2D Ewald lr derivative not implemented");
57  }
58  virtual mRealType evaluate_vlr_k(mRealType k) const override
59  {
60  throw std::runtime_error("Quasi2D Ewald vlr_k not implemented");
61  }
62  void initBreakup(ParticleSet& ref) override {}
63  void Breakup(ParticleSet& ref, mRealType rs_in) override { initBreakup(ref); }
64  void resetTargetParticleSet(ParticleSet& ref) override {}
65  // overrides end
66 private:
69  ///store |k|
70  std::vector<mRealType> kmags;
71  // f(z, k) = e^{z k} erfc(k/(2\alpha)+\alpha*z)
73  // log( f(z, k) )
76 };
77 } // qmcplusplus
78 #endif
mRealType evaluateSR_k0() const override
evaluate
mRealType evaluateLR_r0() const override
evaluate for the self-interaction term
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
void Breakup(ParticleSet &ref, mRealType rs_in) override
EwaldHandler3D::mRealType mRealType
mRealType slabLogf(mRealType z, mRealType k) const
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 override
Evaluate the long-range potential with the open BC for the D-1 direction.
mRealType slab_vsr_k0(mRealType z) const
LRHandlerBase * makeClone(ParticleSet &ref) const override
make clone
mRealType evaluate(mRealType r, mRealType rinv) const override
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
void fillFk(const KContainer &KList)
qmcplusplus::LRHandlerBase::pRealType pRealType
void resetTargetParticleSet(ParticleSet &ref) override
Container for k-points.
Definition: KContainer.h:29
void initBreakup(ParticleSet &ref) override
mRealType lrDf(mRealType r) const override
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
std::vector< mRealType > kmags
store |k|
mRealType srDf(mRealType r, mRealType rinv) const override
base class for LRHandlerTemp<FUNC,BASIS> and DummyLRHanlder<typename Func>
Definition: LRHandlerBase.h:30
mRealType slabFunc(mRealType z, mRealType k) const
EwaldHandlerQuasi2D(ParticleSet &ref, mRealType kc_in=-1.0)
mRealType evaluateLR(mRealType r) const override
Define LRHandlerBase and DummyLRHandler<typename Func>
virtual mRealType evaluate_vlr_k(mRealType k) const override