28 for (
int ipp = 0; ipp <
PPset.size(); ipp++)
40 const auto& displ = myTable.getDisplRow(jel);
41 for (
int iat = 0; iat <
NumIons; iat++)
42 if (
PP[iat] !=
nullptr && dist[iat] <
PP[iat]->getRmax())
43 value_ +=
PP[iat]->evaluateValueAndDerivatives(P, iat,
Psi, jel, dist[iat], -displ[iat], optvars, dlogpsi,
78 for (
int j = 0; j <
nknot; j++)
89 for (
int j = 0; j <
nknot; j++)
110 for (
int j = 0; j <
nknot; ++j)
113 for (
int ip = 0; ip <
nchannel; ip++)
119 for (
int j = 0, jl = 0; j <
nknot; j++)
125 for (
int l = 0; l <
lmax; l++)
139 BLAS::gemv(
'N', num_vars,
nknot, 1.0,
dratio.
data(), num_vars,
wvec.data(), 1, 1.0, dhpsioverpsi.
data(), 1);
void resize(size_type n, Type_t val=Type_t())
Resize the container.
aligned_vector< RealType > wgt_angpp_m
Weight of the angular momentum.
std::vector< PosType > deltaV
int nknot
the number of nknot
ValueType calcRatio(ParticleSet &P, int iat, ComputeType ct=ComputeType::ALL)
compute psi(R_new) / psi(R_current) ratio It returns a complex value if the wavefunction is complex...
std::vector< RadialPotentialType * > nlpp_m
Non-Local part of the pseudo-potential.
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
const DistRow & getDistRow(int iel) const
return a row of distances for a given target particle
int nchannel
the number of non-local channels
size_t getTotalNum() const
void acceptMove(ParticleSet &P, int iat, bool safe_to_delay=false)
update the state with the new data
void evaluateDerivativesWF(ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi)
std::vector< ValueType > psiratio
void makeMoves(const ParticleSet &refp, int jel, const std::vector< PosType > &deltaV, bool sphere=false, int iat=-1)
move virtual particles to new postions and update distance tables
std::vector< NonLocalECPComponent * > PP
the set of local-potentials (one for each ion)
int myTableIndex
index of distance table for the ion-el pair
void resize(size_type n, size_type m)
Resize the container.
RealType Lfactor2[8]
Lfactor1[l]=(l)/(l+1)
std::vector< RealType > lpol
static void gemv(int n, int m, const double *restrict amat, const double *restrict x, double *restrict y)
const DistanceTableAB & getDistTableAB(int table_ID) const
get a distance table by table_ID and dyanmic_cast to DistanceTableAB
std::vector< ValueType > wvec
Working arrays.
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
size_type size() const
return the current size
Return_t evaluateValueAndDerivatives(ParticleSet &P, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override
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
RandomBase< FullPrecRealType > * myRNG
random number generator
std::vector< RealType > vrad
QMCTraits::TensorType generateRandomRotationMatrix(RandomBase< QMCTraits::FullPrecRealType > &rng)
Create a random 3D rotation matrix using a random generator.
FullPrecRealType Return_t
type of return value of evaluate
Vector< ValueType > dlogpsi_vp
int lmax
Non Local part: angular momentum, potential and grid.
Class to represent a many-body trial wave function.
void makeMove(Index_t iat, const SingleParticlePos &displ, bool maybe_accept=true)
move the iat-th particle to active_pos_
Return_t value_
current value
int NumIons
number of ions
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
void evaluateDerivRatios(const VirtualParticleSet &VP, const opt_variables_type &optvars, std::vector< ValueType > &ratios, Matrix< ValueType > &dratio)
compute both ratios and deriatives of ratio with respect to the optimizables
std::vector< std::unique_ptr< NonLocalECPComponent > > PPset
unique NonLocalECPComponent to remove
void acceptMove(Index_t iat)
accept the move and update the particle attribute by the proposed move in regular mode ...
std::vector< RealType > sgridweight_m
weight of the spherical grid
aligned_vector< int > angpp_m
Angular momentum map.
TrialWaveFunction & Psi
target TrialWaveFunction
int num_active_vars
number of active variables