|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <pswfc_radials.h>
Public Member Functions | |
| PswfcRadials () | |
| PswfcRadials & | operator= (const PswfcRadials &rhs) |
| PswfcRadials * | clone () const |
| for polymorphic copy | |
| ~PswfcRadials () | |
| void | build (const std::string &file="", const int itype=0, const double screening_coeff=0.1, const double conv_thr=1e-10, std::ofstream *ptr_log=nullptr, const int rank=0) |
| central function to build RadialCollection from ONCVPSP program generated pseudopotential file | |
| void | read_upf_pswfc (std::ifstream &ifs, const double screening_coeff, const double conv_thr, std::ofstream *ptr_log=nullptr, const int rank=0) |
| read ONCVPSP program generated pseudopotential file, and store the radial functions in RadialCollection | |
| double | radial_norm (const std::vector< double > rgrid, const std::vector< double > rvalue) |
| returns the norm of the radial function | |
| bool | startswith (std::string word, std::string pattern) |
| python-like startswith function | |
| std::string | read_keyword_value (std::ifstream &ifs, std::string word) |
| read value from attributes in HTML-like format | |
| std::string | steal_from_quotes (std::string word) |
| steal string from quotes | |
| std::string | steal_from_quotes (std::ifstream &ifs, std::string word) |
| steal string from quotes | |
| double | cut_to_convergence (const std::vector< double > &rgrid, std::vector< double > &rvalue, const double &conv_thr) |
| cut radial function to convergence | |
| 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 | |
| std::vector< double > | pswfc_prepossess (std::map< std::pair< int, int >, std::vector< double > > &pswfc_map, const double conv_thr=1e-6) |
| call cut_to_convergence for each (l,zeta) corresponding orbital in std::map, then zero-padding to the maximal r, generate a grid | |
Public Member Functions inherited from RadialSet | |
| 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 int=0, const double=1.0, const bool=false, const int=0, const double=10.0, const double=0.01, const double=1e-6, const int=0, const std::string="", const std::string="minimal-valence", std::ofstream *const =nullptr) |
| Builds from hydrogen-like radial functions. | |
| 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. | |
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 | |
| NumericalRadial * | chi_ = nullptr |
| array of NumericalRadial objects | |
| int * | index_map_ = nullptr |
| A map from (l,izeta) to an index in chi_ array. | |
|
inline |
|
inline |
|
virtual |
central function to build RadialCollection from ONCVPSP program generated pseudopotential file
| file | file name of pseudopotential file |
| itype | atomic type, indiced in UnitCell class |
| screening_coeff | screening coefficient of pseudowavefunction |
| conv_thr | convergence threshold of norm of pseudowavefunction, see function cut_to_convergence for details |
| ptr_log | output file stream for logging |
| rank | MPI rank |
Reimplemented from RadialSet.
|
inlinevirtual |
| double PswfcRadials::cut_to_convergence | ( | const std::vector< double > & | rgrid, |
| std::vector< double > & | rvalue, | ||
| const double & | conv_thr | ||
| ) |
cut radial function to convergence
| rgrid | radial grid |
| rvalue | radial function |
| conv_thr | convergence of norm of radial function |
| PswfcRadials & PswfcRadials::operator= | ( | const PswfcRadials & | rhs | ) |
| std::vector< double > PswfcRadials::pswfc_prepossess | ( | std::map< std::pair< int, int >, std::vector< double > > & | pswfc_map, |
| const double | conv_thr = 1e-6 |
||
| ) |
call cut_to_convergence for each (l,zeta) corresponding orbital in std::map, then zero-padding to the maximal r, generate a grid
| pswfc_map | a map of (l,zeta) corresponding orbital |
| double PswfcRadials::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 |
| std::string PswfcRadials::read_keyword_value | ( | std::ifstream & | ifs, |
| std::string | word | ||
| ) |
read value from attributes in HTML-like format
| ifs | input file stream |
| word | as it is |
| void PswfcRadials::read_upf_pswfc | ( | std::ifstream & | ifs, |
| const double | screening_coeff, | ||
| const double | conv_thr, | ||
| std::ofstream * | ptr_log = nullptr, |
||
| const int | rank = 0 |
||
| ) |
read ONCVPSP program generated pseudopotential file, and store the radial functions in RadialCollection
| ifs | input file stream from orbital file |
| screening_coeff | screening coefficient of pseudowavefunction |
| conv_thr | convergence threshold of norm of pseudowavefunction, see function cut_to_convergence for details |
| ptr_log | output file stream for logging |
| rank | MPI rank |
| ifs | input file stream from orbital file |
| screening_coeff | screening coefficient |
| conv_thr | convergence threshold |
| ptr_log | output file stream for logging |
| rank | MPI rank |
| void PswfcRadials::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 |
| bool PswfcRadials::startswith | ( | std::string | word, |
| std::string | pattern | ||
| ) |
python-like startswith function
| word | as it is |
| pattern | pattern to be matched |
| std::string PswfcRadials::steal_from_quotes | ( | std::ifstream & | ifs, |
| std::string | word | ||
| ) |
steal string from quotes
| ifs | input file stream |
| word | as it is |
| std::string PswfcRadials::steal_from_quotes | ( | std::string | word | ) |
steal string from quotes
| word | as it is |