ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HydrogenRadials Class Reference

#include <hydrogen_radials.h>

Inheritance diagram for HydrogenRadials:
Collaboration diagram for HydrogenRadials:

Public Member Functions

 HydrogenRadials ()
 default constructor
 
HydrogenRadialsoperator= (const HydrogenRadials &rhs)
 overloaded assignment operator
 
HydrogenRadialsclone () 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
 
- Public Member Functions inherited from RadialSet
 RadialSet ()=default
 
 RadialSet (const RadialSet &)
 deep copy
 
RadialSetoperator= (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 NumericalRadialchi (const int l, const int izeta)
 
const NumericalRadialcbegin () const
 
const NumericalRadialcend () 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

- Protected Member Functions inherited from RadialSet
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.
 
- Protected Attributes inherited from RadialSet
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
 
NumericalRadialchi_ = nullptr
 array of NumericalRadial objects
 
int * index_map_ = nullptr
 A map from (l,izeta) to an index in chi_ array.
 

Constructor & Destructor Documentation

◆ HydrogenRadials()

HydrogenRadials::HydrogenRadials ( )
inline

default constructor

Here is the caller graph for this function:

◆ ~HydrogenRadials()

HydrogenRadials::~HydrogenRadials ( )
inline

destructor

Member Function Documentation

◆ build()

void HydrogenRadials::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 
)
virtual

build the hydrogen-like radial functions and push into NumericalRadials

Parameters
itypeindex of the atom type
chargecharge of the nucleus
nmaxmaxmium principal quantum number
rcutcutoff radius of the radial function (not used anymore)
drstep size of the radial grid
rankMPI rank
symbolelement symbol, seems only useful when storing orbital information to file
strategystrategy string
ptr_logpointer to the log ofstream

Reimplemented from RadialSet.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clone()

HydrogenRadials * HydrogenRadials::clone ( ) const
inlinevirtual

copy constructor

Returns
a copy of the HydrogenRadials object

Implements RadialSet.

Here is the call graph for this function:

◆ generate_hydrogen_radial_segment()

std::vector< double > HydrogenRadials::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 
)
private

generate hydrogen-like radial functions for a given n, l, in a given range [rmin, rmax]

Parameters
chargecharge of the nucleus
nprincipal quantum number
langular momentum quantum number
rminthe minimal radius
rmaxthe maximal radius
drstep size of the radial grid
rankMPI rank
ptr_logpointer to the log ofstream
Returns
the radial function stored in std::vector<double>
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_hydrogen_radial_toconv()

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

Parameters
chargecharge of the nucleus
nprincipal quantum number
langular momentum quantum number
converge_thresholdthe threshold of norm of radial function, if not reached, will continue to increase the radius
rankMPI rank
rgridreturned radial grid
rvaluereturned radial function
ptr_logpointer to the log ofstream
Returns
the rmax of present radial function
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_orb()

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

Parameters
chargecharge of the nucleus
nmaxmaxmium principal quantum number
drstep size of the radial grid
rankMPI rank
strategystrategy string
ptr_logpointer to the log ofstream
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hydrogen()

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

Parameters
chargecharge of the nucleus
nmaxmaxmium principal quantum number
drstep size of the radial grid
conv_thrconvergence threshold of the norm of radial function
rankMPI rank
strategystrategy string
ptr_logpointer to the log ofstream
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapping_nl_lzeta()

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

Parameters
nmaxmaxmium principal quantum number
strategystrategy string
Returns
a map of n, l pairs to l, zeta pairs
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

HydrogenRadials & HydrogenRadials::operator= ( const HydrogenRadials rhs)

overloaded assignment operator

Parameters
rhsHydrogenRadials object to be assigned
Returns
a reference to the assigned HydrogenRadials object
Here is the call graph for this function:

◆ radial_norm()

double HydrogenRadials::radial_norm ( const std::vector< double >  rgrid,
const std::vector< double >  rvalue 
)

returns the norm of the radial function

Parameters
rgridradial grid
rvalueradial function
Returns
norm of the radial function
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slater_screening()

double HydrogenRadials::slater_screening ( const std::string  symbol,
const int  n,
const int  l 
)

return the Slater screening constant for calculating effective nuclear charge

Note
hoping to get a more accurate estimation of hydrogen-like atom radial function, by including many-electron effect in this way

algorithm: https://laney.edu/pinar-alscher/wp-content/uploads/sites/219/2016/04/Slater-rules-revised.pdf

Parameters
nprincipal quantum number
langular momentum quantum number
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smooth()

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

Parameters
rgridradial grid
rvalueradial function
sigmasigma of the Gaussian kernel
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unzip_strategy()

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

Parameters
nmaxmaxmium principal quantum number
strategystrategy string
Returns
a vector of n, l pairs
Here is the caller graph for this function:

Member Data Documentation

◆ assoc_laguerre_

Assoc_Laguerre HydrogenRadials::assoc_laguerre_
private

Associated Laguerre polynomials generator.


The documentation for this class was generated from the following files: