ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <hydrogen_radials.h>
Public Member Functions | |
HydrogenRadials () | |
default constructor | |
HydrogenRadials & | operator= (const HydrogenRadials &rhs) |
overloaded assignment operator | |
HydrogenRadials * | clone () const |
copy constructor | |
~HydrogenRadials () | |
destructor | |
void | build (const int itype=0, const double charge=1.0, const bool with_slater_screening=false, const int nmax=0, const double rcut=10.0, const double dr=0.01, const double conv_thr=1e-6, const int rank=0, const std::string symbol="", const std::string strategy="minimal-valence", std::ofstream *ptr_log=nullptr) |
build the hydrogen-like radial functions and push into NumericalRadials | |
std::vector< std::pair< int, int > > | unzip_strategy (const int nmax=0, const std::string strategy="minimal-valence") |
parse the strategy string to get the n, l pairs | |
void | smooth (std::vector< double > &rgrid, std::vector< double > &rvalue, const double sigma=0.1) |
smooth the radial function to avoid high frequency noise in FFT-spherical bessel transform | |
double | generate_hydrogen_radial_toconv (const double charge, const bool with_slater_screening, const int n, const int l, const double conv_thr, const int rank, std::vector< double > &rgrid, std::vector< double > &rvalue, std::ofstream *ptr_log=nullptr) |
generate hydrogen-like radial functions for a given n, l, from 0.0 to a radius where the norm of radial function is converged | |
double | radial_norm (const std::vector< double > rgrid, const std::vector< double > rvalue) |
returns the norm of the radial function | |
std::map< std::pair< int, int >, std::pair< std::vector< double >, std::vector< double > > > | generate_orb (const double charge=1.0, const bool with_slater_screening=false, const int nmax=0, const double dr=0.01, const double conv_thr=1e-6, const int rank=0, const std::string strategy="minimal-valence", std::ofstream *ptr_log=nullptr) |
generate set of hydrogen-like radial functions for a given charge, nmax, dr, rank, strategy | |
std::map< std::pair< int, int >, std::pair< int, int > > | mapping_nl_lzeta (const int nmax=0, const std::string strategy="minimal-valence") |
mapping the n, l pairs to the l, zeta pairs | |
void | hydrogen (const double charge=1.0, const bool with_slater_screening=false, const int nmax=0, const double dr=0.01, const double conv_thr=1e-6, const int rank=0, const std::string strategy="minimal-valence", std::ofstream *ptr_log=nullptr) |
kernel function of hydrogen-like radial functions | |
double | slater_screening (const std::string symbol, const int n, const int l) |
return the Slater screening constant for calculating effective nuclear charge | |
![]() | |
RadialSet ()=default | |
RadialSet (const RadialSet &) | |
deep copy | |
RadialSet & | operator= (const RadialSet &) |
deep copy | |
virtual | ~RadialSet () |
virtual void | to_numerical_orbital (Numerical_Orbital &, const int nk_legacy=4005, const double lcao_dk=0.01) const |
Overwrites the content of a Numerical_Orbital object with the current object. | |
virtual void | build (const std::string &, const int=0, std::ofstream *const =nullptr, const int=0) |
Builds the object from a file. | |
virtual void | build (const Numerical_Nonlocal &, const int=0, std::ofstream *const =nullptr) |
Builds from a Numerical_Nonlocal object. | |
virtual void | build (const std::string &, const int, const double, const double, std::ofstream *const =nullptr, const int=0) |
Builds from pseudopotential file. | |
virtual void | build (const int, const int, const double, const double=0.1, const double=0.01, const int=0, std::ofstream *=nullptr, const int=0) |
Builds with the truncated spherical Bessel functions. | |
void | write_abacus_orb (const std::string &, const int=0) const |
write any RadialSet object to a file in ABACUS numerical atomic orbital format. | |
const std::string & | symbol () const |
int | itype () const |
int | lmax () const |
double | rcut_max () const |
int | nzeta (const int l) const |
int | nzeta_max () const |
int | nchi () const |
const NumericalRadial & | chi (const int l, const int izeta) |
const NumericalRadial * | cbegin () const |
const NumericalRadial * | cend () const |
void | set_transformer (ModuleBase::SphericalBesselTransformer sbt, const int update=0) |
void | set_grid (const bool for_r_space, const int ngrid, const double *grid, const char mode='i') |
Sets a common grid for all NumericalRadial objects. | |
void | set_uniform_grid (const bool for_r_space, const int ngrid, const double cutoff, const char mode='i', const bool enable_fft=false) |
Sets a common uniform grid for all NumericalRadial objects. | |
Private Member Functions | |
std::vector< double > | generate_hydrogen_radial_segment (const double charge=1.0, const bool with_slater_screening=false, const int n=0, const int l=0, const double rmin=0.0, const double rmax=10.0, const double dr=0.01, const int rank=0, std::ofstream *ptr_log=nullptr) |
generate hydrogen-like radial functions for a given n, l, in a given range [rmin, rmax] | |
Private Attributes | |
Assoc_Laguerre | assoc_laguerre_ |
Associated Laguerre polynomials generator. | |
Additional Inherited Members | |
![]() | |
void | cleanup () |
Deallocates memory and reset all class members to default values. | |
int | index (const int l, const int izeta) const |
Gets the index in chi_ array from (l,izeta). | |
void | indexing () |
Builds index_map_ from nzeta_, nzeta_max_ and lmax_. | |
void | set_rcut_max () |
Sets rcut_max_ to be the maximum rcut of all NumericalRadial objects. | |
![]() | |
std::string | symbol_ = "" |
usually the chemical symbol | |
int | itype_ = 0 |
usually the index for element in calculation | |
int | lmax_ = -1 |
maximum angular momentum among all NumericalRadial objects | |
double | rcut_max_ = 0.0 |
maximum rcut (NOT rmax!) among all NumericalRadial objects | |
int * | nzeta_ = nullptr |
number of NumericalRadial objects for each angular momentum | |
int | nzeta_max_ = 0 |
maximum number of NumericalRadial objects among each angular momentum | |
int | nchi_ = 0 |
total number of NumericalRadial objects | |
NumericalRadial * | chi_ = nullptr |
array of NumericalRadial objects | |
int * | index_map_ = nullptr |
A map from (l,izeta) to an index in chi_ array. | |
|
inline |
default constructor
|
inline |
destructor
|
virtual |
build the hydrogen-like radial functions and push into NumericalRadials
itype | index of the atom type |
charge | charge of the nucleus |
nmax | maxmium principal quantum number |
rcut | cutoff radius of the radial function (not used anymore) |
dr | step size of the radial grid |
rank | MPI rank |
symbol | element symbol, seems only useful when storing orbital information to file |
strategy | strategy string |
ptr_log | pointer to the log ofstream |
Reimplemented from RadialSet.
|
inlinevirtual |
copy constructor
Implements RadialSet.
|
private |
generate hydrogen-like radial functions for a given n, l, in a given range [rmin, rmax]
charge | charge of the nucleus |
n | principal quantum number |
l | angular momentum quantum number |
rmin | the minimal radius |
rmax | the maximal radius |
dr | step size of the radial grid |
rank | MPI rank |
ptr_log | pointer to the log ofstream |
double HydrogenRadials::generate_hydrogen_radial_toconv | ( | const double | charge, |
const bool | with_slater_screening, | ||
const int | n, | ||
const int | l, | ||
const double | conv_thr, | ||
const int | rank, | ||
std::vector< double > & | rgrid, | ||
std::vector< double > & | rvalue, | ||
std::ofstream * | ptr_log = nullptr |
||
) |
generate hydrogen-like radial functions for a given n, l, from 0.0 to a radius where the norm of radial function is converged
charge | charge of the nucleus |
n | principal quantum number |
l | angular momentum quantum number |
converge_threshold | the threshold of norm of radial function, if not reached, will continue to increase the radius |
rank | MPI rank |
rgrid | returned radial grid |
rvalue | returned radial function |
ptr_log | pointer to the log ofstream |
std::map< std::pair< int, int >, std::pair< std::vector< double >, std::vector< double > > > HydrogenRadials::generate_orb | ( | const double | charge = 1.0 , |
const bool | with_slater_screening = false , |
||
const int | nmax = 0 , |
||
const double | dr = 0.01 , |
||
const double | conv_thr = 1e-6 , |
||
const int | rank = 0 , |
||
const std::string | strategy = "minimal-valence" , |
||
std::ofstream * | ptr_log = nullptr |
||
) |
generate set of hydrogen-like radial functions for a given charge, nmax, dr, rank, strategy
charge | charge of the nucleus |
nmax | maxmium principal quantum number |
dr | step size of the radial grid |
rank | MPI rank |
strategy | strategy string |
ptr_log | pointer to the log ofstream |
void HydrogenRadials::hydrogen | ( | const double | charge = 1.0 , |
const bool | with_slater_screening = false , |
||
const int | nmax = 0 , |
||
const double | dr = 0.01 , |
||
const double | conv_thr = 1e-6 , |
||
const int | rank = 0 , |
||
const std::string | strategy = "minimal-valence" , |
||
std::ofstream * | ptr_log = nullptr |
||
) |
kernel function of hydrogen-like radial functions
charge | charge of the nucleus |
nmax | maxmium principal quantum number |
dr | step size of the radial grid |
conv_thr | convergence threshold of the norm of radial function |
rank | MPI rank |
strategy | strategy string |
ptr_log | pointer to the log ofstream |
std::map< std::pair< int, int >, std::pair< int, int > > HydrogenRadials::mapping_nl_lzeta | ( | const int | nmax = 0 , |
const std::string | strategy = "minimal-valence" |
||
) |
mapping the n, l pairs to the l, zeta pairs
nmax | maxmium principal quantum number |
strategy | strategy string |
HydrogenRadials & HydrogenRadials::operator= | ( | const HydrogenRadials & | rhs | ) |
overloaded assignment operator
rhs | HydrogenRadials object to be assigned |
double HydrogenRadials::radial_norm | ( | const std::vector< double > | rgrid, |
const std::vector< double > | rvalue | ||
) |
returns the norm of the radial function
rgrid | radial grid |
rvalue | radial function |
double HydrogenRadials::slater_screening | ( | const std::string | symbol, |
const int | n, | ||
const int | l | ||
) |
return the Slater screening constant for calculating effective nuclear charge
algorithm: https://laney.edu/pinar-alscher/wp-content/uploads/sites/219/2016/04/Slater-rules-revised.pdf
n | principal quantum number |
l | angular momentum quantum number |
void HydrogenRadials::smooth | ( | std::vector< double > & | rgrid, |
std::vector< double > & | rvalue, | ||
const double | sigma = 0.1 |
||
) |
smooth the radial function to avoid high frequency noise in FFT-spherical bessel transform
rgrid | radial grid |
rvalue | radial function |
sigma | sigma of the Gaussian kernel |
std::vector< std::pair< int, int > > HydrogenRadials::unzip_strategy | ( | const int | nmax = 0 , |
const std::string | strategy = "minimal-valence" |
||
) |
parse the strategy string to get the n, l pairs
nmax | maxmium principal quantum number |
strategy | strategy string |
|
private |
Associated Laguerre polynomials generator.