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

An abstract class representing the set of all numerical radial functions (of the same kind) from a single element. More...

#include <radial_set.h>

Inheritance diagram for RadialSet:
Collaboration diagram for RadialSet:

Public Member Functions

 RadialSet ()=default
 
 RadialSet (const RadialSet &)
 deep copy
 
RadialSetoperator= (const RadialSet &)
 deep copy
 
virtual RadialSetclone () 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 NumericalRadialchi (const int l, const int izeta)
 
const NumericalRadialcbegin () const
 
const NumericalRadialcend () 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
 
NumericalRadialchi_ = nullptr
 array of NumericalRadial objects
 
int * index_map_ = nullptr
 A map from (l,izeta) to an index in chi_ array.
 

Detailed Description

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.

See also
AtomicRadials BetaRadials

Constructor & Destructor Documentation

◆ RadialSet() [1/2]

RadialSet::RadialSet ( )
default

◆ RadialSet() [2/2]

RadialSet::RadialSet ( const RadialSet other)

deep copy

◆ ~RadialSet()

RadialSet::~RadialSet ( )
virtual

Member Function Documentation

◆ build() [1/5]

virtual void RadialSet::build ( const int  ,
const int  ,
const double  ,
const double  = 0.1,
const double  = 0.01,
const int  = 0,
std::ofstream *  = nullptr,
const int  = 0 
)
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.

◆ build() [2/5]

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

Builds from hydrogen-like radial functions.

Currently only HydrogenRadials objects are supposed to used this interface.

Reimplemented in HydrogenRadials.

◆ build() [3/5]

virtual void RadialSet::build ( const Numerical_Nonlocal ,
const int  = 0,
std::ofstream * const  = nullptr 
)
inlinevirtual

Builds from a Numerical_Nonlocal object.

Currently nonlocal projectors are read in source_cell and passed to Numerical_Nonlocal objects.

Reimplemented in BetaRadials.

◆ build() [4/5]

virtual void RadialSet::build ( const std::string &  ,
const int  ,
const double  ,
const double  ,
std::ofstream * const  = nullptr,
const int  = 0 
)
inlinevirtual

Builds from pseudopotential file.

Currently only PswfcRadials objects are supposed to used this interface.

Reimplemented in PswfcRadials.

◆ build() [5/5]

virtual void RadialSet::build ( const std::string &  ,
const int  = 0,
std::ofstream * const  = nullptr,
const int  = 0 
)
inlinevirtual

Builds the object from a file.

Currently only AtomicRadials objects are supposed to used this interface.

Reimplemented in AtomicRadials.

Here is the caller graph for this function:

◆ cbegin()

const NumericalRadial * RadialSet::cbegin ( ) const
inline
Here is the caller graph for this function:

◆ cend()

const NumericalRadial * RadialSet::cend ( ) const
inline

◆ chi()

const NumericalRadial & RadialSet::chi ( const int  l,
const int  izeta 
)
Here is the caller graph for this function:

◆ cleanup()

void RadialSet::cleanup ( )
protected

Deallocates memory and reset all class members to default values.

Here is the caller graph for this function:

◆ clone()

virtual RadialSet * RadialSet::clone ( ) const
pure virtual

for polymorphic copy

Implemented in AtomicRadials, BetaRadials, HydrogenRadials, PswfcRadials, and SphbesRadials.

Here is the caller graph for this function:

◆ index()

int RadialSet::index ( const int  l,
const int  izeta 
) const
protected

Gets the index in chi_ array from (l,izeta).

Here is the caller graph for this function:

◆ indexing()

void RadialSet::indexing ( )
protected

Builds index_map_ from nzeta_, nzeta_max_ and lmax_.

Here is the caller graph for this function:

◆ itype()

int RadialSet::itype ( ) const
inline
Here is the caller graph for this function:

◆ lmax()

int RadialSet::lmax ( ) const
inline
Here is the caller graph for this function:

◆ nchi()

int RadialSet::nchi ( ) const
inline
Here is the caller graph for this function:

◆ nzeta()

int RadialSet::nzeta ( const int  l) const
inline
Here is the caller graph for this function:

◆ nzeta_max()

int RadialSet::nzeta_max ( ) const
inline
Here is the caller graph for this function:

◆ operator=()

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

deep copy

Here is the caller graph for this function:

◆ rcut_max()

double RadialSet::rcut_max ( ) const
inline
Here is the caller graph for this function:

◆ set_grid()

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.

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

◆ set_rcut_max()

void RadialSet::set_rcut_max ( )
protected

Sets rcut_max_ to be the maximum rcut of all NumericalRadial objects.

Here is the caller graph for this function:

◆ set_transformer()

void RadialSet::set_transformer ( ModuleBase::SphericalBesselTransformer  sbt,
const int  update = 0 
)

Sets a spherical Bessel transformers for all NumericalRadial objects.

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

◆ set_uniform_grid()

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.

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

◆ symbol()

const std::string & RadialSet::symbol ( ) const
inline
Here is the caller graph for this function:

◆ to_numerical_orbital()

void RadialSet::to_numerical_orbital ( Numerical_Orbital no,
const int  nk_legacy = 4005,
const double  lcao_dk = 0.01 
) const
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.

Here is the call graph for this function:

◆ write_abacus_orb()

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

Parameters
file_namefile name
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ chi_

NumericalRadial* RadialSet::chi_ = nullptr
protected

array of NumericalRadial objects

◆ index_map_

int* RadialSet::index_map_ = nullptr
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.

◆ itype_

int RadialSet::itype_ = 0
protected

usually the index for element in calculation

◆ lmax_

int RadialSet::lmax_ = -1
protected

maximum angular momentum among all NumericalRadial objects

◆ nchi_

int RadialSet::nchi_ = 0
protected

total number of NumericalRadial objects

◆ nzeta_

int* RadialSet::nzeta_ = nullptr
protected

number of NumericalRadial objects for each angular momentum

◆ nzeta_max_

int RadialSet::nzeta_max_ = 0
protected

maximum number of NumericalRadial objects among each angular momentum

◆ rcut_max_

double RadialSet::rcut_max_ = 0.0
protected

maximum rcut (NOT rmax!) among all NumericalRadial objects

◆ symbol_

std::string RadialSet::symbol_ = ""
protected

usually the chemical symbol


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