![]() |
QMCPACK
|
SPOSetBuilder using new LCAOrbitalSet and Soa versions. More...
Public Member Functions | |
LCAOrbitalBuilder (ParticleSet &els, ParticleSet &ions, Communicate *comm, xmlNodePtr cur) | |
constructor More... | |
~LCAOrbitalBuilder () override | |
std::unique_ptr< SPOSet > | createSPOSetFromXML (xmlNodePtr cur) override |
create an sposet from xml (legacy) More... | |
const BasissetMap & | getBasissetMap () const |
![]() | |
SPOSetBuilder (const std::string &type_name, Communicate *comm) | |
virtual | ~SPOSetBuilder () |
void | reserve_states (int nsets=1) |
reserve space for states (usually only one set, multiple for e.g. spin dependent einspline) More... | |
void | modify_states (int index=0) |
allow modification of state information More... | |
void | clear_states (int index=0) |
clear state information More... | |
std::unique_ptr< SPOSet > | createSPOSet (xmlNodePtr cur) |
create an sposet from xml and save the resulting SPOSet More... | |
std::unique_ptr< SPOSet > | createRotatedSPOSet (xmlNodePtr cur) |
create orbital rotation transformation from xml and save the resulting SPOSet More... | |
const std::string & | getTypeName () const |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
Protected Member Functions | |
template<int I, int J> | |
BasisSet_t * | createBasisSet (xmlNodePtr cur) |
create basis set More... | |
template<int I, int J> | |
BasisSet_t * | createBasisSetH5 () |
bool | loadMO (LCAOrbitalSet &spo, xmlNodePtr cur) |
Parse the xml file for information on the Dirac determinants. More... | |
bool | putOccupation (LCAOrbitalSet &spo, xmlNodePtr occ_ptr) |
bool | putFromXML (LCAOrbitalSet &spo, xmlNodePtr coeff_ptr) |
bool | putFromH5 (LCAOrbitalSet &spo, xmlNodePtr coeff_ptr) |
read data from a hdf5 file More... | |
bool | putPBCFromH5 (LCAOrbitalSet &spo, xmlNodePtr coeff_ptr) |
read data from a hdf5 file More... | |
void | LoadFullCoefsFromH5 (hdf_archive &hin, int setVal, PosType &SuperTwist, Matrix< std::complex< RealType >> &Ctemp, bool MultiDet) |
void | LoadFullCoefsFromH5 (hdf_archive &hin, int setVal, PosType &SuperTwist, Matrix< RealType > &Creal, bool Multidet) |
void | EvalPeriodicImagePhaseFactors (PosType SuperTwist, Vector< RealType, OffloadPinnedAllocator< RealType >> &LocPeriodicImagePhaseFactors, Array< RealType, 2, OffloadPinnedAllocator< RealType >> &LocPeriodicImageDisplacements) |
Periodic Image Phase Factors computation to be determined. More... | |
void | EvalPeriodicImagePhaseFactors (PosType SuperTwist, Vector< std::complex< RealType >, OffloadPinnedAllocator< std::complex< RealType >>> &LocPeriodicImagePhaseFactors, Array< RealType, 2, OffloadPinnedAllocator< RealType >> &LocPeriodicImageDisplacements) |
void | readRealMatrixFromH5 (hdf_archive &hin, const std::string &setname, Matrix< LCAOrbitalBuilder::RealType > &Creal) const |
read matrix from h5 file More... | |
![]() | |
virtual std::unique_ptr< SPOSet > | createSPOSet (xmlNodePtr cur, SPOSetInputInfo &input_info) |
create an sposet from a general xml request More... | |
Protected Attributes | |
ParticleSet & | targetPtcl |
target ParticleSet More... | |
ParticleSet & | sourcePtcl |
source ParticleSet More... | |
std::map< std::string, std::unique_ptr< BasisSet_t > > | basisset_map_ |
localized basis set map More... | |
bool | cuspCorr |
if true, add cusp correction to orbitals More... | |
std::string | h5_path |
Path to HDF5 Wavefunction. More... | |
TinyVector< int, 3 > | PBCImages |
Number of periodic Images for Orbital evaluation. More... | |
PosType | SuperTwist |
Coordinates Super Twist. More... | |
Vector< ValueType, OffloadPinnedAllocator< ValueType > > | PeriodicImagePhaseFactors |
Periodic Image Phase Factors. Correspond to the phase from the PBCImages. Computed only once. More... | |
Array< RealType, 2, OffloadPinnedAllocator< RealType > > | PeriodicImageDisplacements |
Tensor< double, 3 > | Lattice |
Store Lattice parameters from HDF5 to use in PeriodicImagePhaseFactors. More... | |
bool | doCuspCorrection |
Enable cusp correction. More... | |
std::string | useGPU |
Captured gpu input string. More... | |
Vector< RealType > | Occ |
occupation number More... | |
![]() | |
const std::string | type_name_ |
type name of the SPO objects built by this builder. More... | |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
Private Member Functions | |
std::unique_ptr< BasisSet_t > | loadBasisSetFromXML (xmlNodePtr cur, xmlNodePtr parent) |
load a basis set from XML input More... | |
std::unique_ptr< BasisSet_t > | loadBasisSetFromH5 (xmlNodePtr parent) |
load a basis set from h5 file More... | |
int | determineRadialOrbType (xmlNodePtr cur) const |
determine radial orbital type based on "keyword" and "transform" attributes More... | |
Additional Inherited Members | |
![]() | |
bool | legacy |
whether implementation conforms only to legacy standard More... | |
std::vector< std::unique_ptr< SPOSetInfo > > | states |
state info of all possible states available in the basis More... | |
SPOSetBuilder using new LCAOrbitalSet and Soa versions.
Reimplement MolecularSPOSetBuilder
Definition at line 33 of file LCAOrbitalBuilder.h.
using BasisSet_t = LCAOrbitalSet::basis_type |
Definition at line 36 of file LCAOrbitalBuilder.h.
using BasissetMap = std::map<std::string, std::unique_ptr<BasisSet_t> > |
Definition at line 46 of file LCAOrbitalBuilder.h.
LCAOrbitalBuilder | ( | ParticleSet & | els, |
ParticleSet & | ions, | ||
Communicate * | comm, | ||
xmlNodePtr | cur | ||
) |
constructor
els | reference to the electrons |
ions | reference to the ions |
Definition at line 120 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_warning(), LCAOrbitalBuilder::basisset_map_, PlatformSelector< KIND >::candidate_values(), MPIObjectBase::ClassName, LCAOrbitalBuilder::doCuspCorrection, LCAOrbitalBuilder::EvalPeriodicImagePhaseFactors(), getXMLAttributeValue(), LCAOrbitalBuilder::h5_path, LCAOrbitalBuilder::loadBasisSetFromH5(), LCAOrbitalBuilder::loadBasisSetFromXML(), LCAOrbitalBuilder::PBCImages, LCAOrbitalBuilder::PeriodicImageDisplacements, LCAOrbitalBuilder::PeriodicImagePhaseFactors, processChildren(), OhmmsAttributeSet::put(), LCAOrbitalBuilder::SuperTwist, and LCAOrbitalBuilder::useGPU.
|
override |
Definition at line 177 of file LCAOrbitalBuilder.cpp.
|
protected |
create basis set
Use ao_traits<T,I,J> to match (ROT)x(SH) combo
process atomicBasisSet per ion species
Definition at line 335 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), MPIObjectBase::ClassName, AOBasisBuilder< COT >::createAOSet(), ReportEngine::error(), SpeciesSet::findSpecies(), ParticleSet::getSpeciesSet(), MPIObjectBase::myComm, LCAOrbitalBuilder::PBCImages, LCAOrbitalBuilder::PeriodicImageDisplacements, LCAOrbitalBuilder::PeriodicImagePhaseFactors, OhmmsAttributeSet::put(), AOBasisBuilder< COT >::put(), LCAOrbitalBuilder::sourcePtcl, LCAOrbitalBuilder::SuperTwist, and LCAOrbitalBuilder::targetPtcl.
|
protected |
process atomicBasisSet per ion species
Definition at line 388 of file LCAOrbitalBuilder.cpp.
References qmcplusplus::app_log(), Communicate::bcast(), MPIObjectBase::ClassName, hdf_archive::close(), AOBasisBuilder< COT >::createAOSetH5(), ReportEngine::error(), SpeciesSet::findSpecies(), ParticleSet::getSpeciesSet(), LCAOrbitalBuilder::h5_path, MPIObjectBase::myComm, hdf_archive::open(), LCAOrbitalBuilder::PBCImages, LCAOrbitalBuilder::PeriodicImageDisplacements, LCAOrbitalBuilder::PeriodicImagePhaseFactors, hdf_archive::pop(), hdf_archive::push(), AOBasisBuilder< COT >::putH5(), Communicate::rank(), hdf_archive::read(), hdf_archive::readEntry(), LCAOrbitalBuilder::sourcePtcl, LCAOrbitalBuilder::SuperTwist, and LCAOrbitalBuilder::targetPtcl.
|
overridevirtual |
create an sposet from xml (legacy)
Implements SPOSetBuilder.
Reimplemented in LCAOSpinorBuilder.
Definition at line 471 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_log(), qmcplusplus::app_summary(), qmcplusplus::app_warning(), qmcplusplus::applyCuspCorrection(), Communicate::barrier_and_abort(), LCAOrbitalBuilder::basisset_map_, Communicate::bcast(), qmcplusplus::broadcastCuspInfo(), MPIObjectBase::ClassName, DELETED, LCAOrbitalBuilder::doCuspCorrection, file_exists(), qmcplusplus::generateCuspInfo(), SPOSet::getOrbitalSetSize(), ParticleSet::getTotalNum(), LCAOrbitalBuilder::loadMO(), MPIObjectBase::myComm, qmcplusplus::OMPTARGET, processChildren(), OhmmsAttributeSet::put(), Communicate::rank(), qmcplusplus::readCuspInfo(), qmcplusplus::saveCusp(), PlatformSelector< KIND >::selectPlatform(), LCAOrbitalBuilder::sourcePtcl, LCAOrbitalBuilder::targetPtcl, and LCAOrbitalBuilder::useGPU.
Referenced by qmcplusplus::test_LCAO_DiamondC_2x1x1_cplx(), and qmcplusplus::test_LCAO_DiamondC_2x1x1_real().
|
private |
determine radial orbital type based on "keyword" and "transform" attributes
Definition at line 182 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), and OhmmsAttributeSet::put().
Referenced by LCAOrbitalBuilder::loadBasisSetFromH5(), and LCAOrbitalBuilder::loadBasisSetFromXML().
|
protected |
Periodic Image Phase Factors computation to be determined.
Exp(ik.g) where i is imaginary, k is the supertwist and g is the translation vector PBCImage.
Definition at line 1005 of file LCAOrbitalBuilder.cpp.
References APP_ABORT, Communicate::bcast(), hdf_archive::close(), LCAOrbitalBuilder::h5_path, LCAOrbitalBuilder::Lattice, MPIObjectBase::myComm, hdf_archive::open(), LCAOrbitalBuilder::PBCImages, hdf_archive::push(), Communicate::rank(), and hdf_archive::read().
Referenced by LCAOrbitalBuilder::LCAOrbitalBuilder().
|
protected |
Exp(ik.g) where i is imaginary, k is the supertwist and g is the translation vector PBCImage.
Definition at line 1058 of file LCAOrbitalBuilder.cpp.
References APP_ABORT, Communicate::bcast(), hdf_archive::close(), qmcplusplus::dot(), LCAOrbitalBuilder::h5_path, LCAOrbitalBuilder::Lattice, MPIObjectBase::myComm, hdf_archive::open(), LCAOrbitalBuilder::PBCImages, hdf_archive::push(), Communicate::rank(), hdf_archive::read(), qmcplusplus::Units::time::s, qmcplusplus::sincos(), and LCAOrbitalBuilder::SuperTwist.
|
inline |
Definition at line 47 of file LCAOrbitalBuilder.h.
References LCAOrbitalBuilder::basisset_map_.
Referenced by qmcplusplus::TEST_CASE().
|
private |
load a basis set from h5 file
process atomicBasisSet per ion species
Definition at line 272 of file LCAOrbitalBuilder.cpp.
References qmcplusplus::app_log(), Communicate::bcast(), MPIObjectBase::ClassName, hdf_archive::close(), LCAOrbitalBuilder::determineRadialOrbType(), ReportEngine::error(), LCAOrbitalBuilder::h5_path, MPIObjectBase::myComm, hdf_archive::open(), hdf_archive::push(), Communicate::rank(), and hdf_archive::readEntry().
Referenced by LCAOrbitalBuilder::LCAOrbitalBuilder().
|
private |
load a basis set from XML input
process atomicBasisSet per ion species
Definition at line 205 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_log(), qmcplusplus::app_warning(), MPIObjectBase::ClassName, LCAOrbitalBuilder::determineRadialOrbType(), ReportEngine::error(), qmcplusplus::is_same(), and OhmmsAttributeSet::put().
Referenced by LCAOrbitalBuilder::LCAOrbitalBuilder().
|
protected |
When running Single Determinant calculations, MO coeff loaded based on occupation and lowest eingenvalue. However, for solids with multideterminants, orbitals are order by kpoints; first all MOs for kpoint 1, then 2 etc The multideterminants occupation is specified in the input/HDF5 and theefore as long as there is consistency between the order in which we read the orbitals and the occupation, we are safe. In the case of Multideterminants generated by pyscf and Quantum Package, They are stored in the same order as generated for quantum package and one should use the orbitals labelled eigenset_unsorted.
Definition at line 927 of file LCAOrbitalBuilder.cpp.
References Matrix< T, Alloc >::cols(), hdf_archive::read(), LCAOrbitalBuilder::readRealMatrixFromH5(), Matrix< T, Alloc >::resize(), and Matrix< T, Alloc >::rows().
Referenced by LCAOrbitalBuilder::putPBCFromH5().
|
protected |
Definition at line 974 of file LCAOrbitalBuilder.cpp.
References qmcplusplus::abs(), APP_ABORT, qmcplusplus::Units::charge::e, hdf_archive::read(), LCAOrbitalBuilder::readRealMatrixFromH5(), and LCAOrbitalBuilder::SuperTwist.
|
protected |
Parse the xml file for information on the Dirac determinants.
cur | the current xmlNode |
Definition at line 593 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, app_debug, qmcplusplus::app_log(), Communicate::bcast(), LCAOrbitalSet::C, hdf_archive::close(), qmcplusplus::Units::charge::e, LCAOrbitalBuilder::h5_path, MPIObjectBase::myComm, hdf_archive::open(), hdf_archive::push(), OhmmsAttributeSet::put(), LCAOrbitalBuilder::putFromH5(), LCAOrbitalBuilder::putFromXML(), LCAOrbitalBuilder::putOccupation(), LCAOrbitalBuilder::putPBCFromH5(), Communicate::rank(), and hdf_archive::read().
Referenced by LCAOrbitalBuilder::createSPOSetFromXML().
|
protected |
read data from a hdf5 file
norb | number of orbitals to be initialized |
coeff_ptr | xmlnode for coefficients |
Definition at line 716 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, Communicate::barrier_and_abort(), Communicate::bcast(), LCAOrbitalSet::C, hdf_archive::close(), Matrix< T, Alloc >::cols(), copy(), DELETED, DEPRECATED, LCAOrbitalSet::getBasisSetSize(), SPOSet::getOrbitalSetSize(), LCAOrbitalBuilder::h5_path, MPIObjectBase::myComm, qmcplusplus::n, LCAOrbitalBuilder::Occ, hdf_archive::open(), OhmmsAttributeSet::put(), Communicate::rank(), hdf_archive::read(), hdf_archive::readEntry(), and Matrix< T, Alloc >::rows().
Referenced by LCAOrbitalBuilder::loadMO().
|
protected |
Definition at line 678 of file LCAOrbitalBuilder.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, LCAOrbitalSet::C, copy(), DELETED, LCAOrbitalSet::getBasisSetSize(), SPOSet::getOrbitalSetSize(), qmcplusplus::n, LCAOrbitalBuilder::Occ, OhmmsAttributeSet::put(), and putContent().
Referenced by LCAOrbitalBuilder::loadMO().
|
protected |
Definition at line 877 of file LCAOrbitalBuilder.cpp.
References APP_ABORT, LCAOrbitalSet::getBasisSetSize(), SPOSet::getOrbitalSetSize(), getXMLAttributeValue(), LCAOrbitalBuilder::Occ, putContent(), and Vector< T, Alloc >::resize().
Referenced by LCAOrbitalBuilder::loadMO(), and LCAOSpinorBuilder::putFromH5().
|
protected |
read data from a hdf5 file
norb | number of orbitals to be initialized |
coeff_ptr | xmlnode for coefficients |
Used to know if running an MSD calculation - needed for order of Orbitals.
Definition at line 787 of file LCAOrbitalBuilder.cpp.
References qmcplusplus::abs(), OhmmsAttributeSet::add(), APP_ABORT, qmcplusplus::app_log(), LCAOrbitalSet::C, hdf_archive::close(), copy(), DELETED, DEPRECATED, qmcplusplus::Units::charge::e, SPOSet::getOrbitalSetSize(), LCAOrbitalBuilder::h5_path, LCAOrbitalBuilder::LoadFullCoefsFromH5(), MPIObjectBase::myComm, qmcplusplus::n, LCAOrbitalBuilder::Occ, hdf_archive::open(), hdf_archive::pop(), hdf_archive::push(), OhmmsAttributeSet::put(), Communicate::rank(), hdf_archive::read(), and LCAOrbitalBuilder::SuperTwist.
Referenced by LCAOrbitalBuilder::loadMO().
|
protected |
read matrix from h5 file
[in] | hin | hdf5 arhive to be read from |
setname | where to read from in hdf5 archive | |
[out] | Creal | matrix read from h5 |
added in header to allow use from derived class LCAOSpinorBuilder as well
Definition at line 920 of file LCAOrbitalBuilder.cpp.
References hdf_archive::read().
Referenced by LCAOrbitalBuilder::LoadFullCoefsFromH5(), and LCAOSpinorBuilder::putFromH5().
|
protected |
localized basis set map
Definition at line 55 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createSPOSetFromXML(), LCAOSpinorBuilder::createSPOSetFromXML(), LCAOrbitalBuilder::getBasissetMap(), and LCAOrbitalBuilder::LCAOrbitalBuilder().
|
protected |
if true, add cusp correction to orbitals
Definition at line 57 of file LCAOrbitalBuilder.h.
|
protected |
Enable cusp correction.
Definition at line 71 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createSPOSetFromXML(), and LCAOrbitalBuilder::LCAOrbitalBuilder().
|
protected |
Path to HDF5 Wavefunction.
Definition at line 59 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createBasisSetH5(), LCAOrbitalBuilder::EvalPeriodicImagePhaseFactors(), LCAOrbitalBuilder::LCAOrbitalBuilder(), LCAOSpinorBuilder::LCAOSpinorBuilder(), LCAOrbitalBuilder::loadBasisSetFromH5(), LCAOSpinorBuilder::loadMO(), LCAOrbitalBuilder::loadMO(), LCAOSpinorBuilder::putFromH5(), LCAOrbitalBuilder::putFromH5(), and LCAOrbitalBuilder::putPBCFromH5().
Store Lattice parameters from HDF5 to use in PeriodicImagePhaseFactors.
Definition at line 68 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::EvalPeriodicImagePhaseFactors().
occupation number
Definition at line 86 of file LCAOrbitalBuilder.h.
Referenced by LCAOSpinorBuilder::putFromH5(), LCAOrbitalBuilder::putFromH5(), LCAOrbitalBuilder::putFromXML(), LCAOrbitalBuilder::putOccupation(), and LCAOrbitalBuilder::putPBCFromH5().
|
protected |
Number of periodic Images for Orbital evaluation.
Definition at line 61 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createBasisSet(), LCAOrbitalBuilder::createBasisSetH5(), LCAOrbitalBuilder::EvalPeriodicImagePhaseFactors(), and LCAOrbitalBuilder::LCAOrbitalBuilder().
|
protected |
Definition at line 66 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createBasisSet(), LCAOrbitalBuilder::createBasisSetH5(), and LCAOrbitalBuilder::LCAOrbitalBuilder().
|
protected |
Periodic Image Phase Factors. Correspond to the phase from the PBCImages. Computed only once.
Definition at line 65 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createBasisSet(), LCAOrbitalBuilder::createBasisSetH5(), and LCAOrbitalBuilder::LCAOrbitalBuilder().
|
protected |
source ParticleSet
Definition at line 53 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createBasisSet(), LCAOrbitalBuilder::createBasisSetH5(), and LCAOrbitalBuilder::createSPOSetFromXML().
|
protected |
Coordinates Super Twist.
Definition at line 63 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createBasisSet(), LCAOrbitalBuilder::createBasisSetH5(), LCAOrbitalBuilder::EvalPeriodicImagePhaseFactors(), LCAOrbitalBuilder::LCAOrbitalBuilder(), LCAOrbitalBuilder::LoadFullCoefsFromH5(), and LCAOrbitalBuilder::putPBCFromH5().
|
protected |
target ParticleSet
Definition at line 51 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createBasisSet(), LCAOrbitalBuilder::createBasisSetH5(), and LCAOrbitalBuilder::createSPOSetFromXML().
|
protected |
Captured gpu input string.
Definition at line 73 of file LCAOrbitalBuilder.h.
Referenced by LCAOrbitalBuilder::createSPOSetFromXML(), and LCAOrbitalBuilder::LCAOrbitalBuilder().