ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
An abstract class representing the set of all numerical radial functions (of the same kind) from a single element. More...
#include <radial_set.h>
Public Member Functions | |
RadialSet ()=default | |
RadialSet (const RadialSet &) | |
deep copy | |
RadialSet & | operator= (const RadialSet &) |
deep copy | |
virtual RadialSet * | clone () const =0 |
for polymorphic 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. | |
Builders. | |
The derived classes should implement these functions so as to set symbol_, itype_, nchi_ and chi_. | |
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 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. | |
Getters | |
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 |
Property setters for all NumericalRadial objects | |
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. | |
Protected Member Functions | |
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 | |
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. | |
An abstract class representing the set of all numerical radial functions (of the same kind) from a single element.
This class is supposed to be the base class for concrete classes like AtomicRadials or BetaRadials, which represent the set of all numerical atomic orbitals or Kleinman-Bylander beta functions of a single element respectively.
|
default |
RadialSet::RadialSet | ( | const RadialSet & | other | ) |
deep copy
|
virtual |
|
inlinevirtual |
Builds with the truncated spherical Bessel functions.
This is the interface for building the RadialSet with the truncated spherical Bessel functions. See the derived class "SphbesRadials" for the implementation.
Reimplemented in SphbesRadials.
|
inlinevirtual |
Builds from hydrogen-like radial functions.
Currently only HydrogenRadials objects are supposed to used this interface.
Reimplemented in HydrogenRadials.
|
inlinevirtual |
Builds from a Numerical_Nonlocal object.
Currently nonlocal projectors are read in source_cell and passed to Numerical_Nonlocal objects.
Reimplemented in BetaRadials.
|
inlinevirtual |
Builds from pseudopotential file.
Currently only PswfcRadials objects are supposed to used this interface.
Reimplemented in PswfcRadials.
|
inlinevirtual |
Builds the object from a file.
Currently only AtomicRadials objects are supposed to used this interface.
Reimplemented in AtomicRadials.
|
inline |
|
inline |
const NumericalRadial & RadialSet::chi | ( | const int | l, |
const int | izeta | ||
) |
|
protected |
Deallocates memory and reset all class members to default values.
|
pure virtual |
for polymorphic copy
Implemented in AtomicRadials, BetaRadials, HydrogenRadials, PswfcRadials, and SphbesRadials.
|
protected |
Gets the index in chi_ array from (l,izeta).
|
protected |
Builds index_map_ from nzeta_, nzeta_max_ and lmax_.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
deep copy
|
inline |
void RadialSet::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.
|
protected |
Sets rcut_max_ to be the maximum rcut of all NumericalRadial objects.
void RadialSet::set_transformer | ( | ModuleBase::SphericalBesselTransformer | sbt, |
const int | update = 0 |
||
) |
Sets a spherical Bessel transformers for all NumericalRadial objects.
void RadialSet::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.
|
inline |
|
virtual |
Overwrites the content of a Numerical_Orbital object with the current object.
This function provides an interface to the corresponding object in the old module_ao.
void RadialSet::write_abacus_orb | ( | const std::string & | file_name, |
const int | rank = 0 |
||
) | const |
write any RadialSet object to a file in ABACUS numerical atomic orbital format.
This function will write any RadialSet object to file in ABACUS numerical atomic orbital format. However its counterparts,
read_abacus_orb()
is in AtomicRadials,
read_beta_upf100()
and read_beta_upf201()
are in BetaRadials, read_upf_pswfc()
is in PswfcRadials,
read_coeff()
is in SphbesRadials,
due to read-in procedures always vary from one to another. MPI rank
file_name | file name |
|
protected |
array of NumericalRadial objects
|
protected |
A map from (l,izeta) to an index in chi_ array.
An array of nzeta_max_ * (lmax_ + 1) elements which stores the index of chi_ array for each (l,izeta) pair.
|
protected |
usually the index for element in calculation
|
protected |
maximum angular momentum among all NumericalRadial objects
|
protected |
total number of NumericalRadial objects
|
protected |
number of NumericalRadial objects for each angular momentum
|
protected |
maximum number of NumericalRadial objects among each angular momentum
|
protected |
maximum rcut (NOT rmax!) among all NumericalRadial objects
|
protected |
usually the chemical symbol