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

A class that holds all numerical radial functions of the same kind. More...

#include <radial_collection.h>

Collaboration diagram for RadialCollection:

Public Member Functions

 RadialCollection ()=default
 
 RadialCollection (const RadialCollection &other)
 deep copy
 
RadialCollectionoperator= (const RadialCollection &rhs)
 deep copy
 
 ~RadialCollection ()
 
void build (const int nfile, const std::string *const file, const char ftype='\0')
 Builds the collection from (orbital) files.
 
void build (const int ntype, Numerical_Nonlocal *const nls)
 Builds the collection from Numerical_Nonlocal objects.
 
void build (const RadialCollection *nls, double radius=0.0)
 Builds the collection from RadialCollection objects and another radius cutoff.
 
void build (const int ntype, const double *const charges, const bool with_slater_screening, const int *const nmax, const std::string *symbols=nullptr, const double conv_thr=1e-10, const std::string *strategies=nullptr, const int &rank=0)
 builds the collection from quasi hydrogen radial functions
 
void build (const int ntype, const std::string *const file, const double *const screening_coeff, const double conv_thr=1e-10, const int &rank=0)
 builds the collection from pseudopotential pswfc
 
void build (const int lmax, const int nbes, const double rcut, const double sigma, const double dr)
 builds a collection of truncated spherical Bessel functions
 
void to_file (const std::string &appendix, const std::string &format="abacus_orb") const
 export all RadialSet objects to a file in a given format.
 
Getters
const std::string & symbol (const int itype) const
 
int ntype () const
 
int lmax (const int itype) const
 
int lmax () const
 
double rcut_max (const int itype) const
 
double rcut_max () const
 
int nzeta (const int itype, const int l) const
 
int nzeta_max (const int itype) const
 
int nzeta_max () const
 
int nchi () const
 
int nchi (const int itype) const
 
const NumericalRadialoperator() (const int itype, const int l, const int izeta) const
 
const RadialSetoperator() (const int itype) const
 
Iterators.

Enable iteration through all NumericalRadial objects in the collection. Objects are sorted by l first, by itype next, by izeta last.

