ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
RadialProjection Namespace Reference

Classes

class  RadialProjector
 RadialProjector holds the interpolation table of the Spherical Bessel Transform of a set of radial functions and evaluates the analytical Fourier transform on arbitrary q vectors. More...

Functions

void build_backward_map (const std::vector< std::vector< int > > &it2iproj, const std::vector< int > &iproj2l, std::vector< int > &irow2it, std::vector< int > &irow2iproj, std::vector< int > &irow2m)
void build_forward_map (const std::vector< std::vector< int > > &it2ia, const std::vector< std::vector< int > > &it2iproj, const std::vector< int > &iproj2l, std::map< std::tuple< int, int, int, int >, int > &itiaiprojm2irow)
void build_sbt_tab (const std::vector< int > &nproj, const std::vector< double > &r, const std::vector< std::vector< double > > &radials, const std::vector< int > &l, const int nq, const double dq, const double omega, const int npol, ModuleBase::realArray &tab, ModuleBase::matrix &nhtol)
 make interpolation tables for the Spherical Bessel Transform of type-wise radial projectors, in the (ntype, nprojmax*npol, nq) realArray layout used by the nonlocal-operator kernels, plus the (it, ih) -> l map.
void mask_func (std::vector< double > &mask)
 get the mask function for SBFFT

Function Documentation

◆ build_backward_map()

void RadialProjection::build_backward_map ( const std::vector< std::vector< int > > & it2iproj,
const std::vector< int > & iproj2l,
std::vector< int > & irow2it,
std::vector< int > & irow2iproj,
std::vector< int > & irow2m )

Notation of the following two functions:

Given all the projectors are listed in a series, so the iproj is the index goes across all atomtypes, which means if for the first type, the iproj goes from 0 to 4, then the second atomtypes the iproj will start from 5, and so on... However, there is also another convention, like numerical atomic orbitals, developer always use "l" to index orbitals, here, in all output map, the iproj will start from 0, which

means in output the iproj is local index.

First, the following lists should be prepared as early as possible,

it2iproj: for given it, the index of atom type, return the list of index of projectors.

iproj2l: for given iproj, the index of projectors, return the l of this projector. More simply explaning, it is just the list of angular momentum of projectors.

it2ia: just a list that stolen information from UnitCell, for given it, the index of atom within the range of it. So this list is different from the it2iproj, iproj is the index across type but ia is the index within the type. So for each it2ia[it], the ia, in principle , always/can start from 0.

One may question that does the indexing support one atom type with multiple projectors? The answer is YES. Combining the it2iproj and it2ia, one can even support PART of atoms of one

type has multiple projectors.

Then the returned lists,

irow2it: for given irow, the index of row, return the it: the index of atom type.

irow2iproj: for given irow, the index of row, return the iproj, the index of projectors, note that this iproj is the local index.

irow2m: for given irow, the index of row, return the m, the magnetic quantum number of this projector.

One may complain that cannot get l from the irow, but the truth is, not exactly. One can get the l starting from irow by:

const int iproj = irow2iproj[irow];
const int it = irow2it[irow];
const int iproj_g = it2iproj[it][iproj];
const int l = iproj2l[iproj_g];
Here is the caller graph for this function:

◆ build_forward_map()

void RadialProjection::build_forward_map ( const std::vector< std::vector< int > > & it2ia,
const std::vector< std::vector< int > > & it2iproj,
const std::vector< int > & iproj2l,
std::map< std::tuple< int, int, int, int >, int > & itiaiprojm2irow )
Here is the caller graph for this function:

◆ build_sbt_tab()

void RadialProjection::build_sbt_tab ( const std::vector< int > & nproj,
const std::vector< double > & r,
const std::vector< std::vector< double > > & radials,
const std::vector< int > & l,
const int nq,
const double dq,
const double omega,
const int npol,
ModuleBase::realArray & tab,
ModuleBase::matrix & nhtol )

make interpolation tables for the Spherical Bessel Transform of type-wise radial projectors, in the (ntype, nprojmax*npol, nq) realArray layout used by the nonlocal-operator kernels, plus the (it, ih) -> l map.

Parameters
nprojnumber of projectors for each atom type
rradial grids, shared by all radial functions
radialsradial functions, each element is a radial function
langular momentum quantum number for each radial function
nqnumber of q-points
dqspace between q-points
omegacell volume, used in the prefactor 4*pi/sqrt(omega)
npolnumber of spinor components (for nspin 4)
tab[out] interpolation table, (ntype, nprojmax*npol, nq)
nhtol[out] map from (it, ih) to l, with ih the (l, m)-distinctive index
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mask_func()

void RadialProjection::mask_func ( std::vector< double > & mask)

get the mask function for SBFFT

Parameters
maskmask function
Here is the caller graph for this function: