14 #ifndef QMCPLUSPLUS_J2KECORRECTION_H 15 #define QMCPLUSPLUS_J2KECORRECTION_H 24 template<
typename RT,
class FT>
32 const std::vector<FT*>&
F_;
39 vol(targetPtcl.getLattice().Volume),
57 const int numPoints = 1000;
70 RT radius = ufunc.cutoff_radius;
72 RT dr = radius / (RT)(numPoints - 1);
73 for (
int ir = 0; ir < numPoints; ir++)
76 RT u = ufunc.evaluate(r);
77 uk += 0.5 * 4.0 * M_PI * r *
std::sin(k * r) / k * u * dr * (RT)Nj / (RT)(Ni + Nj);
82 for (
int iter = 0; iter < 20; iter++)
helper functions for EinsplineSetBuilder
MakeReturn< UnaryNode< FnSin, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sin(const Vector< T1, C1 > &l)
int first(int igroup) const
return the first index of a group i
const std::vector< FT * > & F_
const auto & getSimulationCell() const
Specialized paritlce class for atomistic simulations.
std::vector< size_t > num_elec_in_groups_
int last(int igroup) const
return the last index of a group i
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
J2KECorrection(const ParticleSet &targetPtcl, const std::vector< FT *> &F)