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

Public Member Functions

 derivEPRPABreakup ()
 
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::derivEPRPABreakup< T >

Definition at line 400 of file LRBreakupUtilities.h.

Constructor & Destructor Documentation

◆ derivEPRPABreakup()

derivEPRPABreakup ( )
inline

Definition at line 406 of file LRBreakupUtilities.h.

406 {}

Member Function Documentation

◆ derivUk()

T derivUk ( kk) const
inline

return d u(k)/d rs

Implement a correct one

Definition at line 462 of file LRBreakupUtilities.h.

462 { return 0.0; }

◆ df()

T df ( r) const
inline

Definition at line 431 of file LRBreakupUtilities.h.

431 { return 0.0; }

◆ Fk()

T Fk ( k,
rc 
) const
inline

Definition at line 433 of file LRBreakupUtilities.h.

References derivEPRPABreakup< T >::Xk().

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

◆ integrate_r2()

T integrate_r2 ( rc) const
inline

Definition at line 451 of file LRBreakupUtilities.h.

451 { return 0.0; }

◆ operator()()

T operator() ( r,
rinv 
) const
inline

Definition at line 429 of file LRBreakupUtilities.h.

429 { return 0.0; }

◆ reset() [1/2]

void reset ( ParticleSet ref)
inline

Definition at line 408 of file LRBreakupUtilities.h.

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

409  {
410  NormFactor = 1.0 / ref.getTotalNum();
411  Density = ref.getTotalNum() / ref.getLattice().Volume;
412  Rs = std::pow(3.0 / (4.0 * M_PI * Density), 1.0 / 3.0);
413  //unpolarized K_f
414  Kf = std::pow(2.25 * M_PI, 1.0 / 3.0) / Rs;
415  }
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 417 of file LRBreakupUtilities.h.

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

418  {
419  // NormFactor=4.0*M_PI/ref.getLattice().Volume;
420  NormFactor = 1.0 / ref.getTotalNum();
421  // NormFactor=4.0*M_PI/ref.getTotalNum();
422  Density = ref.getTotalNum() / ref.getLattice().Volume;
423  Rs = rs;
424  //unpolarized
425  Kf = std::pow(2.25 * M_PI, 1.0 / 3.0) / Rs;
426  }
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 456 of file LRBreakupUtilities.h.

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

◆ Xk()

T Xk ( k,
rc 
) const
inline

Definition at line 435 of file LRBreakupUtilities.h.

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

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

436  {
437  T y = 0.5 * k / Kf;
438  T Sy;
439  if (y >= 1.0)
440  {
441  Sy = 1.0;
442  }
443  else
444  {
445  Sy = 1.5 * y - 0.5 * y * y * y;
446  };
447  T val = 12.0 / (k * k * k * k * Rs * Rs * Rs);
448  T uk = val * std::pow(1.0 / (Sy * Sy) + val, -0.5);
449  return -0.5 * NormFactor * (uk / Rs) * (1.0 - 0.5 * val / (1.0 / (Sy * Sy) + val));
450  }
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 404 of file LRBreakupUtilities.h.

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

◆ Kf

T Kf

◆ NormFactor

◆ Rs


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