25#ifndef __BASIS_FUNCTIONS_INDEX_HPP__
26#define __BASIS_FUNCTIONS_INDEX_HPP__
54 RTE_ASSERT(
m >= -
am.
l() &&
m <=
am.
l());
55 RTE_ASSERT(
order >= 0);
56 RTE_ASSERT(
idxrf >= 0);
71 std::vector<basis_function_index_descriptor> vbd_;
77 std::vector<int> offset_;
89 if (expand_full_j__) {
90 RTE_THROW(
"j,mj expansion of the full angular momentum index is not implemented");
93 if (!expand_full_j__) {
95 std::fill(index_by_lm_order_.begin(), index_by_lm_order_.end(), -1);
97 for (
auto e : indexr_) {
111 offset_.push_back(
size);
113 for (
int m = -am.l(); m <= am.l(); m++) {
117 index_by_lm_order_(
sf::lm(am.l(), m), e.order) =
size;
128 RTE_THROW(
"full j is not yet implemented");
134 return static_cast<int>(vbd_.size());
140 if (offset_lo_ == -1) {
150 if (offset_lo_ == -1) {
153 return this->
size() - offset_lo_;
157 inline int index_by_l_m_order(
int l,
int m,
int order)
const
159 return index_by_lm_order_(
sf::lm(l, m), order);
162 inline int index_by_lm_order(
int lm,
int order)
const
164 return index_by_lm_order_(
lm, order);
167 inline int index_of(
rf_index idxrf__)
const
169 return offset_[idxrf__];
175 RTE_ASSERT(i >= 0 && i < this->
size());
179 inline auto begin()
const
184 inline auto end()
const
189 auto const& indexr()
const
195inline auto begin(basis_functions_index
const& idx__)
197 return idx__.begin();
200inline auto end(basis_functions_index
const& idx__)
Angular momentum quantum number.
auto l() const
Get orbital quantum number l.
A helper class to establish various index mappings for the atomic basis functions.
int size() const
Return total number of MT basis functions.
auto const & operator[](int i) const
Return descriptor of the given basis function.
auto size_aw() const
Return size of AW part of basis functions in case of LAPW.
auto size_lo() const
Return size of local-orbital part of basis functions in case of LAPW.
Radial basis function index.
auto lmax() const
Return maximum angular momentum quantum number.
auto max_order(int l__) const
Return maximum order of the radial functions for a given angular momentum.
int lmmax(int lmax)
Maximum number of combinations for a given .
int lm(int l, int m)
Get composite lm index by angular index l and azimuthal index m.
Namespace of the SIRIUS library.
strong_type< int, struct __rf_index_tag > rf_index
Radial function index.
strong_type< int, struct __bf_index_tag > bf_index
Basis function index.
angular_momentum am
Total angular momemtum.
int m
Projection of the angular momentum.
rf_index idxrf
Index of the radial function or beta projector in the case of pseudo potential.
rf_lo_index idxlo
Index of local orbital.
int order
Order of the radial function for a given l (j).