![]() |
QMCPACK
|
class to match std::complex<ST> spline with BsplineSet::ValueType (real) SPOs with OpenMP offload More...
Public Member Functions | |
SplineC2ROMPTarget (const std::string &my_name) | |
SplineC2ROMPTarget (const SplineC2ROMPTarget &in) | |
virtual std::string | getClassName () const override |
return class name More... | |
virtual std::string | getKeyword () const override |
bool | isComplex () const override |
virtual bool | isOMPoffload () const override |
Query if this SPOSet uses OpenMP offload. More... | |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const override |
acquire a shared resource from collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const override |
return a shared resource to collection More... | |
std::unique_ptr< SPOSet > | makeClone () const override |
make a clone of itself every derived class must implement this to have threading working correctly. More... | |
void | resizeStorage (size_t n, size_t nvals) |
void | bcast_tables (Communicate *comm) |
void | gather_tables (Communicate *comm) |
template<typename GT , typename BCT > | |
void | create_spline (GT &xyz_g, BCT &xyz_bc) |
void | finalizeConstruction () override |
this routine can not be called from threaded region More... | |
void | flush_zero () |
void | resize_kpoints () |
remap kPoints to pack the double copy More... | |
void | set_spline (SingleSplineType *spline_r, SingleSplineType *spline_i, int twist, int ispline, int level) |
bool | read_splines (hdf_archive &h5f) |
bool | write_splines (hdf_archive &h5f) |
void | assign_v (const PointType &r, const vContainer_type &myV, ValueVector &psi, int first, int last) const |
virtual void | evaluateValue (const ParticleSet &P, const int iat, ValueVector &psi) override |
evaluate the values of this single-particle orbital set More... | |
virtual void | evaluateDetRatios (const VirtualParticleSet &VP, ValueVector &psi, const ValueVector &psiinv, std::vector< ValueType > &ratios) override |
evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP More... | |
virtual void | mw_evaluateDetRatios (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, const RefVector< ValueVector > &psi_list, const std::vector< const ValueType *> &invRow_ptr_list, std::vector< std::vector< ValueType >> &ratios_list) const override |
evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP, of multiple walkers More... | |
void | assign_vgl_from_l (const PointType &r, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) |
assign_vgl_from_l can be used when myL is precomputed and myV,myG,myL in cartesian More... | |
virtual void | evaluateVGL (const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) override |
evaluate the values, gradients and laplacians of this single-particle orbital set More... | |
virtual void | mw_evaluateVGL (const RefVectorWithLeader< SPOSet > &sa_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) const override |
evaluate the values, gradients and laplacians of this single-particle orbital sets of multiple walkers More... | |
virtual void | mw_evaluateVGLandDetRatioGrads (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) const override |
evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ratio and grads of multiple walkers. More... | |
void | assign_vgh (const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, int first, int last) const |
virtual void | evaluateVGH (const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi) override |
evaluate the values, gradients and hessians of this single-particle orbital set More... | |
void | assign_vghgh (const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi, int first=0, int last=-1) const |
virtual void | evaluateVGHGH (const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi) override |
evaluate the values, gradients, hessians, and grad hessians of this single-particle orbital set More... | |
virtual 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,last) particles More... | |
![]() | |
BsplineSet (const std::string &my_name) | |
auto & | getHalfG () const |
void | init_base (int n) |
int | remap_kpoints () |
remap kpoints to group general kpoints & special kpoints More... | |
void | setOrbitalSetSize (int norbs) override |
set the OrbitalSetSize More... | |
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 |
void | evaluate_notranspose (const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, HessMatrix &grad_grad_logdet) override |
evaluate the values, gradients and hessians of this single-particle orbital for [first,last) particles More... | |
void | evaluate_notranspose (const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, HessMatrix &grad_grad_logdet, GGGMatrix &grad_grad_grad_logdet) override |
evaluate the values, gradients, hessians and third derivatives of this single-particle orbital for [first,last) particles More... | |
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 to the given source particle More... | |
void | evaluateGradSource (const ParticleSet &P, int first, int last, const ParticleSet &source, int iat_src, GradMatrix &grad_phi, HessMatrix &grad_grad_phi, GradMatrix &grad_lapl_phi) override |
evaluate the gradients of values, gradients, laplacians of this single-particle orbital for [first,last) target particles with respect to the given source particle More... | |
virtual void | evaluateDetRatios (const VirtualParticleSet &VP, ValueVector &psi, const ValueVector &psiinv, std::vector< ValueType > &ratios) |
evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP More... | |
virtual void | evaluateValue (const ParticleSet &P, int iat, ValueVector &psi)=0 |
evaluate the values of this single-particle orbital set More... | |
virtual void | evaluateVGH (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi) |
evaluate the values, gradients and hessians of this single-particle orbital set More... | |
virtual void | evaluateVGHGH (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi) |
evaluate the values, gradients, hessians, and grad hessians of this single-particle orbital set More... | |
virtual void | evaluateVGL (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi)=0 |
evaluate the values, gradients and laplacians of this single-particle orbital set More... | |
virtual void | finalizeConstruction () |
finalize the construction of SPOSet More... | |
virtual void | mw_evaluateDetRatios (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, const RefVector< ValueVector > &psi_list, const std::vector< const ValueType * > &invRow_ptr_list, std::vector< std::vector< ValueType >> &ratios_list) const |
evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP, of multiple walkers More... | |
virtual void | mw_evaluateVGL (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) const |
evaluate the values, gradients and laplacians of this single-particle orbital sets of multiple walkers More... | |
virtual void | mw_evaluateVGLandDetRatioGrads (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) const |
evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ratio and grads of multiple walkers. More... | |
virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const |
acquire a shared resource from collection More... | |
virtual void | createResource (ResourceCollection &collection) const |
initialize a shared resource and hand it to collection More... | |
virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const |
return a shared resource to collection More... | |
![]() | |
SPOSet (const std::string &my_name) | |
constructor More... | |
virtual | ~SPOSet ()=default |
destructor More... | |
int | size () const |
return the size of the orbital set Ye: this needs to be replaced by getOrbitalSetSize(); More... | |
void | basic_report (const std::string &pad="") const |
print basic SPOSet information More... | |
virtual void | report (const std::string &pad="") const |
print SPOSet information More... | |
int | getOrbitalSetSize () const |
return the size of the orbitals More... | |
virtual bool | isOptimizable () const |
Query if this SPOSet is optimizable. More... | |
virtual void | extractOptimizableObjectRefs (UniqueOptObjRefs &opt_obj_refs) |
extract underlying OptimizableObject references More... | |
virtual void | checkOutVariables (const opt_variables_type &active) |
check out variational optimizable variables More... | |
virtual bool | hasIonDerivs () const |
Query if this SPOSet has an explicit ion dependence. More... | |
virtual void | checkObject () const |
check a few key parameters before putting the SPO into a determinant More... | |
virtual bool | isRotationSupported () const |
return true if this SPOSet can be wrappered by RotatedSPO More... | |
virtual void | storeParamsBeforeRotation () |
store parameters before getting destroyed by rotation. More... | |
virtual void | applyRotation (const ValueMatrix &rot_mat, bool use_stored_copy=false) |
apply rotation to all the orbitals More... | |
virtual void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi, const int &FirstIndex, const int &LastIndex) |
Parameter derivatives of the wavefunction and the Laplacian of the wavefunction. More... | |
virtual void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, int FirstIndex, int LastIndex) |
Parameter derivatives of the wavefunction. More... | |
virtual void | evaluateDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi, const ValueType &psiCurrent, const std::vector< ValueType > &Coeff, const std::vector< size_t > &C2node_up, const std::vector< size_t > &C2node_dn, const ValueVector &detValues_up, const ValueVector &detValues_dn, const GradMatrix &grads_up, const GradMatrix &grads_dn, const ValueMatrix &lapls_up, const ValueMatrix &lapls_dn, const ValueMatrix &M_up, const ValueMatrix &M_dn, const ValueMatrix &Minv_up, const ValueMatrix &Minv_dn, const GradMatrix &B_grad, const ValueMatrix &B_lapl, const std::vector< int > &detData_up, const size_t N1, const size_t N2, const size_t NP1, const size_t NP2, const std::vector< std::vector< int >> &lookup_tbl) |
Evaluate the derivative of the optimized orbitals with respect to the parameters this is used only for MSD, to be refined for better serving both single and multi SD. More... | |
virtual void | evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, const QTFull::ValueType &psiCurrent, const std::vector< ValueType > &Coeff, const std::vector< size_t > &C2node_up, const std::vector< size_t > &C2node_dn, const ValueVector &detValues_up, const ValueVector &detValues_dn, const ValueMatrix &M_up, const ValueMatrix &M_dn, const ValueMatrix &Minv_up, const ValueMatrix &Minv_dn, const std::vector< int > &detData_up, const std::vector< std::vector< int >> &lookup_tbl) |
Evaluate the derivative of the optimized orbitals with respect to the parameters this is used only for MSD, to be refined for better serving both single and multi SD. More... | |
virtual void | evaluateDetSpinorRatios (const VirtualParticleSet &VP, ValueVector &psi, const std::pair< ValueVector, ValueVector > &spinor_multiplier, const ValueVector &invrow, std::vector< ValueType > &ratios) |
evaluate determinant ratios for virtual moves, specifically for Spinor SPOSets More... | |
virtual void | evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, ValueVector &psi, const ValueVector &psiinv, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios, int FirstIndex, int LastIndex) |
Determinant ratios and parameter derivatives of the wavefunction for virtual moves. More... | |
virtual void | evaluateVGL_spin (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, ValueVector &dspin) |
evaluate the values, gradients and laplacians and spin gradient of this single-particle orbital set More... | |
virtual void | mw_evaluateValue (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const RefVector< ValueVector > &psi_v_list) const |
evaluate the values this single-particle orbital sets of multiple walkers More... | |
virtual 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 |
evaluate the values, gradients and laplacians and spin gradient of this single-particle orbital sets of multiple walkers More... | |
virtual 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 |
evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ratio and grads of multiple walkers. More... | |
virtual void | evaluate_spin (const ParticleSet &P, int iat, ValueVector &psi, ValueVector &dpsi) |
evaluate the values of this single-particle orbital set More... | |
virtual void | evaluateThirdDeriv (const ParticleSet &P, int first, int last, GGGMatrix &grad_grad_grad_logdet) |
evaluate the third derivatives of this single-particle orbital set More... | |
virtual void | evaluate_notranspose_spin (const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet, ValueMatrix &dspinlogdet) |
evaluate the values, gradients and laplacians of this single-particle orbital for [first,last) particles, including the spin gradient More... | |
virtual void | evaluateGradSourceRow (const ParticleSet &P, int iel, const ParticleSet &source, int iat_src, GradVector &gradphi) |
Returns a row of d/dR_iat phi_j(r) evaluated at position r. More... | |
virtual PosType | get_k (int orb) |
access the k point related to the given orbital More... | |
virtual bool | transformSPOSet () |
Used only by cusp correction in AOS LCAO. More... | |
const std::string & | getName () const |
return object name More... | |
Protected Attributes | |
vContainer_type | myV |
intermediate result vectors More... | |
vContainer_type | myL |
gContainer_type | myG |
hContainer_type | myH |
ghContainer_type | mygH |
![]() | |
size_t | MyIndex |
Index of this adoptor, when multiple adoptors are used for NUMA or distributed cases. More... | |
size_t | first_spo |
first index of the SPOs this Spline handles More... | |
size_t | last_spo |
last index of the SPOs this Spline handles More... | |
TinyVector< int, D > | HalfG |
sign bits at the G/2 boundaries More... | |
std::vector< bool > | MakeTwoCopies |
flags to unpack sin/cos More... | |
std::vector< SPOSet::PosType > | kPoints |
kpoints for each unique orbitals. More... | |
aligned_vector< int > | BandIndexMap |
remap splines to orbitals More... | |
std::vector< int > | offset |
band offsets used for communication More... | |
![]() | |
const std::string | my_name_ |
name of the object, unique identifier More... | |
IndexType | OrbitalSetSize |
number of Single-particle orbitals More... | |
opt_variables_type | myVars |
Optimizable variables. More... | |
Private Member Functions | |
void | evaluateVGLMultiPos (const Vector< ST, OffloadPinnedAllocator< ST >> &multi_pos_copy, Vector< ST, OffloadPinnedAllocator< ST >> &offload_scratch, Vector< TT, OffloadPinnedAllocator< TT >> &results_scratch, const RefVector< ValueVector > &psi_v_list, const RefVector< GradVector > &dpsi_v_list, const RefVector< ValueVector > &d2psi_v_list) const |
Private Attributes | |
NewTimer & | offload_timer_ |
timer for offload portion More... | |
CrystalLattice< ST, 3 > | PrimLattice |
primitive cell More... | |
Tensor< ST, 3 > | GGt |
![]() | |
int | nComplexBands |
number of complex bands More... | |
std::shared_ptr< MultiBspline< ST, OffloadAllocator< ST >, OffloadAllocator< SplineType > > > | SplineInst |
multi bspline set More... | |
std::shared_ptr< OffloadVector< ST > > | mKK |
std::shared_ptr< OffloadPosVector< ST > > | myKcart |
std::shared_ptr< OffloadVector< ST > > | GGt_offload |
std::shared_ptr< OffloadVector< ST > > | PrimLattice_G_offload |
ResourceHandle< SplineOMPTargetMultiWalkerMem< ST, TT > > | mw_mem_handle_ |
Matrix< TT, OffloadPinnedAllocator< TT > > | ratios_private |
team private ratios for reduction, numVP x numTeams More... | |
Vector< ST, OffloadPinnedAllocator< ST > > | offload_scratch |
offload scratch space, dynamically resized to the maximal need More... | |
Vector< TT, OffloadPinnedAllocator< TT > > | results_scratch |
result scratch space, dynamically resized to the maximal need More... | |
Vector< TT, OffloadPinnedAllocator< TT > > | psiinv_pos_copy |
psiinv and position scratch space, used to avoid allocation on the fly and faster transfer More... | |
Vector< ST, OffloadPinnedAllocator< ST > > | multi_pos_copy |
position scratch space, used to avoid allocation on the fly and faster transfer More... | |
Friends | |
template<class BSPLINESPO > | |
class | SplineSetReader |
struct | BsplineReader |
Additional Inherited Members | |
![]() | |
static const int | D = DIM |
class to match std::complex<ST> spline with BsplineSet::ValueType (real) SPOs with OpenMP offload
ST | precision of spline |
Requires temporage storage and multiplication of phase vectors The internal storage of complex spline coefficients uses double sized real arrays of ST type, aligned and padded. Calling assign_v assign_vgl should be restricted to the actual number of complex splines (kPoints.size()). The first nComplexBands complex splines produce 2 real orbitals. The rest complex splines produce 1 real orbital. All the output orbitals are real (C2R). The maximal number of output orbitals is OrbitalSetSize.
Definition at line 44 of file SplineC2ROMPTarget.h.
Definition at line 48 of file SplineC2ROMPTarget.h.
using DataType = ST |
Definition at line 49 of file SplineC2ROMPTarget.h.
using gContainer_type = VectorSoaContainer<ST, 3> |
Definition at line 60 of file SplineC2ROMPTarget.h.
using ghContainer_type = VectorSoaContainer<ST, 10> |
Definition at line 62 of file SplineC2ROMPTarget.h.
using hContainer_type = VectorSoaContainer<ST, 6> |
Definition at line 61 of file SplineC2ROMPTarget.h.
using OffloadPosVector = VectorSoaContainer<DT, 3, OffloadAllocator<DT> > |
Definition at line 67 of file SplineC2ROMPTarget.h.
using OffloadVector = Vector<DT, OffloadAllocator<DT> > |
Definition at line 65 of file SplineC2ROMPTarget.h.
using PointType = TinyVector<ST, 3> |
Definition at line 50 of file SplineC2ROMPTarget.h.
using SingleSplineType = UBspline_3d_d |
Definition at line 51 of file SplineC2ROMPTarget.h.
using SplineType = typename bspline_traits<ST, 3>::SplineType |
Definition at line 47 of file SplineC2ROMPTarget.h.
using TT = typename BsplineSet::ValueType |
Definition at line 53 of file SplineC2ROMPTarget.h.
using vContainer_type = Vector<ST, aligned_allocator<ST> > |
Definition at line 59 of file SplineC2ROMPTarget.h.
|
inline |
Definition at line 115 of file SplineC2ROMPTarget.h.
|
default |
|
inlineoverridevirtual |
acquire a shared resource from collection
Reimplemented from SPOSet.
Definition at line 135 of file SplineC2ROMPTarget.h.
References RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), ResourceCollection::lendResource(), and SplineC2ROMPTarget< ST >::mw_mem_handle_.
|
inline |
Definition at line 55 of file SplineC2ROMPTarget.cpp.
References TinyVector< T, D >::data(), omptarget::min(), qmcplusplus::Units::time::s, and qmcplusplus::sincos().
void assign_vgh | ( | const PointType & | r, |
ValueVector & | psi, | ||
GradVector & | dpsi, | ||
HessVector & | grad_grad_psi, | ||
int | first, | ||
int | last | ||
) | const |
Definition at line 928 of file SplineC2ROMPTarget.cpp.
References TinyVector< T, D >::data(), omptarget::min(), qmcplusplus::Units::time::s, qmcplusplus::sincos(), and qmcplusplus::v_m_v().
void assign_vghgh | ( | const PointType & | r, |
ValueVector & | psi, | ||
GradVector & | dpsi, | ||
HessVector & | grad_grad_psi, | ||
GGGVector & | grad_grad_grad_psi, | ||
int | first = 0 , |
||
int | last = -1 |
||
) | const |
Definition at line 1185 of file SplineC2ROMPTarget.cpp.
References TinyVector< T, D >::data(), omptarget::min(), qmcplusplus::Units::time::s, qmcplusplus::sincos(), qmcplusplus::t3_contract(), and qmcplusplus::v_m_v().
|
inline |
assign_vgl_from_l can be used when myL is precomputed and myV,myG,myL in cartesian
Definition at line 405 of file SplineC2ROMPTarget.cpp.
References ASSUME_ALIGNED, TinyVector< T, D >::data(), qmcplusplus::Units::force::N, qmcplusplus::Units::time::s, and qmcplusplus::sincos().
|
inline |
Definition at line 162 of file SplineC2ROMPTarget.h.
References qmcplusplus::comm, and SplineC2ROMPTarget< ST >::SplineInst.
|
inline |
Definition at line 179 of file SplineC2ROMPTarget.h.
References qmcplusplus::app_log(), SplineC2ROMPTarget< ST >::myV, SplineC2ROMPTarget< ST >::resize_kpoints(), Vector< T, Alloc >::size(), and SplineC2ROMPTarget< ST >::SplineInst.
|
inlineoverridevirtual |
initialize a shared resource and hand it to collection
Reimplemented from SPOSet.
Definition at line 130 of file SplineC2ROMPTarget.h.
References ResourceCollection::addResource().
|
overridevirtual |
evaluate the values, gradients and laplacians of this single-particle orbital for [first,last) particles
[in] | P | current ParticleSet |
[in] | first | starting index of the particles |
[in] | last | ending index of the particles |
[out] | logdet | determinant matrix to be inverted |
[out] | dlogdet | gradients |
[out] | d2logdet | laplacians |
Reimplemented from BsplineSet.
Definition at line 1695 of file SplineC2ROMPTarget.cpp.
References ParticleSet::activeR(), and omptarget::min().
|
overridevirtual |
evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP
VP | virtual particle set |
psi | values of the SPO, used as a scratch space if needed |
psiinv | the row of inverse slater matrix corresponding to the particle moved virtually |
ratios | return determinant ratios |
Reimplemented from SPOSet.
Definition at line 172 of file SplineC2ROMPTarget.cpp.
References ParticleSet::activeR(), qmcplusplus::C2R::assign_v(), qmcplusplus::syclBLAS::copy_n(), VirtualParticleSet::getTotalNum(), omptarget::min(), and TinyVector< T, D >::size().
|
overridevirtual |
evaluate the values of this single-particle orbital set
P | current ParticleSet |
iat | active particle |
psi | values of the SPO |
Implements SPOSet.
Definition at line 100 of file SplineC2ROMPTarget.cpp.
References ParticleSet::activeR(), qmcplusplus::C2C::assign_v(), qmcplusplus::C2R::assign_v(), TinyVector< T, D >::data(), FairDivideAligned(), omptarget::min(), omp_get_num_threads(), and omp_get_thread_num().
|
overridevirtual |
evaluate the values, gradients and hessians of this single-particle orbital set
P | current ParticleSet |
iat | active particle |
psi | values of the SPO |
dpsi | gradients of the SPO |
grad_grad_psi | hessians of the SPO |
Reimplemented from SPOSet.
Definition at line 1166 of file SplineC2ROMPTarget.cpp.
References ParticleSet::activeR(), FairDivideAligned(), omp_get_num_threads(), and omp_get_thread_num().
|
overridevirtual |
evaluate the values, gradients, hessians, and grad hessians of this single-particle orbital set
P | current ParticleSet |
iat | active particle |
psi | values of the SPO |
dpsi | gradients of the SPO |
grad_grad_psi | hessians of the SPO |
grad_grad_grad_psi | grad hessians of the SPO |
Reimplemented from SPOSet.
Definition at line 1675 of file SplineC2ROMPTarget.cpp.
References ParticleSet::activeR(), FairDivideAligned(), omp_get_num_threads(), and omp_get_thread_num().
|
overridevirtual |
evaluate the values, gradients and laplacians of this single-particle orbital set
P | current ParticleSet |
iat | active particle |
psi | values of the SPO |
dpsi | gradients of the SPO |
d2psi | laplacians of the SPO |
Implements SPOSet.
Definition at line 532 of file SplineC2ROMPTarget.cpp.
References ParticleSet::activeR(), qmcplusplus::C2R::assign_vgl(), TinyVector< T, D >::data(), qmcplusplus::HESS00, qmcplusplus::HESS01, qmcplusplus::HESS02, qmcplusplus::HESS11, qmcplusplus::HESS12, qmcplusplus::HESS22, qmcplusplus::LAPL, omptarget::min(), qmcplusplus::NUM_FIELDS, TinyVector< T, D >::size(), and qmcplusplus::SymTrace().
|
private |
Definition at line 621 of file SplineC2ROMPTarget.cpp.
References qmcplusplus::C2R::assign_vgl(), qmcplusplus::HESS00, qmcplusplus::HESS01, qmcplusplus::HESS02, qmcplusplus::HESS11, qmcplusplus::HESS12, qmcplusplus::HESS22, qmcplusplus::LAPL, omptarget::min(), qmcplusplus::NUM_FIELDS, and qmcplusplus::SymTrace().
|
inlineoverridevirtual |
this routine can not be called from threaded region
Reimplemented from SPOSet.
Definition at line 190 of file SplineC2ROMPTarget.h.
References CrystalLattice< T, D >::G, SplineC2ROMPTarget< ST >::GGt, SplineC2ROMPTarget< ST >::GGt_offload, SplineC2ROMPTarget< ST >::mKK, SplineC2ROMPTarget< ST >::myKcart, SplineC2ROMPTarget< ST >::PrimLattice, SplineC2ROMPTarget< ST >::PrimLattice_G_offload, and SplineC2ROMPTarget< ST >::SplineInst.
|
inline |
Definition at line 217 of file SplineC2ROMPTarget.h.
References SplineC2ROMPTarget< ST >::SplineInst.
|
inline |
Definition at line 164 of file SplineC2ROMPTarget.h.
References qmcplusplus::comm, FairDivideLow(), gatherv(), BsplineSet::kPoints, BsplineSet::offset, Communicate::size(), and SplineC2ROMPTarget< ST >::SplineInst.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements BsplineSet.
Definition at line 126 of file SplineC2ROMPTarget.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Query if this SPOSet uses OpenMP offload.
Reimplemented from SPOSet.
Definition at line 128 of file SplineC2ROMPTarget.h.
|
inlineoverridevirtual |
make a clone of itself every derived class must implement this to have threading working correctly.
Implements BsplineSet.
Definition at line 149 of file SplineC2ROMPTarget.h.
|
overridevirtual |
evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP, of multiple walkers
spo_list | the list of SPOSet pointers in a walker batch |
vp_list | a list of virtual particle sets in a walker batch |
psi_list | a list of values of the SPO, used as a scratch space if needed |
invRow_ptr_list | a list of pointers to the rows of inverse slater matrix corresponding to the particles moved virtually |
ratios_list | a list of returning determinant ratios |
Reimplemented from SPOSet.
Definition at line 271 of file SplineC2ROMPTarget.cpp.
References ParticleSet::activeR(), qmcplusplus::C2R::assign_v(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), VirtualParticleSet::getTotalNum(), omptarget::min(), SplineC2ROMPTarget< ST >::mw_mem_handle_, and TinyVector< T, D >::size().
|
overridevirtual |
evaluate the values, gradients and laplacians of this single-particle orbital sets of multiple walkers
spo_list | the list of SPOSet pointers in a walker batch |
P_list | the list of ParticleSet pointers in a walker batch |
iat | active particle |
psi_v_list | the list of value vector pointers in a walker batch |
dpsi_v_list | the list of gradient vector pointers in a walker batch |
d2psi_v_list | the list of laplacian vector pointers in a walker batch |
Reimplemented from SPOSet.
Definition at line 720 of file SplineC2ROMPTarget.cpp.
References RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), and SplineC2ROMPTarget< ST >::mw_mem_handle_.
|
overridevirtual |
evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ratio and grads of multiple walkers.
Device data of phi_vgl_v must be up-to-date upon return
spo_list | the list of SPOSet pointers in a walker batch |
P_list | the list of ParticleSet pointers in a walker batch |
iat | active particle |
phi_vgl_v | orbital values, gradients and laplacians of all the walkers |
psi_ratio_grads_v | determinant ratio and grads of all the walkers |
Reimplemented from SPOSet.
Definition at line 754 of file SplineC2ROMPTarget.cpp.
References qmcplusplus::C2R::assign_vgl(), Array< T, D, ALLOC >::data(), RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), qmcplusplus::HESS00, qmcplusplus::HESS01, qmcplusplus::HESS02, qmcplusplus::HESS11, qmcplusplus::HESS12, qmcplusplus::HESS22, qmcplusplus::LAPL, omptarget::min(), SplineC2ROMPTarget< ST >::mw_mem_handle_, qmcplusplus::NUM_FIELDS, Array< T, D, ALLOC >::size(), TinyVector< T, D >::size(), and qmcplusplus::SymTrace().
bool read_splines | ( | hdf_archive & | h5f | ) |
Definition at line 37 of file SplineC2ROMPTarget.cpp.
References hdf_archive::readEntry().
|
inlineoverridevirtual |
return a shared resource to collection
Reimplemented from SPOSet.
Definition at line 142 of file SplineC2ROMPTarget.h.
References RefVectorWithLeader< T >::getCastedLeader(), RefVectorWithLeader< T >::getLeader(), and ResourceCollection::takebackResource().
|
inline |
remap kPoints to pack the double copy
Definition at line 220 of file SplineC2ROMPTarget.h.
References qmcplusplus::dot(), BsplineSet::kPoints, SplineC2ROMPTarget< ST >::mKK, SplineC2ROMPTarget< ST >::myKcart, SplineC2ROMPTarget< ST >::nComplexBands, and BsplineSet::remap_kpoints().
Referenced by SplineC2ROMPTarget< ST >::create_spline().
|
inline |
Definition at line 151 of file SplineC2ROMPTarget.h.
References BsplineSet::init_base(), SplineC2ROMPTarget< ST >::myG, SplineC2ROMPTarget< ST >::mygH, SplineC2ROMPTarget< ST >::myH, SplineC2ROMPTarget< ST >::myL, SplineC2ROMPTarget< ST >::myV, qmcplusplus::n, VectorSoaContainer< T, D, Alloc >::resize(), and Vector< T, Alloc >::resize().
|
inline |
Definition at line 26 of file SplineC2ROMPTarget.cpp.
bool write_splines | ( | hdf_archive & | h5f | ) |
Definition at line 46 of file SplineC2ROMPTarget.cpp.
References hdf_archive::writeEntry().
|
friend |
Definition at line 316 of file SplineC2ROMPTarget.h.
|
friend |
Definition at line 315 of file SplineC2ROMPTarget.h.
|
private |
, transformation for tensor in LatticeUnit to CartesianUnit, e.g. Hessian
Definition at line 75 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::finalizeConstruction().
|
private |
Definition at line 83 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::finalizeConstruction().
|
private |
Definition at line 81 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::finalizeConstruction(), and SplineC2ROMPTarget< ST >::resize_kpoints().
|
private |
position scratch space, used to avoid allocation on the fly and faster transfer
Definition at line 97 of file SplineC2ROMPTarget.h.
|
private |
Definition at line 86 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::acquireResource(), SplineC2ROMPTarget< ST >::mw_evaluateDetRatios(), SplineC2ROMPTarget< ST >::mw_evaluateVGL(), and SplineC2ROMPTarget< ST >::mw_evaluateVGLandDetRatioGrads().
|
protected |
Definition at line 110 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::resizeStorage().
|
protected |
Definition at line 112 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::resizeStorage().
|
protected |
Definition at line 111 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::resizeStorage().
|
private |
Definition at line 82 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::finalizeConstruction(), and SplineC2ROMPTarget< ST >::resize_kpoints().
|
protected |
Definition at line 109 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::resizeStorage().
|
protected |
intermediate result vectors
Definition at line 108 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::create_spline(), and SplineC2ROMPTarget< ST >::resizeStorage().
|
private |
number of complex bands
Definition at line 77 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::resize_kpoints().
|
private |
offload scratch space, dynamically resized to the maximal need
Definition at line 91 of file SplineC2ROMPTarget.h.
|
private |
timer for offload portion
Definition at line 71 of file SplineC2ROMPTarget.h.
|
private |
primitive cell
Definition at line 73 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::finalizeConstruction().
|
private |
Definition at line 84 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::finalizeConstruction().
|
private |
psiinv and position scratch space, used to avoid allocation on the fly and faster transfer
Definition at line 95 of file SplineC2ROMPTarget.h.
|
private |
team private ratios for reduction, numVP x numTeams
Definition at line 89 of file SplineC2ROMPTarget.h.
|
private |
result scratch space, dynamically resized to the maximal need
Definition at line 93 of file SplineC2ROMPTarget.h.
|
private |
multi bspline set
Definition at line 79 of file SplineC2ROMPTarget.h.
Referenced by SplineC2ROMPTarget< ST >::bcast_tables(), SplineC2ROMPTarget< ST >::create_spline(), SplineC2ROMPTarget< ST >::finalizeConstruction(), SplineC2ROMPTarget< ST >::flush_zero(), and SplineC2ROMPTarget< ST >::gather_tables().