const NumericalRadial ** cbegin () const
 *(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l
 
const NumericalRadial ** cend () const
 *(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l
 
const NumericalRadial ** cbegin (const int l) const
 *(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l
 
const NumericalRadial ** cend (const int l) const
 *(this->cend(l)) returns the address of one-past-last NumericalRadial object with angular momentum l
 
Property setters for all RadialSet 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 RadialSet 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 RadialSet objects.
 

Private Member Functions

void cleanup ()
 Deallocates all RadialSet objects and resets all members to default.
 
void iter_build ()
 Builds iter_ from radset_.
 
void set_rcut_max ()
 Finds the maximum cutoff radius among all RadialSet objects and sets rcut_max_ accordingly.
 
char check_file_type (const std::string &file) const
 Returns the file type of a given file.
 

Private Attributes

int ntype_ = 0
 number of RadialSet in the collection
 
int lmax_ = -1
 maximum angular momentum of all NumericalRadial objects in the collection
 
int nchi_ = 0
 total number of NumericalRadial objects in the collection
 
int nzeta_max_ = 0
 maximum number of distinct radial functions given a type & angular momentum
 
double rcut_max_ = 0.0
 maximum cutoff radius among all NumericalRadial objects
 
RadialSet ** radset_ = nullptr
 
const NumericalRadial ** iter_ = nullptr
 "Iterator" for NumericalRadial objects.
 
int * nl_ = nullptr
 Number of NumericalRadial objects for each angular momentum.
 

Detailed Description

A class that holds all numerical radial functions of the same kind.

An instance of this class could be the collection of all radial functions of numerical atomic orbitals, or all Kleinman-Bylander beta functions from all elements involved in calculation.

Constructor & Destructor Documentation

◆ RadialCollection() [1/2]

RadialCollection::RadialCollection ( )
default

◆ RadialCollection() [2/2]

RadialCollection::RadialCollection ( const RadialCollection other)

deep copy

Here is the call graph for this function:

◆ ~RadialCollection()

RadialCollection::~RadialCollection ( )

Member Function Documentation

◆ build() [1/6]

void RadialCollection::build ( const int  lmax,
const int  nbes,
const double  rcut,
const double  sigma,
const double  dr 
)

builds a collection of truncated spherical Bessel functions

Here is the call graph for this function:

◆ build() [2/6]

void RadialCollection::build ( const int  nfile,
const std::string *const  file,
const char  ftype = '\0' 
)

Builds the collection from (orbital) files.

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

◆ build() [3/6]

void RadialCollection::build ( const int  ntype,
const double *const  charges,
const bool  with_slater_screening,
const int *const  nmax,
const std::string *  symbols = nullptr,
const double  conv_thr = 1e-10,
const std::string *  strategies = nullptr,
const int &  rank = 0 
)

builds the collection from quasi hydrogen radial functions

Here is the call graph for this function:

◆ build() [4/6]

void RadialCollection::build ( const int  ntype,
const std::string *const  file,
const double *const  screening_coeff,
const double  conv_thr = 1e-10,
const int &  rank = 0 
)

builds the collection from pseudopotential pswfc

Here is the call graph for this function:

◆ build() [5/6]

void RadialCollection::build ( const int  ntype,
Numerical_Nonlocal *const  nls 
)

Builds the collection from Numerical_Nonlocal objects.

Here is the call graph for this function:

◆ build() [6/6]

void RadialCollection::build ( const RadialCollection nls,
double  radius = 0.0 
)

Builds the collection from RadialCollection objects and another radius cutoff.

Here is the call graph for this function:

◆ cbegin() [1/2]

const NumericalRadial ** RadialCollection::cbegin ( ) const
inline

*(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l

Here is the caller graph for this function:

◆ cbegin() [2/2]

const NumericalRadial ** RadialCollection::cbegin ( const int  l) const
inline

*(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l

◆ cend() [1/2]

const NumericalRadial ** RadialCollection::cend ( ) const
inline

*(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l

Here is the caller graph for this function:

◆ cend() [2/2]

const NumericalRadial ** RadialCollection::cend ( const int  l) const
inline

*(this->cend(l)) returns the address of one-past-last NumericalRadial object with angular momentum l

◆ check_file_type()

char RadialCollection::check_file_type ( const std::string &  file) const
private

Returns the file type of a given file.

RadialCollection might be built from either numerical atomic orbital file ('o') or orbital parameter (coefficient) ('c') file. This function briefly scans the file to find its type.

Only rank-0 performs the check; the result is broadcasted to all ranks.

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

◆ cleanup()

void RadialCollection::cleanup ( )
private

Deallocates all RadialSet objects and resets all members to default.

Here is the caller graph for this function:

◆ iter_build()

void RadialCollection::iter_build ( )
private

Builds iter_ from radset_.

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

◆ lmax() [1/2]

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

◆ lmax() [2/2]

int RadialCollection::lmax ( const int  itype) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nchi() [1/2]

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

◆ nchi() [2/2]

int RadialCollection::nchi ( const int  itype) const
inline
Here is the call graph for this function:

◆ ntype()

int RadialCollection::ntype ( ) const
inline
Here is the caller graph for this function:

◆ nzeta()

int RadialCollection::nzeta ( const int  itype,
const int  l 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nzeta_max() [1/2]

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

◆ nzeta_max() [2/2]

int RadialCollection::nzeta_max ( const int  itype) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()() [1/2]

const RadialSet & RadialCollection::operator() ( const int  itype) const
inline

◆ operator()() [2/2]

const NumericalRadial & RadialCollection::operator() ( const int  itype,
const int  l,
const int  izeta 
) const
inline
Here is the call graph for this function:

◆ operator=()

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

deep copy

Here is the call graph for this function:

◆ rcut_max() [1/2]

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

◆ rcut_max() [2/2]

double RadialCollection::rcut_max ( const int  itype) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_grid()

void RadialCollection::set_grid ( const bool  for_r_space,
const int  ngrid,
const double *  grid,
const char  mode = 'i' 
)

Sets a common grid for all RadialSet objects.

Here is the call graph for this function:

◆ set_rcut_max()

void RadialCollection::set_rcut_max ( )
private

Finds the maximum cutoff radius among all RadialSet objects and sets rcut_max_ accordingly.

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

◆ set_transformer()

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

Sets a spherical Bessel transformers for all RadialSet objects.

Here is the call graph for this function:

◆ set_uniform_grid()

void RadialCollection::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 RadialSet objects.

Here is the call graph for this function:

◆ symbol()

const std::string & RadialCollection::symbol ( const int  itype) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_file()

void RadialCollection::to_file ( const std::string &  appendix,
const std::string &  format = "abacus_orb" 
) const

export all RadialSet objects to a file in a given format.

Supported formats:

  • "abacus_orb" (default): ABACUS Numerical atomic orbital format
Parameters
appendixfile name
formatfile format
Here is the call graph for this function:

Member Data Documentation

◆ iter_

const NumericalRadial** RadialCollection::iter_ = nullptr
private

"Iterator" for NumericalRadial objects.

"iter_" iterates through all NumericalRadial objects from all RadialSet objects in the collection.

◆ lmax_

int RadialCollection::lmax_ = -1
private

maximum angular momentum of all NumericalRadial objects in the collection

◆ nchi_

int RadialCollection::nchi_ = 0
private

total number of NumericalRadial objects in the collection

◆ nl_

int* RadialCollection::nl_ = nullptr
private

Number of NumericalRadial objects for each angular momentum.

◆ ntype_

int RadialCollection::ntype_ = 0
private

number of RadialSet in the collection

◆ nzeta_max_

int RadialCollection::nzeta_max_ = 0
private

maximum number of distinct radial functions given a type & angular momentum

◆ radset_

RadialSet** RadialCollection::radset_ = nullptr
private

◆ rcut_max_

double RadialCollection::rcut_max_ = 0.0
private

maximum cutoff radius among all NumericalRadial objects


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