QMCPACK
RPABreakup< T > Struct Template Reference
+ Collaboration diagram for RPABreakup< T >:

Public Member Functions

 RPABreakup ()
 
void reset (ParticleSet &ref)
 
void reset (ParticleSet &ref, T rs)
 
operator() (T r, T rinv) const
 
df (T r) const
 
Fk (T k, T rc) const
 
Xk (T k, T rc) const
 
integrate_r2 (T rc) const
 
Uk (T kk) const
 return RPA value at |k| More...
 
derivUk (T kk) const
 return d u(k)/d rs More...
 

Public Attributes

Rs
 
Kf
 
Density
 
NormFactor
 

Detailed Description

template<class T = double>
struct qmcplusplus::RPABreakup< T >

Definition at line 183 of file LRBreakupUtilities.h.

Constructor & Destructor Documentation

◆ RPABreakup()

RPABreakup ( )
inline

Definition at line 189 of file LRBreakupUtilities.h.

189 {}

Member Function Documentation

◆ derivUk()

T derivUk ( kk) const
inline

return d u(k)/d rs

Implement a correct one

Definition at line 247 of file LRBreakupUtilities.h.

247 { return 0.0; }

◆ df()

T df ( r) const
inline

Definition at line 216 of file LRBreakupUtilities.h.

216 { return 0.0; }

◆ Fk()

T Fk ( k,
rc 
) const
inline

Definition at line 218 of file LRBreakupUtilities.h.

References RPABreakup< T >::Xk().

218 { return -Xk(k, rc); }

◆ integrate_r2()

T integrate_r2 ( rc) const
inline

Definition at line 236 of file LRBreakupUtilities.h.

236 { return 0.0; }

◆ operator()()

T operator() ( r,
rinv 
) const
inline

Definition at line 214 of file LRBreakupUtilities.h.

214 { return 0.0; }

◆ reset() [1/2]

void reset ( ParticleSet ref)
inline

Definition at line 191 of file LRBreakupUtilities.h.

References RPABreakup< T >::Density, ParticleSet::getLattice(), ParticleSet::getTotalNum(), RPABreakup< T >::Kf, RPABreakup< T >::NormFactor, qmcplusplus::pow(), and RPABreakup< T >::Rs.

192  {
193  // NormFactor= 4.0*M_PI/ref.getLattice().Volume;
194  // NormFactor=4.0*M_PI/ref.getTotalNum();
195  NormFactor = 1.0 / ref.getTotalNum();
196  Density = ref.getTotalNum() / ref.getLattice().Volume;
197  Rs = std::pow(3.0 / (4.0 * M_PI * Density), 1.0 / 3.0);
198  //unpolarized K_f
199  Kf = std::pow(2.25 * M_PI, 1.0 / 3.0) / Rs;
200  }
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)

◆ reset() [2/2]

void reset ( ParticleSet ref,
rs 
)
inline

Definition at line 202 of file LRBreakupUtilities.h.

References RPABreakup< T >::Density, ParticleSet::getLattice(), ParticleSet::getTotalNum(), RPABreakup< T >::Kf, RPABreakup< T >::NormFactor, qmcplusplus::pow(), and RPABreakup< T >::Rs.

203  {
204  // NormFactor=4.0*M_PI/ref.getLattice().Volume;
205  NormFactor = 1.0 / ref.getTotalNum();
206  // NormFactor=4.0*M_PI/ref.getTotalNum();
207  Density = ref.getTotalNum() / ref.getLattice().Volume;
208  Rs = rs;
209  //unpolarized
210  Kf = std::pow(2.25 * M_PI, 1.0 / 3.0) / Rs;
211  }
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)

◆ Uk()

T Uk ( kk) const
inline

return RPA value at |k|

Parameters
kk|k|^2

Definition at line 241 of file LRBreakupUtilities.h.

References RPABreakup< T >::NormFactor, and RPABreakup< T >::Rs.

◆ Xk()

T Xk ( k,
rc 
) const
inline

Definition at line 220 of file LRBreakupUtilities.h.

References RPABreakup< T >::Kf, RPABreakup< T >::NormFactor, qmcplusplus::pow(), and RPABreakup< T >::Rs.

Referenced by RPABreakup< T >::Fk().

221  {
222  T y = 0.5 * k / Kf;
223  T Sy;
224  if (y >= 1.0)
225  {
226  Sy = 1.0;
227  }
228  else
229  {
230  Sy = 1.5 * y - 0.5 * y * y * y;
231  };
232  //multiply by NORM?
233  return NormFactor * (0.5 * (-1.0 / Sy + std::pow(1.0 / (Sy * Sy) + 12.0 / (k * k * k * k * Rs * Rs * Rs), 0.5)));
234  }
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)

Member Data Documentation

◆ Density

T Density

Definition at line 187 of file LRBreakupUtilities.h.

Referenced by RPABreakup< T >::reset().

◆ Kf

T Kf

Definition at line 186 of file LRBreakupUtilities.h.

Referenced by RPABreakup< T >::reset(), and RPABreakup< T >::Xk().

◆ NormFactor

T NormFactor

◆ Rs

T Rs

The documentation for this struct was generated from the following file: