17 #ifndef QMCPLUSPLUS_NONLOCAL_ECPOTENTIAL_COMPONENT_H 18 #define QMCPLUSPLUS_NONLOCAL_ECPOTENTIAL_COMPONENT_H 33 class TestNonLocalECPotential;
67 std::vector<RadialPotentialType*>
nlpp_m;
75 std::vector<ValueType>
wvec;
80 std::vector<RealType>
lpol;
84 std::vector<RealType>
vrad;
157 void contributeTxy(
int iel, std::vector<NonLocalData>& Txy)
const;
197 std::vector<RealType>& pairpots,
277 std::vector<ValueMatrix>&
B);
302 std::vector<std::vector<ValueMatrix>>& dB);
304 void print(std::ostream& os);
void contributeTxy(int iel, std::vector< NonLocalData > &Txy) const
contribute local non-local move data
Contains a set of radial grid potentials around a center.
aligned_vector< RealType > wgt_angpp_m
Weight of the angular momentum.
std::vector< PosType > deltaV
int nknot
the number of nknot
void add(int l, RadialPotentialType *pp)
add a new Non Local component
std::vector< T, aligned_allocator< T > > aligned_vector
std::vector< PosType > cosgrad
std::vector< RadialPotentialType * > nlpp_m
Non-Local part of the pseudo-potential.
helper functions for EinsplineSetBuilder
std::vector< PosType > vgrad
class to violate access control because evaluation of NonLocalECPotential uses RNG which we may not b...
int nchannel
the number of non-local channels
std::vector< ValueType > psiratio
void evaluateOneBodyOpMatrixdRContribution(ParticleSet &P, ParticleSet &source, const int iat, const int iat_src, const TWFFastDerivWrapper &psi, const int iel, const RealType r, const PosType &dr, std::vector< std::vector< ValueMatrix >> &dB)
Evaluate contribution to dB/dR of election iel and ion iat.
A ParticleSet that handles virtual moves of a selected particle of a given physical ParticleSet Virtu...
Matrix< PosType > Gnew
First index is knot, second is electron.
friend void copyGridUnrotatedForTest(NonLocalECPComponent &nlpp)
std::vector< PosType > SpherGridType
Declaration of OperatorBase.
bool do_randomize_grid_
Can disable grid randomization for testing.
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
std::vector< RealType > dvrad
RealType Rmax
Maximum cutoff the non-local pseudopotential.
void print(std::ostream &os)
Attaches a unit to a Vector for IO.
TWFFastDerivWrapper is a wrapper class for TrialWavefunction that provides separate and low level acc...
RealType Lfactor2[8]
Lfactor1[l]=(l)/(l+1)
std::vector< RealType > lpol
SPOSet::GradMatrix GradMatrix
ParticleSet::ParticleGradient Gion
The gradient of the wave function w.r.t. the ion position.
An abstract base class to implement a One-Dimensional grid.
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
void evaluateOneBodyOpMatrixContribution(ParticleSet &P, const int iat, const TWFFastDerivWrapper &psi, const int iel, const RealType r, const PosType &dr, std::vector< ValueMatrix > &B)
Evaluate contribution to B of election iel and ion iat.
std::vector< ValueType > wvec
Working arrays.
SPOSet::ValueMatrix ValueMatrix
For fast derivative evaluation.
Decalaration of One-Dimesional grids.
Specialized paritlce class for atomistic simulations.
RealType evaluateValueAndDerivatives(ParticleSet &P, int iat, TrialWaveFunction &psi, int iel, RealType r, const PosType &dr, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi)
evaluate the non-local potential of the iat-th ionic center
SpherGridType rrotsgrid_m
randomized spherical grid
void addknot(const PosType &xyz, RealType weight)
add knots to the spherical grid
ParticleSet::ParticleLaplacian dL
static void mw_evaluateOne(const RefVectorWithLeader< NonLocalECPComponent > &ecp_component_list, const RefVectorWithLeader< ParticleSet > &p_list, const RefVectorWithLeader< TrialWaveFunction > &psi_list, const RefVector< const NLPPJob< RealType >> &joblist, std::vector< RealType > &pairpots, ResourceCollection &collection, bool use_DLA)
Evaluate the nonlocal pp contribution via randomized quadrature grid to total energy from ion "iat" a...
Matrix< ValueType > dratio
scratch spaces used by evaluateValueAndDerivatives
RealType Lfactor1[8]
Lfactor1[l]=(2*l+1)/(l+1)
class to handle a set of variables that can be modified during optimizations
VirtualParticleSet * VP
virtual particle set: delayed initialization
RealType evaluateOne(ParticleSet &W, int iat, TrialWaveFunction &Psi, int iel, RealType r, const PosType &dr, bool use_DLA)
Evaluate the nonlocal pp contribution via randomized quadrature grid to total energy from ion "iat" a...
std::vector< RealType > vrad
std::vector< RealType > dlpol
friend class NonLocalECPotential_CUDA
Declaration of a TrialWaveFunction.
std::vector< PosType > gradpsiratio
std::vector< std::reference_wrapper< T > > RefVector
Vector< ValueType > dlogpsi_vp
const VirtualParticleSet * getVP() const
int lmax
Non Local part: angular momentum, potential and grid.
Class to represent a many-body trial wave function.
void deleteVirtualParticle()
void set_randomize_grid(bool do_randomize_grid_)
ParticleSet::ParticleGradient dG
RealType evaluateOneWithForces(ParticleSet &W, int iat, TrialWaveFunction &Psi, int iel, RealType r, const PosType &dr, PosType &force_iat)
Evaluate the nonlocal pp contribution via randomized quadrature grid to total energy from ion "iat" a...
ParticleAttrib< QTFull::GradType > ParticleGradient
meta data for NLPP calculation of a pair of ion and electron This is not just meta data...
void initVirtualParticle(const ParticleSet &qp)
std::vector< PosType > wfngrad
std::vector< RealType > knot_pots
double B(double x, int k, int i, const std::vector< double > &t)
void buildQuadraturePointDeltaPositions(RealType r, const PosType &dr, std::vector< PosType > &deltaV) const
build QP position deltas from the reference electron using internally stored random grid points ...
void resize_warrays(int n, int m, int l)
QTBase::TensorType TensorType
RealType calculateProjector(RealType r, const PosType &dr)
finalize the calculation of ${V}{}$
std::vector< RealType > sgridweight_m
weight of the spherical grid
aligned_vector< int > angpp_m
Angular momentum map.
SpherGridType sgridxyz_m
fixed Spherical Grid for species
void rotateQuadratureGrid(const TensorType &rmat)
Randomly rotate sgrid_m.
std::vector< RealType > WarpNorm