13 #ifndef QMCPLUSPLUS_TWFFASTDERIVWRAPPER_H 14 #define QMCPLUSPLUS_TWFFASTDERIVWRAPPER_H 120 std::vector<ValueMatrix>& mvec,
121 std::vector<GradMatrix>& gmat,
122 std::vector<ValueMatrix>& lmat)
const;
135 std::vector<std::vector<ValueMatrix>>& dmvec)
const;
151 std::vector<std::vector<ValueMatrix>>& dmvec,
152 std::vector<std::vector<GradMatrix>>& dgmat,
153 std::vector<std::vector<ValueMatrix>>& dlmat)
const;
216 void getGSMatrices(
const std::vector<ValueMatrix>&
A, std::vector<ValueMatrix>& Aslice)
const;
227 const std::vector<ValueMatrix>& X,
228 const std::vector<ValueMatrix>& dM,
229 const std::vector<ValueMatrix>& dB)
const;
241 void invertMatrices(
const std::vector<ValueMatrix>& M, std::vector<ValueMatrix>& Minv);
250 void buildX(
const std::vector<ValueMatrix>& Minv,
const std::vector<ValueMatrix>&
B, std::vector<ValueMatrix>& X);
266 ValueType trAB(
const std::vector<ValueMatrix>&
A,
const std::vector<ValueMatrix>&
B);
base class for Single-particle orbital sets
std::vector< SPOSet * > spos_
std::vector< WaveFunctionComponent * > jastrow_list_
IndexType numGroups() const
These are query functions to the internal state of various groups and SPOSet info.
helper functions for EinsplineSetBuilder
QTBase::GradType GradType
std::vector< ValueMatrix > psi_M_
QTBase::RealType RealType
QMCTraits::RealType RealType
ValueType trAB(const std::vector< ValueMatrix > &A, const std::vector< ValueMatrix > &B)
Returns Tr(A*B).
RealType evaluateJastrowRatio(ParticleSet &P, const int iel) const
Given a proposed move of electron iel from r->r', computes exp(J')/exp(J)
GradType evaluateJastrowGradSource(ParticleSet &P, ParticleSet &source, const int iat) const
Return ionic gradient of J(r).
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
LatticeGaussianProduct::GradType GradType
void getEGradELaplM(const ParticleSet &P, std::vector< ValueMatrix > &mvec, std::vector< GradMatrix > &gmat, std::vector< ValueMatrix > &lmat) const
Returns value, gradient, and laplacian matrices for all orbitals and all particles, species by species.
IndexType numOrbitals(const IndexType sid) const
Attaches a unit to a Vector for IO.
TWFFastDerivWrapper is a wrapper class for TrialWavefunction that provides separate and low level acc...
void getIonGradM(const ParticleSet &P, const ParticleSet &source, const int iat, std::vector< std::vector< ValueMatrix >> &dmvec) const
Returns x,y,z components of ion gradient of slater matrices.
OrbitalSetTraits< ValueType >::ValueVector ValueVector
ValueType computeGSDerivative(const std::vector< ValueMatrix > &Minv, const std::vector< ValueMatrix > &X, const std::vector< ValueMatrix > &dM, const std::vector< ValueMatrix > &dB) const
Calculates derivative of observable via Tr[M^{-1} dB - X * dM ].
void getGSMatrices(const std::vector< ValueMatrix > &A, std::vector< ValueMatrix > &Aslice) const
Takes sub matrices of full SPOSet quantities (evaluated on all particles and all orbitals), consistent with ground state occupations.
QMCTraits::IndexType IndexType
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
An abstract class for a component of a many-body trial wave function.
TWFFastDerivWrapper()=default
Specialized paritlce class for atomistic simulations.
SPOSet::GradMatrix GradMatrix
RealType calcJastrowRatioGrad(ParticleSet &P, const int iel, GradType &grad) const
Given a proposed move of electron iel from r->r', computes exp(J(r'))/exp(J(r)) and grad_iel(J(r'))...
QTBase::ValueType ValueType
OrbitalSetTraits< ValueType >::ValueVector ValueVector
void getM(const ParticleSet &P, std::vector< ValueMatrix > &mmat) const
Returns the non-rectangular slater matrices M_ij=phi_j(r_i) (N_particle x N_orbs) for each species gr...
OHMMS_INDEXTYPE IndexType
define other types
QMCTraits::ValueType ValueType
QMCTraits::IndexType IndexType
std::vector< IndexType > groups_
SPOSet::ValueVector ValueVector
OrbitalSetTraits< ValueType >::GradVector GradVector
IndexType getRowM(const ParticleSet &P, const IndexType iel, ValueVector &val) const
Returns value of all orbitals (relevant to given species/group) at a particular particle coordinate...
void addJastrow(WaveFunctionComponent *j)
SPOSet::ValueMatrix ValueMatrix
SPOSet::HessMatrix HessMatrix
void getIonGradIonGradELaplM(const ParticleSet &P, const ParticleSet &source, int iat, std::vector< std::vector< ValueMatrix >> &dmvec, std::vector< std::vector< GradMatrix >> &dgmat, std::vector< std::vector< ValueMatrix >> &dlmat) const
Returns x,y,z components of ion gradient of slater matrices and their laplacians. ...
void wipeMatrices(std::vector< ValueMatrix > &A)
Goes through a list of matrices and zeros them out.
LatticeGaussianProduct::ValueType ValueType
IndexType getTWFGroupIndex(const IndexType gid) const
Takes particle set groupID and returns the TWF internal index for it.
Declaration of WaveFunctionComponent.
double B(double x, int k, int i, const std::vector< double > &t)
RealType evaluateJastrowVGL(const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) const
Evaluates value, gradient, and laplacian of the total jastrow.
void buildX(const std::vector< ValueMatrix > &Minv, const std::vector< ValueMatrix > &B, std::vector< ValueMatrix > &X)
Build the auxiliary X=M^-1 B M^-1 matrix.
SPOSet * getSPOSet(const IndexType sid) const
std::vector< ValueMatrix > psi_M_inv_
SPOSet::GradVector GradVector
void invertMatrices(const std::vector< ValueMatrix > &M, std::vector< ValueMatrix > &Minv)
Helper function that inverts all slater matrices in our species list.
void addGroup(const ParticleSet &P, const IndexType groupid, SPOSet *spo)
Add a particle group.
OrbitalSetTraits< ValueType >::HessMatrix HessMatrix