ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
A class that holds all numerical radial functions of the same kind. More...
#include <radial_collection.h>
Public Member Functions | |
RadialCollection ()=default | |
RadialCollection (const RadialCollection &other) | |
deep copy | |
RadialCollection & | operator= (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 NumericalRadial & | operator() (const int itype, const int l, const int izeta) const |
const RadialSet & | operator() (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. | |
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.
|
default |
RadialCollection::RadialCollection | ( | const RadialCollection & | other | ) |
deep copy
RadialCollection::~RadialCollection | ( | ) |
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
void RadialCollection::build | ( | const int | nfile, |
const std::string *const | file, | ||
const char | ftype = '\0' |
||
) |
Builds the collection from (orbital) files.
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
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
void RadialCollection::build | ( | const int | ntype, |
Numerical_Nonlocal *const | nls | ||
) |
void RadialCollection::build | ( | const RadialCollection * | nls, |
double | radius = 0.0 |
||
) |
Builds the collection from RadialCollection objects and another radius cutoff.
|
inline |
*(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l
|
inline |
*(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l
|
inline |
*(this->cbegin(l)) returns the address of the first NumericalRadial object with angular momentum l
|
inline |
*(this->cend(l)) returns the address of one-past-last NumericalRadial object with angular momentum l
|
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.
|
private |
Deallocates all RadialSet objects and resets all members to default.
|
private |
Builds iter_ from radset_.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
RadialCollection & RadialCollection::operator= | ( | const RadialCollection & | rhs | ) |
deep copy
|
inline |
|
inline |
void RadialCollection::set_grid | ( | const bool | for_r_space, |
const int | ngrid, | ||
const double * | grid, | ||
const char | mode = 'i' |
||
) |
|
private |
Finds the maximum cutoff radius among all RadialSet objects and sets rcut_max_ accordingly.
void RadialCollection::set_transformer | ( | ModuleBase::SphericalBesselTransformer | sbt, |
const int | update = 0 |
||
) |
Sets a spherical Bessel transformers for all RadialSet objects.
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 |
||
) |
|
inline |
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:
appendix | file name |
format | file format |
|
private |
"Iterator" for NumericalRadial objects.
"iter_" iterates through all NumericalRadial objects from all RadialSet objects in the collection.
|
private |
maximum angular momentum of all NumericalRadial objects in the collection
|
private |
total number of NumericalRadial objects in the collection
|
private |
Number of NumericalRadial objects for each angular momentum.
|
private |
number of RadialSet in the collection
|
private |
maximum number of distinct radial functions given a type & angular momentum
|
private |
|
private |
maximum cutoff radius among all NumericalRadial objects