21 #ifndef QMCPLUSPLUS_SPLINE_C2R_H 22 #define QMCPLUSPLUS_SPLINE_C2R_H 27 #include "spline2/MultiBspline.hpp" 45 using SplineType =
typename bspline_traits<ST, 3>::SplineType;
46 using BCType =
typename bspline_traits<ST, 3>::BCType;
90 virtual std::string
getClassName()
const override {
return "SplineC2R"; }
91 virtual std::string
getKeyword()
const override {
return "SplineC2R"; }
94 std::unique_ptr<SPOSet>
makeClone()
const override {
return std::make_unique<SplineC2R>(*this); }
99 size_t npad = getAlignedSize<ST>(2 *
n);
113 const int Nbands =
kPoints.size();
114 const int Nbandgroups =
comm->
size();
115 offset.resize(Nbandgroups + 1, 0);
118 for (
size_t ib = 0; ib <
offset.size(); ib++)
123 template<
typename GT,
typename BCT>
127 SplineInst = std::make_shared<MultiBspline<ST>>();
130 app_log() <<
"MEMORY " <<
SplineInst->sizeInByte() / (1 << 20) <<
" MB allocated " 131 <<
"for the coefficients in 3D spline orbital representation" << std::endl;
143 for (
size_t i = 0; i < nk; ++i)
163 std::vector<TT>& ratios)
override;
199 int last = -1)
const;
208 template<
class BSPLINESPO>
void resize(size_type n, Type_t val=Type_t())
Resize the container.
Vector< ST, aligned_allocator< ST > > vContainer_type
OrbitalSetTraits< ValueType >::HessVector HessVector
class to match std::complex<ST> spline with BsplineSet::ValueType (real) SPOs
bool read_splines(hdf_archive &h5f)
Tensor< ST, 3 > GGt
, transformation for tensor in LatticeUnit to CartesianUnit, e.g. Hessian
void resizeStorage(size_t n, size_t nvals)
void evaluateVGH(const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi) override
evaluate the values, gradients and hessians of this single-particle orbital set
helper functions for EinsplineSetBuilder
BsplineSet is the base class for SplineC2C, SplineC2R, SplineR2R.
void resize_kpoints()
remap kPoints to pack the double copy
SplineC2R(const std::string &my_name)
void assign_vghgh(const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi, int first=0, int last=-1) const
void evaluateDetRatios(const VirtualParticleSet &VP, ValueVector &psi, const ValueVector &psiinv, std::vector< TT > &ratios) override
A ParticleSet that handles virtual moves of a selected particle of a given physical ParticleSet Virtu...
Soa Container for D-dim vectors.
void create_spline(GT &xyz_g, BCT &xyz_bc)
TinyVector< ST, 3 > PointType
void assign_vgl_from_l(const PointType &r, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi)
assign_vgl_from_l can be used when myL is precomputed and myV,myG,myL in cartesian ...
void assign_v(const PointType &r, const vContainer_type &myV, ValueVector &psi, int first, int last) const
typename bspline_traits< ST, 3 >::SplineType SplineType
typename bspline_traits< ST, 3 >::BCType BCType
void assign_vgh(const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, int first, int last) const
Matrix< TT > ratios_private
thread private ratios for reduction when using nested threading, numVP x numThread ...
OrbitalSetTraits< ValueType >::ValueVector ValueVector
int size() const
return the number of tasks
VectorSoaContainer< ST, 3 > myKcart
int nComplexBands
number of complex bands
void FairDivideLow(int ntot, int npart, IV &adist)
partition ntot elements among npart
Wrapping information on parallelism.
void bcast_tables(Communicate *comm)
void evaluateVGHGH(const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi) override
evaluate the values, gradients, hessians, and grad hessians of this single-particle orbital set ...
Each SplineC2X needs a reader derived from BsplineReader.
Specialized paritlce class for atomistic simulations.
General SplineSetReader to handle any unitcell.
vContainer_type myV
intermediate result vectors
std::vector< int > offset
band offsets used for communication
A collection of functions for dividing fairly.
size_type size() const
return the current size
std::unique_ptr< SPOSet > makeClone() const override
make a clone of itself every derived class must implement this to have threading working correctly...
QTBase::ValueType ValueType
CrystalLattice< ST, 3 > PrimLattice
primitive cell
bool isComplex() const override
OrbitalSetTraits< ValueType >::ValueVector ValueVector
bool write_splines(hdf_archive &h5f)
BsplineSet is a SPOSet derived class and serves as a base class for B-spline SPO C2C/C2R/R2R implemen...
UBspline_3d_d SingleSplineType
virtual std::string getKeyword() const override
OrbitalSetTraits< ValueType >::GradHessVector GGGVector
OrbitalSetTraits< ValueType >::GradVector GradVector
void set_spline(SingleSplineType *spline_r, SingleSplineType *spline_i, int twist, int ispline, int level)
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
void evaluateVGL(const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) override
evaluate the values, gradients and laplacians of this single-particle orbital set ...
void resize(size_type n)
resize myData
void gatherv(T *sb, T *rb, int n, IT &counts, IT &displ, int dest)
void evaluateValue(const ParticleSet &P, const int iat, ValueVector &psi) override
evaluate the values of this single-particle orbital set
int remap_kpoints()
remap kpoints to group general kpoints & special kpoints
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
void assign_vgl(const PointType &r, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, int first, int last) const
assign_vgl
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
virtual std::string getClassName() const override
return class name
void gather_tables(Communicate *comm)
typename BsplineSet::ValueType TT