![]() |
QMCPACK
|
Public Member Functions | |
ECPComponentBuilder (const std::string &aname, Communicate *c, int nrule=-1, int llocal=-1, int srule=8) | |
constructor spin grid used for numerical integration. More... | |
bool | parse (const std::string &fname, xmlNodePtr cur) |
bool | put (xmlNodePtr cur) |
void | addSemiLocal (xmlNodePtr cur) |
void | buildLocal (xmlNodePtr cur) |
build a Local Pseudopotential More... | |
void | buildSemiLocalAndLocal (std::vector< xmlNodePtr > &semiPtr) |
void | buildL2 (xmlNodePtr cur) |
bool | parseCasino (const std::string &fname, xmlNodePtr cur) |
void | SetQuadratureRule (int rule) |
std::unique_ptr< mGridType > | createGrid (xmlNodePtr cur, bool useLinear=false) |
RadialPotentialType * | createVrWithBasisGroup (xmlNodePtr cur, mGridType *agrid) |
void | doBreakUp (const std::vector< int > &angList, const Matrix< mRealType > &vnn, RealType rmax, mRealType Vprefactor=1.0) |
Separate local from non-local potentials. More... | |
void | buildSO (const std::vector< int > &angList, const Matrix< mRealType > &vnnso, RealType rmax, mRealType Vprefactor=1.0) |
brief buildSO - takes the previously parsed angular momenta and spin-orbit tabulated potentials and uses them to construct SOECPComponent* pp_so. More... | |
void | printECPTable () |
bool | read_pp_file (const std::string &fname) |
![]() | |
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) |
Public Attributes | |
int | NumNonLocal |
int | Lmax |
int | Llocal |
int | Nrule |
int | Srule |
int | NumSO |
int | LmaxSO |
int | AtomicNumber |
RealType | Zeff |
RealType | RcutMax |
std::string | Species |
std::unique_ptr< mGridType > | grid_global |
std::map< std::string, std::unique_ptr< mGridType > > | grid_inp |
std::unique_ptr< RadialPotentialType > | pp_loc |
std::unique_ptr< NonLocalECPComponent > | pp_nonloc |
std::unique_ptr< SOECPComponent > | pp_so |
std::unique_ptr< L2RadialPotential > | pp_L2 |
std::map< std::string, int > | angMon |
Additional Inherited Members | |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
Definition at line 28 of file ECPComponentBuilder.h.
using GridType = LocalECPotential::GridType |
Definition at line 30 of file ECPComponentBuilder.h.
using mGridType = OneDimGridBase<mRealType> |
Definition at line 32 of file ECPComponentBuilder.h.
using mRealType = ParticleSet::Scalar_t |
Definition at line 31 of file ECPComponentBuilder.h.
Definition at line 33 of file ECPComponentBuilder.h.
ECPComponentBuilder | ( | const std::string & | aname, |
Communicate * | c, | ||
int | nrule = -1 , |
||
int | llocal = -1 , |
||
int | srule = 8 |
||
) |
constructor spin grid used for numerical integration.
use 0 for exact integration.
Definition at line 31 of file ECPComponentBuilder.cpp.
References ECPComponentBuilder::angMon.
void addSemiLocal | ( | xmlNodePtr | cur | ) |
Definition at line 22 of file ECPComponentBuilder.1.cpp.
References ECPComponentBuilder::angMon, ECPComponentBuilder::createGrid(), ECPComponentBuilder::createVrWithBasisGroup(), getXMLAttributeValue(), ECPComponentBuilder::Lmax, ECPComponentBuilder::NumNonLocal, and ECPComponentBuilder::pp_nonloc.
Referenced by ECPComponentBuilder::put().
void buildL2 | ( | xmlNodePtr | cur | ) |
Definition at line 16 of file ECPComponentBuilder_L2.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_error(), qmcplusplus::app_log(), Communicate::barrier_and_abort(), qmcplusplus::ceil(), qmcplusplus::Units::charge::e, ECPComponentBuilder::grid_global, LINEAR_1DGRID, omptarget::min(), MPIObjectBase::myComm, ECPComponentBuilder::pp_L2, OhmmsAttributeSet::put(), putContent(), and OneDimCubicSpline< Td, Tg, CTd, CTg >::spline().
Referenced by ECPComponentBuilder::put().
void buildLocal | ( | xmlNodePtr | cur | ) |
build a Local Pseudopotential
For numerical stability, the radial function of the local pseudopotential is stored as for the distance r and
. The coulomb factor $Z_{e}Z_{eff}/r$ is applied by LocalECPotential (see LocalECPotential::evaluate).
Definition at line 104 of file ECPComponentBuilder.1.cpp.
References qmcplusplus::abs(), qmcplusplus::app_log(), Communicate::barrier_and_abort(), ECPComponentBuilder::createGrid(), CUSTOM_1DGRID, qmcplusplus::Units::charge::e, getXMLAttributeValue(), ECPComponentBuilder::grid_global, MPIObjectBase::myComm, ECPComponentBuilder::pp_loc, and ECPComponentBuilder::Zeff.
Referenced by ECPComponentBuilder::put().
void buildSemiLocalAndLocal | ( | std::vector< xmlNodePtr > & | semiPtr | ) |
Definition at line 27 of file ECPComponentBuilder.2.cpp.
References OhmmsAttributeSet::add(), ECPComponentBuilder::angMon, qmcplusplus::app_error(), qmcplusplus::app_log(), qmcplusplus::app_warning(), Communicate::barrier_and_abort(), ECPComponentBuilder::buildSO(), copy(), ECPComponentBuilder::doBreakUp(), ECPComponentBuilder::grid_global, ECPComponentBuilder::Llocal, ECPComponentBuilder::Lmax, ECPComponentBuilder::LmaxSO, MPIObjectBase::myComm, ECPComponentBuilder::Nrule, ECPComponentBuilder::pp_nonloc, ECPComponentBuilder::pp_so, OhmmsAttributeSet::put(), putContent(), and ECPComponentBuilder::Srule.
Referenced by ECPComponentBuilder::put().
void buildSO | ( | const std::vector< int > & | angList, |
const Matrix< mRealType > & | vnnso, | ||
RealType | rmax, | ||
mRealType | Vprefactor = 1.0 |
||
) |
brief buildSO - takes the previously parsed angular momenta and spin-orbit tabulated potentials and uses them to construct SOECPComponent* pp_so.
This is called in "doBreakUp".
param std::vector<int>& angList The angular momentum for each SO potential. param Matrix<mRealType>& vnnso (npot x ngrid) matrix storing all tabulated SO potentials. param RealType rmax max r on the specified grid. param mRealType Vprefactor optional scale factor.
return void
Definition at line 313 of file ECPComponentBuilder.2.cpp.
References qmcplusplus::app_log(), qmcplusplus::ceil(), Matrix< T, Alloc >::cols(), qmcplusplus::Units::charge::e, ECPComponentBuilder::grid_global, LINEAR_1DGRID, omptarget::min(), ECPComponentBuilder::NumSO, ECPComponentBuilder::pp_so, and OneDimCubicSpline< Td, Tg, CTd, CTg >::spline().
Referenced by ECPComponentBuilder::buildSemiLocalAndLocal().
std::unique_ptr< ECPComponentBuilder::mGridType > createGrid | ( | xmlNodePtr | cur, |
bool | useLinear = false |
||
) |
Definition at line 205 of file ECPComponentBuilder.1.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::app_log(), qmcplusplus::Units::charge::e, ECPComponentBuilder::grid_inp, OhmmsAttributeSet::put(), and putContent().
Referenced by ECPComponentBuilder::addSemiLocal(), ECPComponentBuilder::buildLocal(), and ECPComponentBuilder::put().
ECPComponentBuilder::RadialPotentialType * createVrWithBasisGroup | ( | xmlNodePtr | cur, |
mGridType * | agrid | ||
) |
Definition at line 58 of file ECPComponentBuilder.1.cpp.
References qmcplusplus::abs(), qmcplusplus::app_log(), qmcplusplus::Units::charge::e, GaussianTimesRN< T >::putBasisGroup(), OneDimGridBase< T, CT >::rmax(), OneDimGridBase< T, CT >::size(), and OneDimCubicSpline< Td, Tg, CTd, CTg >::spline().
Referenced by ECPComponentBuilder::addSemiLocal().
void doBreakUp | ( | const std::vector< int > & | angList, |
const Matrix< mRealType > & | vnn, | ||
RealType | rmax, | ||
mRealType | Vprefactor = 1.0 |
||
) |
Separate local from non-local potentials.
angList | angular momentum list |
vnn | semilocal tables of size (angList.size(),global_grid->size()) |
rmax | cutoff radius |
Vprefactor | conversion factor to Hartree |
Note that local pseudopotential is r*V !!!
Definition at line 463 of file ECPComponentBuilder.2.cpp.
References qmcplusplus::app_log(), qmcplusplus::ceil(), Matrix< T, Alloc >::cols(), qmcplusplus::Units::charge::e, qmcplusplus::floor(), ECPComponentBuilder::grid_global, LINEAR_1DGRID, ECPComponentBuilder::Llocal, ECPComponentBuilder::Lmax, qmcplusplus::Units::distance::m, omptarget::min(), ECPComponentBuilder::NumNonLocal, ECPComponentBuilder::pp_loc, ECPComponentBuilder::pp_nonloc, OneDimCubicSpline< Td, Tg, CTd, CTg >::spline(), and ECPComponentBuilder::Zeff.
Referenced by ECPComponentBuilder::buildSemiLocalAndLocal(), and ECPComponentBuilder::parseCasino().
bool parse | ( | const std::string & | fname, |
xmlNodePtr | cur | ||
) |
Definition at line 63 of file ECPComponentBuilder.cpp.
References getXMLAttributeValue(), ECPComponentBuilder::RcutMax, and ECPComponentBuilder::read_pp_file().
Referenced by ECPotentialBuilder::useXmlFormat().
bool parseCasino | ( | const std::string & | fname, |
xmlNodePtr | cur | ||
) |
Definition at line 371 of file ECPComponentBuilder.2.cpp.
References qmcplusplus::abs(), OhmmsAttributeSet::add(), qmcplusplus::app_error(), qmcplusplus::app_log(), ECPComponentBuilder::AtomicNumber, Communicate::barrier_and_abort(), ECPComponentBuilder::doBreakUp(), ECPComponentBuilder::grid_global, ECPComponentBuilder::Llocal, ECPComponentBuilder::Lmax, MPIObjectBase::myComm, ECPComponentBuilder::Nrule, ECPComponentBuilder::pp_nonloc, OhmmsAttributeSet::put(), ECPComponentBuilder::SetQuadratureRule(), and ECPComponentBuilder::Zeff.
Referenced by ECPotentialBuilder::useXmlFormat().
void printECPTable | ( | ) |
Definition at line 223 of file ECPComponentBuilder.cpp.
References DEBUG, QMCState::io_node, OutputManagerClass::isActive(), ECPComponentBuilder::Lmax, QMCState::mpi_groups, outputManager, ECPComponentBuilder::pp_loc, ECPComponentBuilder::pp_nonloc, qmcplusplus::qmc_common, and ECPComponentBuilder::Species.
Referenced by ECPotentialBuilder::useXmlFormat().
bool put | ( | xmlNodePtr | cur | ) |
Definition at line 166 of file ECPComponentBuilder.cpp.
References ECPComponentBuilder::addSemiLocal(), qmcplusplus::app_log(), ECPComponentBuilder::AtomicNumber, ECPComponentBuilder::buildL2(), ECPComponentBuilder::buildLocal(), ECPComponentBuilder::buildSemiLocalAndLocal(), ECPComponentBuilder::createGrid(), getXMLAttributeValue(), ECPComponentBuilder::grid_global, ECPComponentBuilder::Nrule, ECPComponentBuilder::pp_loc, ECPComponentBuilder::pp_nonloc, ECPComponentBuilder::pp_so, ECPComponentBuilder::SetQuadratureRule(), and ECPComponentBuilder::Zeff.
Referenced by ECPComponentBuilder::read_pp_file(), and ECPotentialBuilder::useXmlFormat().
bool read_pp_file | ( | const std::string & | fname | ) |
Definition at line 136 of file ECPComponentBuilder.cpp.
References Communicate::barrier_and_abort(), ReadFileBuffer::contents(), ReadFileBuffer::length, MPIObjectBase::myComm, qmcplusplus::okay, ReadFileBuffer::open_file(), ECPComponentBuilder::put(), and ReadFileBuffer::read_contents().
Referenced by qmcplusplus::doSOECPotentialTest(), ECPComponentBuilder::parse(), and qmcplusplus::TEST_CASE().
void SetQuadratureRule | ( | int | rule | ) |
Definition at line 264 of file ECPComponentBuilder.cpp.
References qmcplusplus::app_log(), ECPComponentBuilder::Lmax, Quadrature3D< T >::nk, ECPComponentBuilder::NumNonLocal, ECPComponentBuilder::NumSO, ECPComponentBuilder::pp_nonloc, ECPComponentBuilder::pp_so, ECPComponentBuilder::Srule, Quadrature3D< T >::weight_m, and Quadrature3D< T >::xyz_m.
Referenced by ECPComponentBuilder::parseCasino(), and ECPComponentBuilder::put().
std::map<std::string, int> angMon |
Definition at line 49 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::addSemiLocal(), ECPComponentBuilder::buildSemiLocalAndLocal(), and ECPComponentBuilder::ECPComponentBuilder().
int AtomicNumber |
Definition at line 39 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::parseCasino(), ECPComponentBuilder::put(), and ECPotentialBuilder::useXmlFormat().
std::unique_ptr<mGridType> grid_global |
Definition at line 43 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildL2(), ECPComponentBuilder::buildLocal(), ECPComponentBuilder::buildSemiLocalAndLocal(), ECPComponentBuilder::buildSO(), ECPComponentBuilder::doBreakUp(), ECPComponentBuilder::parseCasino(), and ECPComponentBuilder::put().
std::map<std::string, std::unique_ptr<mGridType> > grid_inp |
Definition at line 44 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::createGrid().
int Llocal |
Definition at line 36 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildSemiLocalAndLocal(), ECPComponentBuilder::doBreakUp(), and ECPComponentBuilder::parseCasino().
int Lmax |
Definition at line 36 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::addSemiLocal(), ECPComponentBuilder::buildSemiLocalAndLocal(), ECPComponentBuilder::doBreakUp(), ECPComponentBuilder::parseCasino(), ECPComponentBuilder::printECPTable(), and ECPComponentBuilder::SetQuadratureRule().
int LmaxSO |
Definition at line 38 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildSemiLocalAndLocal().
int Nrule |
Definition at line 36 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildSemiLocalAndLocal(), ECPComponentBuilder::parseCasino(), and ECPComponentBuilder::put().
int NumNonLocal |
Definition at line 35 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::addSemiLocal(), ECPComponentBuilder::doBreakUp(), and ECPComponentBuilder::SetQuadratureRule().
int NumSO |
Definition at line 37 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildSO(), and ECPComponentBuilder::SetQuadratureRule().
std::unique_ptr<L2RadialPotential> pp_L2 |
Definition at line 48 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildL2(), and ECPotentialBuilder::useXmlFormat().
std::unique_ptr<RadialPotentialType> pp_loc |
Definition at line 45 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildLocal(), ECPComponentBuilder::doBreakUp(), ECPComponentBuilder::printECPTable(), ECPComponentBuilder::put(), and ECPotentialBuilder::useXmlFormat().
std::unique_ptr<NonLocalECPComponent> pp_nonloc |
Definition at line 46 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::addSemiLocal(), ECPComponentBuilder::buildSemiLocalAndLocal(), ECPComponentBuilder::doBreakUp(), ECPComponentBuilder::parseCasino(), ECPComponentBuilder::printECPTable(), ECPComponentBuilder::put(), ECPComponentBuilder::SetQuadratureRule(), qmcplusplus::TEST_CASE(), and ECPotentialBuilder::useXmlFormat().
std::unique_ptr<SOECPComponent> pp_so |
Definition at line 47 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildSemiLocalAndLocal(), ECPComponentBuilder::buildSO(), qmcplusplus::doSOECPotentialTest(), ECPComponentBuilder::put(), ECPComponentBuilder::SetQuadratureRule(), qmcplusplus::TEST_CASE(), and ECPotentialBuilder::useXmlFormat().
RealType RcutMax |
Definition at line 41 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::parse().
std::string Species |
Definition at line 42 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::printECPTable().
int Srule |
Definition at line 36 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildSemiLocalAndLocal(), and ECPComponentBuilder::SetQuadratureRule().
RealType Zeff |
Definition at line 40 of file ECPComponentBuilder.h.
Referenced by ECPComponentBuilder::buildLocal(), ECPComponentBuilder::doBreakUp(), ECPComponentBuilder::parseCasino(), ECPComponentBuilder::put(), qmcplusplus::TEST_CASE(), and ECPotentialBuilder::useXmlFormat().