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
AtomicRadials Class Reference

The radial part of numerical atomic orbitals of a single element. More...

#include <atomic_radials.h>

Inheritance diagram for AtomicRadials:
Collaboration diagram for AtomicRadials:

Public Member Functions

 AtomicRadials ()
 
 AtomicRadials (const AtomicRadials &other)
 
AtomicRadialsoperator= (const AtomicRadials &rhs)
 
AtomicRadialsclone () const
 for polymorphic copy
 
 ~AtomicRadials ()
 
void build (const std::string &file, const int itype=0, std::ofstream *ptr_log=nullptr, const int rank=0)
 Build the class from an orbital file.
 
void build (RadialSet *const other, const int itype, const double rcut)
 
double orb_ecut () const
 Get the energy cutoff as given by the orbital file.
 
- 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 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.
 
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

void read_abacus_orb (std::ifstream &ifs, std::ofstream *ptr_log=nullptr, const int rank=0)
 Read the orbital file in the ABACUS format.
 

Private Attributes

double orb_ecut_
 energy cutoff as given by the orbital file
 

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.
 

Detailed Description

The radial part of numerical atomic orbitals of a single element.

This class represents the radial part of all numerical atomic orbitals of a single element as read from an orbital file.

See also
RadialSet

Usage:

int element_index = 1;
std::ofstream ofs_log("/path/to/log/file");
std::string orb_file = "/path/to/orbital/file";

AtomicRadials O_radials;
O_radials.build(orb_file, element_index, ofs_log, GlobalV::MY_RANK);

Constructor & Destructor Documentation

◆ AtomicRadials() [1/2]

AtomicRadials::AtomicRadials ( )
inline
Here is the caller graph for this function:

◆ AtomicRadials() [2/2]

AtomicRadials::AtomicRadials ( const AtomicRadials other)
inline

◆ ~AtomicRadials()

AtomicRadials::~AtomicRadials ( )
inline

Member Function Documentation

◆ build() [1/2]

void AtomicRadials::build ( const std::string &  file,
const int  itype = 0,
std::ofstream *  ptr_log = nullptr,
const int  rank = 0 
)
virtual

Build the class from an orbital file.

Parameters
fileorbital file name
itypeelement index in calculation
ptr_logoutput file stream for logging
rankMPI rank

Reimplemented from RadialSet.

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

◆ build() [2/2]

void AtomicRadials::build ( RadialSet *const  other,
const int  itype,
const double  rcut 
)
Here is the call graph for this function:

◆ clone()

AtomicRadials * AtomicRadials::clone ( ) const
inlinevirtual

for polymorphic copy

Implements RadialSet.

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

◆ operator=()

AtomicRadials & AtomicRadials::operator= ( const AtomicRadials rhs)
Here is the call graph for this function:

◆ orb_ecut()

double AtomicRadials::orb_ecut ( ) const
inline

Get the energy cutoff as given by the orbital file.

Here is the caller graph for this function:

◆ read_abacus_orb()

void AtomicRadials::read_abacus_orb ( std::ifstream &  ifs,
std::ofstream *  ptr_log = nullptr,
const int  rank = 0 
)
private

Read the orbital file in the ABACUS format.

Parameters
ifsinput file stream from orbital file
ptr_logoutput file stream for logging
rankMPI rank
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ orb_ecut_

double AtomicRadials::orb_ecut_
private

energy cutoff as given by the orbital file


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