13 #ifndef QMCPLUSPLUS_SPINORSET_H 14 #define QMCPLUSPLUS_SPINORSET_H 43 void set_spos(std::unique_ptr<SPOSet>&& up, std::unique_ptr<SPOSet>&& dn);
59 const std::pair<ValueVector, ValueVector>& spinor_multipler,
61 std::vector<ValueType>& ratios)
override;
102 OffloadMatrix<ComplexType>& mw_dspin)
const override;
119 const std::vector<const ValueType*>& invRow_ptr_list,
121 std::vector<ValueType>& ratios,
122 std::vector<GradType>& grads,
123 std::vector<ValueType>& spingrads)
const override;
181 std::unique_ptr<SPOSet>
makeClone()
const override;
std::pair< RefVectorWithLeader< SPOSet >, RefVectorWithLeader< SPOSet > > extractSpinComponentRefList(const RefVectorWithLeader< SPOSet > &spo_list) const
base class for Single-particle orbital sets
std::unique_ptr< SPOSet > makeClone() const override
make a clone of itself every derived class must implement this to have threading working correctly...
Class for Melton & Mitas style Spinors.
void evaluateVGL_spin(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, ValueVector &dspin) override
evaluate the values, gradients and laplacians of this single-particle orbital set ...
void createResource(ResourceCollection &collection) const override
initialize a shared resource and hand it to collection
helper functions for EinsplineSetBuilder
void evaluate_spin(const ParticleSet &P, int iat, ValueVector &psi, ValueVector &dpsi) override
Evaluate the values, spin gradients, and spin laplacians of single particle spinors corresponding to ...
void storeParamsBeforeRotation() override
store parameters before getting destroyed by rotation.
ValueMatrix logpsi_work_up
ResourceHandle< SpinorSetMultiWalkerResource > mw_res_handle_
void setOrbitalSetSize(int norbs) override
set the OrbitalSetSize
void mw_evaluateVGLandDetRatioGradsWithSpin(const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const std::vector< const ValueType *> &invRow_ptr_list, OffloadMWVGLArray &phi_vgl_v, std::vector< ValueType > &ratios, std::vector< GradType > &grads, std::vector< ValueType > &spingrads) const override
evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ra...
void releaseResource(ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const override
return a shared resource to collection
ValueVector d2psi_work_down
ResourceHandle manages the temporary resource referenced from a collection.
A ParticleSet that handles virtual moves of a selected particle of a given physical ParticleSet Virtu...
std::unique_ptr< SPOSet > spo_up
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
void evaluate_notranspose(const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet) override
evaluate the values, gradients and laplacians of this single-particle orbital for [first...
ValueVector d2psi_work_up
void mw_evaluate_notranspose(const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int first, int last, const RefVector< ValueMatrix > &logdet_list, const RefVector< GradMatrix > &dlogdet_list, const RefVector< ValueMatrix > &d2logdet_list) const override
OrbitalSetTraits< ValueType >::ValueVector ValueVector
void evaluateVGL(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) override
evaluate the values, gradients and laplacians of this single-particle orbital set ...
void evaluateValue(const ParticleSet &P, int iat, ValueVector &psi) override
evaluate the values of this spinor set
void acquireResource(ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const override
acquire a shared resource from collection
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
Specialized paritlce class for atomistic simulations.
Array< ValueType, 3, OffloadPinnedAllocator< ValueType > > OffloadMWVGLArray
ValueMatrix d2logpsi_work_up
GradMatrix dlogpsi_work_down
bool isOptimizable() const override
Query if this SPOSet is optimizable.
void applyRotation(const ValueMatrix &rot_mat, bool use_stored_copy) override
apply rotation to all the orbitals
OrbitalSetTraits< ValueType >::ValueVector ValueVector
SpinorSet(const std::string &my_name)
constructor
std::string getClassName() const override
return class name
std::unique_ptr< SPOSet > spo_dn
ValueMatrix logpsi_work_down
bool isOMPoffload() const override
Query if this SPOSet uses OpenMP offload.
GradMatrix dlogpsi_work_up
std::vector< std::reference_wrapper< T > > RefVector
virtual void evaluateGradSource(const ParticleSet &P, int first, int last, const ParticleSet &source, int iat_src, GradMatrix &gradphi) override
evaluate the gradients of this single-particle orbital for [first,last) target particles with respect...
void mw_evaluateVGLWithSpin(const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const RefVector< ValueVector > &psi_v_list, const RefVector< GradVector > &dpsi_v_list, const RefVector< ValueVector > &d2psi_v_list, OffloadMatrix< ComplexType > &mw_dspin) const override
evaluate the values, gradients and laplacians and spin gradient of this single-particle orbital sets ...
OrbitalSetTraits< ValueType >::GradVector GradVector
bool hasIonDerivs() const override
Query if this SPOSet has an explicit ion dependence.
GradVector dpsi_work_down
void evaluateDetSpinorRatios(const VirtualParticleSet &VP, ValueVector &psi, const std::pair< ValueVector, ValueVector > &spinor_multipler, const ValueVector &invrow, std::vector< ValueType > &ratios) override
evaluate determinant ratios for virtual moves, specifically for Spinor SPOSets
void set_spos(std::unique_ptr< SPOSet > &&up, std::unique_ptr< SPOSet > &&dn)
ValueVector psi_work_down
bool isRotationSupported() const override
return true if this SPOSet can be wrappered by RotatedSPO
void evaluate_notranspose_spin(const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet, ValueMatrix &dspinlogdet) override
evaluate the values, gradients and laplacians of this single-particle orbital for [first...
ValueMatrix d2logpsi_work_down
bool isResourceOwned() const
check if the multi walker resource is owned. For testing only.