|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
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 | |
| 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
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
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:
| 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 ) |
| 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.
| nproj | number of projectors for each atom type |
| r | radial grids, shared by all radial functions |
| radials | radial functions, each element is a radial function |
| l | angular momentum quantum number for each radial function |
| nq | number of q-points |
| dq | space between q-points |
| omega | cell volume, used in the prefactor 4*pi/sqrt(omega) |
| npol | number 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 |
| void RadialProjection::mask_func | ( | std::vector< double > & | mask | ) |
get the mask function for SBFFT
| mask | mask function |