15 #ifndef QMCPLUSPLUS_BACKFLOW_ELEC_ION_SPINH 16 #define QMCPLUSPLUS_BACKFLOW_ELEC_ION_SPINH 54 throw std::runtime_error(
55 "Backflow_eI_spin is not ready for SoA! Please submit a feature request if it is needed!\n");
66 for (
int t = 0; t < els.
groups(); ++t)
79 void addFunc(
int source_g, FT* afunc,
int target_g)
85 APP_ABORT(
"Cannot mix spin-dependent with spin-indepdentent Jastrow");
91 Fmask(source_g, ig) = pid;
93 app_log() <<
" Adding functor of type " << source_g <<
" for all the target. " << std::endl;
98 RadFunc(source_g, target_g) = afunc;
100 app_log() <<
" Adding functor of type " << source_g <<
" for the target type " << target_g << std::endl;
106 auto clone = std::make_unique<Backflow_eI_spin<FT>>(
CenterSys, tqp);
140 RadFunc(i)->resetParameters(active);
148 RadFunc(i)->checkInVariables(active);
155 RadFunc(i)->checkOutVariables(active);
170 return RadFunc(i)->myVars.where(0);
182 for (
int i = 0; i < num; i++)
187 for (
int i = 0; i < num; i++)
190 for (
int i = 0; i < num; i++)
195 for (
int i = 0; i < num; i++)
198 for (
int i = 0; i < num; i++)
201 for (
int i = 0; i < num; i++)
206 for (
int i = 0; i < num; i++)
209 for (
int i = 0; i < num; i++)
212 for (
int i = 0; i < num; i++)
221 inline void restore(
int iat,
int UpdateType)
override 245 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluate")
272 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluate")
311 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluate")
350 const std::vector<int>& index)
override 360 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluatePbyP")
381 const std::vector<int>& index,
389 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluatePbyP")
417 const std::vector<int>& index,
430 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluatePbyP")
463 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluateBmatOnly")
498 APP_ABORT(
"SoA implementation needed for Backflow_eI_spin::evaluateWithDerivatives")
int NumTargets
number of quantum particles
void evaluate(const ParticleSet &P, ParticleSet &QP, GradVector &Bmat, HessMatrix &Amat)
helper functions for EinsplineSetBuilder
void addFunc(int source_g, FT *afunc, int target_g)
void acceptMove(int iat, int UpdateMode) override
void resetParameters(const opt_variables_type &active) override
Backflow_eI_spin(ParticleSet &ions, ParticleSet &els)
int indexOffset() override
Base class for backflow transformations.
void resize(size_type n, size_type m)
Resize the container.
bool isOptimizable() override
void evaluate(const ParticleSet &P, ParticleSet &QP) override
calculate quasi-particle coordinates only
Attaches a unit to a Vector for IO.
void evaluate(const ParticleSet &P, ParticleSet &QP, GradMatrix &Bmat_full, HessMatrix &Amat) override
calculate quasi-particle coordinates, Bmat and Amat
int NumCenters
number of centers, e.g., ions
void evaluatePbyP(const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP, HessMatrix &Amat) override
calculate quasi-particle coordinates and Amat after pbyp move
int groups() const
return the number of groups
void evaluatePbyP(const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP, GradMatrix &Bmat_full, HessMatrix &Amat) override
calculate quasi-particle coordinates, Bmat and Amat after pbyp move
Specialized paritlce class for atomistic simulations.
const int myTableIndex_
distance table index
std::vector< int > s_offset
index offset for the source particles
void evaluatePbyP(const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index, GradMatrix &Bmat_full, HessMatrix &Amat) override
calculate quasi-particle coordinates, Bmat and Amat after pbyp move
void checkInVariables(opt_variables_type &active) override
class to handle a set of variables that can be modified during optimizations
void evaluateBmatOnly(const ParticleSet &P, GradMatrix &Bmat_full) override
calculate only Bmat This is used in pbyp moves, in updateBuffer()
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
void registerData(WFBufferType &buf) override
int last(int igroup) const
return the last index of a group i
void reportStatus(std::ostream &os) override
std::vector< int > t_offset
index offset for the target particles
ParticleSet & CenterSys
Reference to the center.
void checkOutVariables(const opt_variables_type &active) override
void evaluatePbyP(const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP) override
calculate quasi-particle coordinates after pbyp move
void evaluateWithDerivatives(const ParticleSet &P, ParticleSet &QP, GradMatrix &Bmat_full, HessMatrix &Amat, GradMatrix &Cmat, GradMatrix &Ymat, HessArray &Xmat) override
calculate quasi-particle coordinates, Bmat and Amat calculate derivatives wrt to variational paramete...
std::vector< TinyVector< RealType, 3 > > derivs
void resize(int NT, int NC)
void restore(int iat, int UpdateType) override
~Backflow_eI_spin() override
void evaluatePbyP(const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index) override
calculate quasi-particle coordinates after pbyp move
void evaluatePbyP(const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index, HessMatrix &Amat) override
calculate quasi-particle coordinates and Amat after pbyp move
Vector< PosType > UIJ_temp
void add(std::complex< T1 > &x)
std::unique_ptr< BackflowFunctionBase > makeClone(ParticleSet &tqp) const override