17 #ifndef QMCPLUSPLUS_VIRTUAL_PARTICLESET_H 18 #define QMCPLUSPLUS_VIRTUAL_PARTICLESET_H 28 class NonLocalECPComponent;
50 std::optional<std::reference_wrapper<const ParticleSet>>
refPS;
94 const std::vector<PosType>& deltaV,
118 const std::vector<PosType>& deltaV,
119 const std::vector<RealType>& deltaS,
125 const RefVector<
const std::vector<PosType>>& deltaV_list,
131 const RefVector<
const std::vector<PosType>>& deltaV_list,
132 const RefVector<
const std::vector<RealType>>& deltaS_list,
140 ref_list.reserve(ref_list.size());
142 ref_list.push_back(vp);
150 nVPs += vp.getTotalNum();
158 nVPs += vp.getTotalNum();
std::optional< std::reference_wrapper< const ParticleSet > > refPS
ParticleSet this object refers to after makeMoves.
const ParticleSet & getRefPS() const
ParticleSet this object refers to.
helper functions for EinsplineSetBuilder
void createResource(ResourceCollection &collection) const
initialize a shared resource and hand it to a collection
size_t TotalNum
total number of particles
static void releaseResource(ResourceCollection &collection, const RefVectorWithLeader< VirtualParticleSet > &vp_list)
release external resource Note: use RAII ResourceCollectionTeamLock whenever possible ...
ResourceHandle manages the temporary resource referenced from a collection.
void makeMovesWithSpin(const ParticleSet &refp, int jel, const std::vector< PosType > &deltaV, const std::vector< RealType > &deltaS, bool sphere=false, int iat=-1)
move virtual particles to new postions and update distance tables
int refSourcePtcl
Reference source particle, used when onSphere=true.
A ParticleSet that handles virtual moves of a selected particle of a given physical ParticleSet Virtu...
void makeMoves(const ParticleSet &refp, int jel, const std::vector< PosType > &deltaV, bool sphere=false, int iat=-1)
move virtual particles to new postions and update distance tables
size_t getTotalNum() const
int refPtcl
Reference particle.
static void acquireResource(ResourceCollection &collection, const RefVectorWithLeader< VirtualParticleSet > &vp_list)
acquire external resource and assocaite it with the list of ParticleSet Note: use RAII ResourceCollec...
Specialized paritlce class for atomistic simulations.
Vector< int, OffloadPinnedAllocator< int > > & getMultiWalkerRefPctls()
static const std::vector< QMCTraits::PosType > extractVPCoords(const RefVectorWithLeader< const VirtualParticleSet > &vp_list)
Extract list of VP coordinates, flattened over all walkers.
static void mw_makeMoves(const RefVectorWithLeader< VirtualParticleSet > &vp_list, const RefVectorWithLeader< ParticleSet > &p_list, const RefVector< const std::vector< PosType >> &deltaV_list, const RefVector< const NLPPJob< RealType >> &joblist, bool sphere)
VirtualParticleSet(const ParticleSet &p, int nptcl, size_t dt_count_limit=0)
constructor
static size_t countVPs(const RefVectorWithLeader< VirtualParticleSet > &vp_list)
static void mw_makeMovesWithSpin(const RefVectorWithLeader< VirtualParticleSet > &vp_list, const RefVectorWithLeader< ParticleSet > &p_list, const RefVector< const std::vector< PosType >> &deltaV_list, const RefVector< const std::vector< RealType >> &deltaS_list, const RefVector< const NLPPJob< RealType >> &joblist, bool sphere)
std::vector< std::reference_wrapper< T > > RefVector
static RefVectorWithLeader< ParticleSet > RefVectorWithLeaderParticleSet(const RefVectorWithLeader< VirtualParticleSet > &vp_list)
meta data for NLPP calculation of a pair of ion and electron This is not just meta data...
static size_t countVPs(const RefVectorWithLeader< const VirtualParticleSet > &vp_list)
bool onSphere
true, if virtual particles are on a sphere for NLPP
ResourceHandle< VPMultiWalkerMem > mw_mem_handle_
multi walker resource
static const RefVectorWithLeader< const DistanceTableAB > extractDTRefList(const RefVectorWithLeader< const VirtualParticleSet > &vp_list, int id)
Extract list of Distance Tables.