![]() |
QMCPACK
|
A localized basis set derived from SoaBasisSetBase<ORBT> More...
Classes | |
struct | SoaLocalizedBSetMultiWalkerMem |
Public Types | |
using | RealType = typename COT::RealType |
using | BaseType = SoaBasisSetBase< ORBT > |
using | ValueType = QMCTraits::ValueType |
using | vgl_type = typename BaseType::vgl_type |
using | vgh_type = typename BaseType::vgh_type |
using | vghgh_type = typename BaseType::vghgh_type |
using | PosType = typename ParticleSet::PosType |
using | OffloadMWVGLArray = Array< ValueType, 3, OffloadPinnedAllocator< ValueType > > |
using | OffloadMWVArray = Array< ValueType, 2, OffloadPinnedAllocator< ValueType > > |
![]() | |
using | value_type = ORBT |
using | vgl_type = VectorSoaContainer< ORBT, OHMMS_DIM+2 > |
using | vgh_type = VectorSoaContainer< ORBT, 10 > |
using | vghgh_type = VectorSoaContainer< ORBT, 20 > |
using | ValueType = QMCTraits::ValueType |
using | OffloadMWVGLArray = Array< ValueType, 3, OffloadPinnedAllocator< ValueType > > |
using | OffloadMWVArray = Array< ValueType, 2, OffloadPinnedAllocator< ValueType > > |
Public Member Functions | |
SoaLocalizedBasisSet (ParticleSet &ions, ParticleSet &els) | |
constructor More... | |
SoaLocalizedBasisSet (const SoaLocalizedBasisSet &a) | |
copy constructor More... | |
BaseType * | makeClone () const override |
makeClone More... | |
void | setPBCParams (const TinyVector< int, 3 > &PBCImages, const TinyVector< double, 3 > Sup_Twist, const Vector< ValueType, OffloadPinnedAllocator< ValueType >> &phase_factor, const Array< RealType, 2, OffloadPinnedAllocator< RealType >> &pbc_displacements) |
set Number of periodic Images to evaluate the orbitals. More... | |
void | setBasisSetSize (int nbs) override |
set BasisSetSize and allocate mVGL container More... | |
void | queryOrbitalsForSType (const std::vector< bool > &corrCenter, std::vector< bool > &is_s_orbital) const override |
Determine which orbitals are S-type. More... | |
void | evaluateVGL (const ParticleSet &P, int iat, vgl_type &vgl) override |
compute VGL More... | |
void | mw_evaluateValue (const RefVectorWithLeader< SoaBasisSetBase< ORBT >> &basis_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, OffloadMWVArray &v) override |
compute V using packed array with all walkers More... | |
void | mw_evaluateValueVPs (const RefVectorWithLeader< SoaBasisSetBase< ORBT >> &basis_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, OffloadMWVArray &v) override |
compute V using packed array with all walkers More... | |
void | mw_evaluateVGL (const RefVectorWithLeader< SoaBasisSetBase< ORBT >> &basis_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, OffloadMWVGLArray &vgl) override |
compute VGL using packed array with all walkers More... | |
void | evaluateVGH (const ParticleSet &P, int iat, vgh_type &vgh) override |
compute VGH More... | |
void | evaluateVGHGH (const ParticleSet &P, int iat, vghgh_type &vghgh) override |
compute VGHGH More... | |
void | evaluateV (const ParticleSet &P, int iat, ORBT *restrict vals) override |
compute values for the iat-paricle move More... | |
void | evaluateGradSourceV (const ParticleSet &P, int iat, const ParticleSet &ions, int jion, vgl_type &vgl) override |
void | evaluateGradSourceVGL (const ParticleSet &P, int iat, const ParticleSet &ions, int jion, vghgh_type &vghgh) override |
void | add (int icenter, std::unique_ptr< COT > aos) |
add a new set of Centered Atomic Orbitals More... | |
void | createResource (ResourceCollection &collection) const override |
initialize a shared resource and hand it to collection More... | |
void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< SoaBasisSetBase< ORBT >> &basisset_list) const override |
acquire a shared resource from collection More... | |
void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< SoaBasisSetBase< ORBT >> &basisset_list) const override |
return a shared resource to collection More... | |
![]() | |
virtual | ~SoaBasisSetBase ()=default |
int | getBasisSetSize () |
virtual void | evaluateVGL (const ParticleSet &P, int iat, vgl_type &vgl)=0 |
virtual void | evaluateVGH (const ParticleSet &P, int iat, vgh_type &vgh)=0 |
virtual void | evaluateVGHGH (const ParticleSet &P, int iat, vghgh_type &vghgh)=0 |
virtual void | evaluateGradSourceV (const ParticleSet &P, int iat, const ParticleSet &ions, int jion, vgl_type &vgl)=0 |
virtual void | evaluateGradSourceVGL (const ParticleSet &P, int iat, const ParticleSet &ions, int jion, vghgh_type &vghgh)=0 |
virtual bool | is_S_orbital (int mo_idx, int ao_idx) |
virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< SoaBasisSetBase > &bset_list) const |
acquire a shared resource from collection More... | |
virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< SoaBasisSetBase > &bset_list) const |
return a shared resource to collection More... | |
Static Public Member Functions | |
static RefVectorWithLeader< COT > | extractOneSpeciesBasisRefList (const RefVectorWithLeader< SoaBasisSetBase< ORBT >> &basisset_list, int id) |
helper function for extracting a list of atomic basis sets for a single species (indexed by id ) from a list of basis sets More... | |
Public Attributes | |
size_t | NumCenters |
number of centers, e.g., ions More... | |
size_t | NumTargets |
number of quantum particles More... | |
const ParticleSet & | ions_ |
ion particle set More... | |
const int | myTableIndex |
number of quantum particles More... | |
PosType | SuperTwist |
Global Coordinate of Supertwist read from HDF5. More... | |
std::vector< size_t > | BasisOffset |
container to store the offsets of the basis functions for each center Due to potential reordering of ions, offsets can be in any order. More... | |
std::vector< std::unique_ptr< COT > > | LOBasisSet |
container of the unique pointers to the Atomic Orbitals More... | |
![]() | |
int | BasisSetSize |
size of the basis set More... | |
Private Attributes | |
ResourceHandle< SoaLocalizedBSetMultiWalkerMem > | mw_mem_handle_ |
multi walker resource handle More... | |
A localized basis set derived from SoaBasisSetBase<ORBT>
This class performs the evaluation of the basis functions and their derivatives for each of the N-particles in a configuration. The template parameter COT denotes Centered-Orbital-Type which provides a set of localized orbitals associated with a center. The template parameter ORBT denotes the orbital value return type
Definition at line 37 of file SoaLocalizedBasisSet.h.
using BaseType = SoaBasisSetBase<ORBT> |
Definition at line 41 of file SoaLocalizedBasisSet.h.
using OffloadMWVArray = Array<ValueType, 2, OffloadPinnedAllocator<ValueType> > |
Definition at line 49 of file SoaLocalizedBasisSet.h.
using OffloadMWVGLArray = Array<ValueType, 3, OffloadPinnedAllocator<ValueType> > |
Definition at line 48 of file SoaLocalizedBasisSet.h.
using PosType = typename ParticleSet::PosType |
Definition at line 47 of file SoaLocalizedBasisSet.h.
using RealType = typename COT::RealType |
Definition at line 40 of file SoaLocalizedBasisSet.h.
using ValueType = QMCTraits::ValueType |
Definition at line 42 of file SoaLocalizedBasisSet.h.
using vgh_type = typename BaseType::vgh_type |
Definition at line 45 of file SoaLocalizedBasisSet.h.
using vghgh_type = typename BaseType::vghgh_type |
Definition at line 46 of file SoaLocalizedBasisSet.h.
using vgl_type = typename BaseType::vgl_type |
Definition at line 44 of file SoaLocalizedBasisSet.h.
SoaLocalizedBasisSet | ( | ParticleSet & | ions, |
ParticleSet & | els | ||
) |
constructor
ions | ionic system |
els | electronic system |
Definition at line 95 of file SoaLocalizedBasisSet.cpp.
References SoaLocalizedBasisSet< COT, ORBT >::BasisOffset, SoaBasisSetBase< ORBT >::BasisSetSize, ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), ParticleSet::getTotalNum(), SoaLocalizedBasisSet< COT, ORBT >::LOBasisSet, qmcplusplus::NEED_FULL_TABLE_ANYTIME, qmcplusplus::NEED_VP_FULL_TABLE_ON_HOST, SoaLocalizedBasisSet< COT, ORBT >::NumCenters, and SoaLocalizedBasisSet< COT, ORBT >::NumTargets.
SoaLocalizedBasisSet | ( | const SoaLocalizedBasisSet< COT, ORBT > & | a | ) |
copy constructor
Definition at line 108 of file SoaLocalizedBasisSet.cpp.
References SoaLocalizedBasisSet< COT, ORBT >::LOBasisSet.
|
override |
acquire a shared resource from collection
Definition at line 48 of file SoaLocalizedBasisSet.cpp.
References ResourceCollection::lendResource().
void add | ( | int | icenter, |
std::unique_ptr< COT > | aos | ||
) |
add a new set of Centered Atomic Orbitals
icenter | the index of the center |
aos | a set of Centered Atomic Orbitals |
Definition at line 532 of file SoaLocalizedBasisSet.cpp.
|
overridevirtual |
initialize a shared resource and hand it to collection
Reimplemented from SoaBasisSetBase< ORBT >.
Definition at line 41 of file SoaLocalizedBasisSet.cpp.
References ResourceCollection::addResource().
|
override |
Definition at line 418 of file SoaLocalizedBasisSet.cpp.
References ParticleSet::activeR(), ParticleSet::getActivePtcl(), ParticleSet::getDistTableAB(), ParticleSet::getLattice(), and DistanceTableAB::getTempDists().
|
override |
Definition at line 456 of file SoaLocalizedBasisSet.cpp.
References ParticleSet::activeR(), ParticleSet::getActivePtcl(), ParticleSet::getDistTableAB(), ParticleSet::getLattice(), DistanceTableAB::getTempDists(), and ParticleSet::GroupID.
|
overridevirtual |
compute values for the iat-paricle move
Always uses getTempDists() and getTempDispls() Tv is a translation vector; In PBC, in order to reduce the number of images that need to be summed over when generating the AO the nearest image displacement, dr, is used. Tv corresponds to the translation that takes the 'general displacement' (displacement between ion position and electron position) to the nearest image displacement. We need to keep track of Tv because it must be add as a phase factor, i.e., exp(i*k*Tv).
Implements SoaBasisSetBase< ORBT >.
Definition at line 352 of file SoaLocalizedBasisSet.cpp.
References ParticleSet::activeR(), ParticleSet::getActivePtcl(), ParticleSet::getDistTableAB(), ParticleSet::getLattice(), and DistanceTableAB::getTempDists().
|
override |
compute VGH
P | quantum particleset |
iat | active particle |
vgl | Matrix(10,BasisSetSize) |
trialMove | if true, use getTempDists()/getTempDispls() |
Definition at line 261 of file SoaLocalizedBasisSet.cpp.
References ParticleSet::activeR(), ParticleSet::getActivePtcl(), ParticleSet::getDistTableAB(), ParticleSet::getLattice(), and DistanceTableAB::getTempDists().
|
override |
compute VGHGH
P | quantum particleset |
iat | active particle |
vghgh | Matrix(20,BasisSetSize) |
trialMove | if true, use getTempDists()/getTempDispls() |
Definition at line 279 of file SoaLocalizedBasisSet.cpp.
References ParticleSet::activeR(), ParticleSet::getActivePtcl(), ParticleSet::getDistTableAB(), ParticleSet::getLattice(), and DistanceTableAB::getTempDists().
|
override |
compute VGL
P | quantum particleset |
iat | active particle |
vgl | Matrix(5,BasisSetSize) |
trialMove | if true, use getTempDists()/getTempDispls() |
Definition at line 195 of file SoaLocalizedBasisSet.cpp.
References ParticleSet::activeR(), ParticleSet::getActivePtcl(), ParticleSet::getDistTableAB(), ParticleSet::getLattice(), and DistanceTableAB::getTempDists().
|
static |
helper function for extracting a list of atomic basis sets for a single species (indexed by id
) from a list of basis sets
Definition at line 80 of file SoaLocalizedBasisSet.cpp.
References SoaLocalizedBasisSet< COT, ORBT >::LOBasisSet.
|
inlineoverridevirtual |
|
overridevirtual |
compute V using packed array with all walkers
basis_list | list of basis sets (one for each walker) |
P_list | list of quantum particleset (one for each walker) |
iat | active particle |
v | Array(n_walkers, BasisSetSize) |
Implements SoaBasisSetBase< ORBT >.
Definition at line 371 of file SoaLocalizedBasisSet.cpp.
References RefVectorWithLeader< T >::getLeader(), and Array< T, D, ALLOC >::size().
|
overridevirtual |
compute V using packed array with all walkers
basis_list | list of basis sets (one for each walker) |
vp_list | list of quantum virtual particleset (one for each walker) |
v | Array(n_walkers, BasisSetSize) |
Implements SoaBasisSetBase< ORBT >.
Definition at line 300 of file SoaLocalizedBasisSet.cpp.
References RefVectorWithLeader< T >::getLeader(), VirtualParticleSet::mw_mem_handle_, and Array< T, D, ALLOC >::size().
|
overridevirtual |
compute VGL using packed array with all walkers
basis_list | list of basis sets (one for each walker) |
P_list | list of quantum particleset (one for each walker) |
iat | active particle |
vgl | Array(n_walkers, 5, BasisSetSize) |
Implements SoaBasisSetBase< ORBT >.
Definition at line 214 of file SoaLocalizedBasisSet.cpp.
References RefVectorWithLeader< T >::getLeader(), and Array< T, D, ALLOC >::size().
|
overridevirtual |
Determine which orbitals are S-type.
Used by cusp correction.
Reimplemented from SoaBasisSetBase< ORBT >.
Definition at line 170 of file SoaLocalizedBasisSet.cpp.
|
override |
return a shared resource to collection
Definition at line 64 of file SoaLocalizedBasisSet.cpp.
References ResourceCollection::takebackResource().
|
overridevirtual |
set BasisSetSize and allocate mVGL container
Implements SoaBasisSetBase< ORBT >.
Definition at line 136 of file SoaLocalizedBasisSet.cpp.
void setPBCParams | ( | const TinyVector< int, 3 > & | PBCImages, |
const TinyVector< double, 3 > | Sup_Twist, | ||
const Vector< ValueType, OffloadPinnedAllocator< ValueType >> & | phase_factor, | ||
const Array< RealType, 2, OffloadPinnedAllocator< RealType >> & | pbc_displacements | ||
) |
set Number of periodic Images to evaluate the orbitals.
Set to 0 for non-PBC, and set manually in the input. Passes the pre-computed phase factor for evaluation of complex wavefunction. If WF is real Phase_factor is real and equals 1 if gamma or -1 if non-Gamma.
Definition at line 123 of file SoaLocalizedBasisSet.cpp.
std::vector<size_t> BasisOffset |
container to store the offsets of the basis functions for each center Due to potential reordering of ions, offsets can be in any order.
Definition at line 68 of file SoaLocalizedBasisSet.h.
Referenced by SoaLocalizedBasisSet< COT, ORBT >::SoaLocalizedBasisSet().
const ParticleSet& ions_ |
ion particle set
Definition at line 58 of file SoaLocalizedBasisSet.h.
std::vector<std::unique_ptr<COT> > LOBasisSet |
container of the unique pointers to the Atomic Orbitals
size of LOBasisSet = number of unique centers
Definition at line 74 of file SoaLocalizedBasisSet.h.
Referenced by SoaLocalizedBasisSet< COT, ORBT >::extractOneSpeciesBasisRefList(), and SoaLocalizedBasisSet< COT, ORBT >::SoaLocalizedBasisSet().
|
private |
multi walker resource handle
Definition at line 213 of file SoaLocalizedBasisSet.h.
const int myTableIndex |
number of quantum particles
Definition at line 60 of file SoaLocalizedBasisSet.h.
size_t NumCenters |
number of centers, e.g., ions
Definition at line 54 of file SoaLocalizedBasisSet.h.
Referenced by SoaLocalizedBasisSet< COT, ORBT >::SoaLocalizedBasisSet().
size_t NumTargets |
number of quantum particles
Definition at line 56 of file SoaLocalizedBasisSet.h.
Referenced by SoaLocalizedBasisSet< COT, ORBT >::SoaLocalizedBasisSet().
PosType SuperTwist |
Global Coordinate of Supertwist read from HDF5.
Definition at line 62 of file SoaLocalizedBasisSet.h.