![]() |
QMCPACK
|
Calculates the structure-factor for a particle set. More...
Public Types | |
using | ParticleLayout = PtclOnLatticeTraits::ParticleLayout |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
Public Member Functions | |
StructFact (const ParticleLayout &lattice, const KContainer &k_lists) | |
Constructor - copy ParticleSet and init. More... | |
~StructFact () | |
desructor More... | |
void | updateAllPart (const ParticleSet &P) |
Update Rhok if all particles moved. More... | |
void | turnOnStorePerParticle (const ParticleSet &P) |
switch on the storage per particle if StorePerParticle was false, this function allocates memory and precompute data if StorePerParticle was true, this function is no-op More... | |
bool | isStorePerParticle () const |
accessor of StorePerParticle More... | |
const KContainer & | getKLists () const |
accessor of k_lists_ More... | |
Static Public Member Functions | |
static void | mw_updateAllPart (const RefVectorWithLeader< StructFact > &sk_list, const RefVectorWithLeader< ParticleSet > &p_list, SKMultiWalkerMem &mw_mem) |
Update RhoK for all particles for multiple walkers particles. More... | |
Public Attributes | |
int | SuperCellEnum |
enumeration for the methods to handle mixed bconds More... | |
Matrix< RealType > | rhok_r |
2-D container for the phase More... | |
Matrix< RealType > | rhok_i |
Matrix< RealType > | eikr_r |
Matrix< RealType > | eikr_i |
Private Member Functions | |
void | computeRhok (const ParticleSet &P) |
Compute all rhok elements from the start. More... | |
void | resize (int nkpts, int num_species, int num_ptcls) |
resize the internal data More... | |
Private Attributes | |
const KContainer & | k_lists_ |
K-Vector List. More... | |
bool | StorePerParticle |
Whether intermediate data is stored per particle. More... | |
NewTimer & | update_all_timer_ |
timer for updateAllPart More... | |
Calculates the structure-factor for a particle set.
Structure factor per species Rhok[alpha][k] Structure factor per particle eikr[i][k]
Definition at line 39 of file StructFact.h.
Definition at line 43 of file StructFact.h.
StructFact | ( | const ParticleLayout & | lattice, |
const KContainer & | k_lists | ||
) |
Constructor - copy ParticleSet and init.
k-shells
lattice | long range box |
kc | cutoff for k |
At least in the batched version Structure factor is NOT valid after construction.
Definition at line 29 of file StructFact.cpp.
References qmcplusplus::app_log(), LRCoulombSingleton::isQuasi2D(), qmcplusplus::SUPERCELL_SLAB, and StructFact::SuperCellEnum.
|
default |
desructor
|
private |
Compute all rhok elements from the start.
evaluate rok per species, eikr per particle
Definition at line 138 of file StructFact.cpp.
References qmcplusplus::dot(), StructFact::eikr_i, StructFact::eikr_r, eval_e2iphi(), ParticleSet::getGroupID(), ParticleSet::getTotalNum(), ParticleSet::groups(), StructFact::k_lists_, KContainer::kpts_cart, omptarget::min(), KContainer::numk, ParticleSet::R, StructFact::resize(), StructFact::rhok_i, StructFact::rhok_r, qmcplusplus::Units::time::s, qmcplusplus::sincos(), and StructFact::StorePerParticle.
Referenced by StructFact::mw_updateAllPart(), StructFact::turnOnStorePerParticle(), and StructFact::updateAllPart().
|
inline |
accessor of k_lists_
Definition at line 87 of file StructFact.h.
References StructFact::k_lists_.
|
inline |
accessor of StorePerParticle
Definition at line 84 of file StructFact.h.
References StructFact::StorePerParticle.
|
static |
Update RhoK for all particles for multiple walkers particles.
In batched context until this is called StructFact is invalid and will cause a crash if any Hamiltonian using StructFact indirectly through ParticleSet is evaluated.
Definition at line 63 of file StructFact.cpp.
References StructFact::computeRhok(), qmcplusplus::syclBLAS::copy_n(), qmcplusplus::DC_POS_OFFLOAD, QMCTraits::DIM, RefVectorWithLeader< T >::getLeader(), RealSpacePositionsOMPTarget::getMultiWalkerRSoADevicePtrs(), omptarget::min(), SKMultiWalkerMem::nw_rhok, StructFact::rhok_i, StructFact::rhok_r, qmcplusplus::Units::time::s, and qmcplusplus::sincos().
Referenced by ParticleSet::mw_donePbyP().
|
private |
resize the internal data
nkpts | |
num_species | number of species |
num_ptcls | number of particles |
Definition at line 45 of file StructFact.cpp.
References StructFact::eikr_i, StructFact::eikr_r, Matrix< T, Alloc >::resize(), StructFact::rhok_i, StructFact::rhok_r, and StructFact::StorePerParticle.
Referenced by StructFact::computeRhok().
void turnOnStorePerParticle | ( | const ParticleSet & | P | ) |
switch on the storage per particle if StorePerParticle was false, this function allocates memory and precompute data if StorePerParticle was true, this function is no-op
Definition at line 207 of file StructFact.cpp.
References StructFact::computeRhok(), and StructFact::StorePerParticle.
void updateAllPart | ( | const ParticleSet & | P | ) |
Update Rhok if all particles moved.
Definition at line 57 of file StructFact.cpp.
References StructFact::computeRhok(), and StructFact::update_all_timer_.
Referenced by qmcplusplus::TEST_CASE().
Definition at line 52 of file StructFact.h.
Referenced by StructFact::computeRhok(), and StructFact::resize().
Definition at line 52 of file StructFact.h.
Referenced by StructFact::computeRhok(), and StructFact::resize().
|
private |
K-Vector List.
Definition at line 100 of file StructFact.h.
Referenced by StructFact::computeRhok(), and StructFact::getKLists().
Definition at line 51 of file StructFact.h.
Referenced by StructFact::computeRhok(), SkEstimator::evaluate(), SkAllEstimator::evaluate(), StaticStructureFactor::evaluate(), SkAllEstimator::evaluateIonIon(), StructFact::mw_updateAllPart(), and StructFact::resize().
2-D container for the phase
Definition at line 51 of file StructFact.h.
Referenced by StructFact::computeRhok(), SkEstimator::evaluate(), SkAllEstimator::evaluate(), StaticStructureFactor::evaluate(), SkAllEstimator::evaluateIonIon(), StructFact::mw_updateAllPart(), and StructFact::resize().
|
private |
Whether intermediate data is stored per particle.
default false storing data per particle needs significant amount of memory but some calculation may request it. storing data per particle specie is more cost-effective
Definition at line 105 of file StructFact.h.
Referenced by StructFact::computeRhok(), StructFact::isStorePerParticle(), StructFact::resize(), and StructFact::turnOnStorePerParticle().
int SuperCellEnum |
enumeration for the methods to handle mixed bconds
Allow overwriting lattice::SuperCellEnum to use D-dim k-point sets with mixed BC
Definition at line 49 of file StructFact.h.
Referenced by StructFact::StructFact().
|
private |
timer for updateAllPart
Definition at line 107 of file StructFact.h.
Referenced by StructFact::updateAllPart().