33 PROFILE(
"sirius::Atom_type::init");
37 RTE_THROW(
"can't initialize twice");
45 RTE_THROW(
"zero atom charge");
50 for (
auto& e : atomic_conf[
zn_ - 1]) {
54 if (c.n == e.n && c.l == e.l && c.k == e.k) {
77 if (
static_cast<int>(
aw_descriptors_.size()) != (this->lmax_apw() + 1)) {
79 s <<
"wrong size of augmented wave descriptors" << std::endl
81 <<
" lmax_apw = " << this->lmax_apw() << std::endl;
86 for (
int l = 0; l <= this->lmax_apw(); l++) {
91 RTE_THROW(
"maximum aw order > 3");
95 RTE_ASSERT(aw.size() <= 3);
106 if (this->spin_orbit_coupling()) {
119 if (e.am != this->beta_radial_function(e.idxrf).first) {
120 RTE_THROW(
"wrong order of beta radial functions");
135 RTE_THROW(
"wrong size of atomic orbital list");
157 std::vector<std::pair<int, int>> non_zero_elements;
159 for (
int lm = 0;
lm < lmmax_pot;
lm++) {
162 for (
int i2 = 0; i2 <
indexr().size(); i2++) {
163 int l2 =
indexr(i2).am.l();
164 for (
int i1 = 0; i1 <= i2; i1++) {
165 int l1 =
indexr(i1).am.l();
166 if ((l + l1 + l2) % 2 == 0) {
168 non_zero_elements.push_back(std::pair<int, int>(i2,
lm + lmmax_pot * i1));
171 int offs = (j + 1) * lmmax_pot *
indexr().size();
172 non_zero_elements.push_back(std::pair<int, int>(i2,
lm + lmmax_pot * i1 + offs));
179 for (
int j = 0; j < (int)non_zero_elements.size(); j++) {
180 idx_radial_integrals_(0, j) = non_zero_elements[j].first;
181 idx_radial_integrals_(1, j) = non_zero_elements[j].second;
186 idx_radial_integrals_.
allocate(sddk::memory_t::device).copy_to(sddk::memory_t::device);
191 sddk::memory_t::host_pinned,
"Atom_type::vrf_coef_");
192 rf_coef_.
allocate(sddk::memory_t::device);
193 vrf_coef_.
allocate(sddk::memory_t::device);
195 if (
parameters_.processing_unit() == sddk::device_t::GPU) {
199 if (this->spin_orbit_coupling()) {
205 RTE_THROW(
"wrong number of pseudo wave-functions for PAW");
208 RTE_THROW(
"wrong number of all-electron wave-functions for PAW");
232 gaunt_coefs_ = std::make_unique<gc_z>(std::max(this->lmax_apw(), this->lmax_lo()),
252 for (
int i = 0; i <= irmt; i++) {
253 double x = free_atom_radial_grid(i);
279 out__ <<
"label : " << label() << std::endl
280 <<
hbar(80,
'-') << std::endl
281 <<
"symbol : " <<
symbol_ << std::endl
282 <<
"name : " <<
name_ << std::endl
283 <<
"zn : " <<
zn_ << std::endl
284 <<
"mass : " <<
mass_ << std::endl
285 <<
"mt_radius : " <<
mt_radius() << std::endl
295 out__ <<
"atomic levels" << std::endl;
297 out__ <<
"n: " << e.n <<
", l: " << e.l <<
", k: " << e.k <<
", occ: " << e.occupancy
298 <<
", core: " << e.core << std::endl;
301 out__ <<
"local orbitals" << std::endl;
304 for (
int order = 0; order < (int)e.rsd_set.size(); order++) {
308 out__ << e.rsd_set[order];
310 out__ <<
"]" << std::endl;
314 out__ <<
"augmented wave basis" << std::endl;
323 out__ <<
"]" << std::endl;
325 out__ <<
"maximum order of aw : " <<
max_aw_order_ << std::endl;
329 out__ <<
"total number of radial functions : " <<
indexr().size() << std::endl
330 <<
"lmax of radial functions : " <<
indexr().lmax() << std::endl
331 <<
"max. number of radial functions : " <<
indexr().max_order() << std::endl
332 <<
"total number of basis functions : " << indexb().size() << std::endl
333 <<
"number of aw basis functions : " << indexb().size_aw() << std::endl
334 <<
"number of lo basis functions : " << indexb().size_lo() << std::endl
335 <<
"lmax_apw : " << this->lmax_apw() << std::endl;
337 out__ <<
"lmax of beta-projectors : " << this->
lmax_beta() << std::endl
338 <<
"number of ps wavefunctions : " << this->indexr_wfs().size() << std::endl
339 <<
"charge augmentation : " << boolstr(this->
augment()) << std::endl
340 <<
"vloc is set : " << boolstr(!this->
local_potential().empty()) << std::endl
341 <<
"ps_rho_core is set : " << boolstr(!this->ps_core_charge_density().empty()) << std::endl
342 <<
"ps_rho_total is set : " << boolstr(!this->ps_total_charge_density().empty()) << std::endl;
345 if (
parameters_.hubbard_correction() && this->hubbard_correction_) {
350 <<
" number of hubbard radial functions : " <<
indexr_hub_.
size() << std::endl
351 <<
" number of hubbard basis functions : " <<
indexb_hub_.
size() << std::endl
352 <<
" Hubbard wave-functions : ";
360 out__ <<
" orthogonalize : "
361 << boolstr(
parameters_.cfg().hubbard().orthogonalize()) << std::endl
363 << boolstr(
parameters_.cfg().hubbard().normalize()) << std::endl
364 <<
" full_orthogonalization : "
365 << boolstr(
parameters_.cfg().hubbard().full_orthogonalization()) << std::endl
367 << boolstr(
parameters_.cfg().hubbard().simplified()) << std::endl;
369 out__ <<
"spin-orbit coupling : " << boolstr(this->spin_orbit_coupling()) << std::endl;
370 out__ <<
"atomic wave-functions : ";
382Atom_type::read_input_core(nlohmann::json
const& parser)
384 std::string core_str = std::string(parser[
"core"]);
385 if (
int size = (
int)core_str.size()) {
388 s <<
"wrong core configuration string : " << core_str;
393 char c1 = core_str[j++];
394 char c2 = core_str[j++];
399 std::istringstream iss(std::string(1, c1));
402 if (n <= 0 || iss.fail()) {
404 s <<
"wrong principal quantum number : " << std::string(1, c1);
427 s <<
"wrong angular momentum label : " << std::string(1, c2);
432 for (
auto& e : atomic_conf[
zn_ - 1]) {
433 if (e.n == n && e.l == l) {
444Atom_type::read_input_aw(nlohmann::json
const& parser)
446 radial_solution_descriptor rsd;
452 for (
size_t order = 0; order < parser[
"valence"][0][
"basis"].size(); order++) {
453 rsd.enu = parser[
"valence"][0][
"basis"][order][
"enu"].get<
double>();
454 rsd.dme = parser[
"valence"][0][
"basis"][order][
"dme"].get<
int>();
455 rsd.auto_enu = parser[
"valence"][0][
"basis"][order][
"auto"].get<
int>();
459 for (
size_t j = 1; j < parser[
"valence"].size(); j++) {
460 rsd.l = parser[
"valence"][j][
"l"].get<
int>();
461 rsd.n = parser[
"valence"][j][
"n"].get<
int>();
463 for (
size_t order = 0; order < parser[
"valence"][j][
"basis"].size(); order++) {
464 rsd.enu = parser[
"valence"][j][
"basis"][order][
"enu"].get<
double>();
465 rsd.dme = parser[
"valence"][j][
"basis"][order][
"dme"].get<
int>();
466 rsd.auto_enu = parser[
"valence"][j][
"basis"][order][
"auto"].get<
int>();
467 rsd_set.push_back(rsd);
474Atom_type::read_input_lo(nlohmann::json
const& parser)
476 radial_solution_descriptor rsd;
479 if (!parser.count(
"lo")) {
484 for (
size_t j = 0; j < parser[
"lo"].size(); j++) {
485 l = parser[
"lo"][j][
"l"].get<
int>();
487 angular_momentum am(l);
488 local_orbital_descriptor lod(am);
491 for (
size_t order = 0; order < parser[
"lo"][j][
"basis"].size(); order++) {
492 rsd.n = parser[
"lo"][j][
"basis"][order][
"n"].get<
int>();
493 rsd.enu = parser[
"lo"][j][
"basis"][order][
"enu"].get<
double>();
494 rsd.dme = parser[
"lo"][j][
"basis"][order][
"dme"].get<
int>();
495 rsd.auto_enu = parser[
"lo"][j][
"basis"][order][
"auto"].get<
int>();
496 rsd_set.push_back(rsd);
498 lod.rsd_set = rsd_set;
504Atom_type::read_pseudo_uspp(nlohmann::json
const& parser)
506 symbol_ = parser[
"pseudo_potential"][
"header"][
"element"].get<std::string>();
509 zp = parser[
"pseudo_potential"][
"header"][
"z_valence"].get<
double>();
510 zn_ = int(zp + 1e-10);
512 int nmtp = parser[
"pseudo_potential"][
"header"][
"mesh_size"].get<
int>();
514 auto rgrid = parser[
"pseudo_potential"][
"radial_grid"].get<std::vector<double>>();
515 if (
static_cast<int>(rgrid.size()) != nmtp) {
516 RTE_THROW(
"wrong mesh size");
521 local_potential(parser[
"pseudo_potential"][
"local_potential"].get<std::vector<double>>());
523 ps_core_charge_density(
524 parser[
"pseudo_potential"].
value(
"core_charge_density", std::vector<double>(rgrid.size(), 0)));
526 ps_total_charge_density(parser[
"pseudo_potential"][
"total_charge_density"].get<std::vector<double>>());
528 if (
local_potential().size() != rgrid.size() || ps_core_charge_density().size() != rgrid.size() ||
529 ps_total_charge_density().size() != rgrid.size()) {
530 std::cout <<
local_potential().size() <<
" " << ps_core_charge_density().size() <<
" "
531 << ps_total_charge_density().size() << std::endl;
532 RTE_THROW(
"wrong array size");
535 if (parser[
"pseudo_potential"][
"header"].count(
"spin_orbit")) {
539 int nbf = parser[
"pseudo_potential"][
"header"][
"number_of_proj"].get<
int>();
541 for (
int i = 0; i < nbf; i++) {
542 auto beta = parser[
"pseudo_potential"][
"beta_projectors"][i][
"radial_function"].get<std::vector<double>>();
545 s <<
"wrong size of beta functions for atom type " <<
symbol_ <<
" (label: " <<
label_ <<
")" << std::endl
546 <<
"size of beta radial functions in the file: " << beta.size() << std::endl
550 int l = parser[
"pseudo_potential"][
"beta_projectors"][i][
"angular_momentum"].get<
int>();
555 double j = parser[
"pseudo_potential"][
"beta_projectors"][i][
"total_angular_momentum"].get<
double>();
572 sddk::mdarray<double, 2> d_mtrx(nbf, nbf);
574 auto v = parser[
"pseudo_potential"][
"D_ion"].get<std::vector<double>>();
576 for (
int i = 0; i < nbf; i++) {
577 for (
int j = 0; j < nbf; j++) {
578 d_mtrx(i, j) = v[j * nbf + i];
583 if (parser[
"pseudo_potential"].count(
"augmentation")) {
584 for (
size_t k = 0; k < parser[
"pseudo_potential"][
"augmentation"].size(); k++) {
585 int i = parser[
"pseudo_potential"][
"augmentation"][k][
"i"].get<
int>();
586 int j = parser[
"pseudo_potential"][
"augmentation"][k][
"j"].get<
int>();
587 int l = parser[
"pseudo_potential"][
"augmentation"][k][
"angular_momentum"].get<
int>();
588 auto qij = parser[
"pseudo_potential"][
"augmentation"][k][
"radial_function"].get<std::vector<double>>();
590 RTE_THROW(
"wrong size of qij");
597 if (parser[
"pseudo_potential"].count(
"atomic_wave_functions")) {
598 auto& dict = parser[
"pseudo_potential"][
"atomic_wave_functions"];
600 size_t nwf = dict.size();
602 for (
size_t k = 0; k < nwf; k++) {
603 auto v = dict[k][
"radial_function"].get<std::vector<double>>();
607 s <<
"wrong size of atomic functions for atom type " <<
symbol_ <<
" (label: " <<
label_ <<
")"
609 <<
"size of atomic radial functions in the file: " << v.size() << std::endl
614 int l = dict[k][
"angular_momentum"].get<
int>();
617 if (dict[k].count(
"occupation")) {
618 occ = dict[k][
"occupation"].get<
double>();
621 if (dict[k].count(
"label")) {
622 auto c1 = dict[k][
"label"].get<std::string>();
623 std::istringstream iss(std::string(1, c1[0]));
627 if (spin_orbit_coupling() && dict[k].count(
"total_angular_momentum") && l != 0) {
629 auto v1 = dict[k + 1][
"radial_function"].get<std::vector<double>>();
631 if (dict[k + 1].count(
"occupation")) {
632 occ1 = dict[k + 1][
"occupation"].get<
double>();
636 v[ir] = 0.5 * v[ir] + 0.5 * v1[ir];
646Atom_type::read_pseudo_paw(nlohmann::json
const& parser)
650 auto& header = parser[
"pseudo_potential"][
"header"];
652 if (header.count(
"paw_core_energy")) {
653 paw_core_energy(header[
"paw_core_energy"].get<double>());
659 int cutoff_radius_index = parser[
"pseudo_potential"][
"header"][
"cutoff_radius_index"].get<
int>();
662 paw_ae_core_charge_density(
663 parser[
"pseudo_potential"][
"paw_data"][
"ae_core_charge_density"].get<std::vector<double>>());
666 paw_wf_occ(parser[
"pseudo_potential"][
"paw_data"][
"occupations"].get<std::vector<double>>());
672 for (
int i = 0; i < num_wfc; i++) {
674 auto wfc = parser[
"pseudo_potential"][
"paw_data"][
"ae_wfc"][i][
"radial_function"].get<std::vector<double>>();
678 s <<
"wrong size of ae_wfc functions for atom type " <<
symbol_ <<
" (label: " <<
label_ <<
")" << std::endl
679 <<
"size of ae_wfc radial functions in the file: " << wfc.size() << std::endl
684 add_ae_paw_wf(std::vector<double>(wfc.begin(), wfc.begin() + cutoff_radius_index));
686 wfc = parser[
"pseudo_potential"][
"paw_data"][
"ps_wfc"][i][
"radial_function"].get<std::vector<double>>();
690 s <<
"wrong size of ps_wfc functions for atom type " <<
symbol_ <<
" (label: " <<
label_ <<
")" << std::endl
691 <<
"size of ps_wfc radial functions in the file: " << wfc.size() << std::endl
696 add_ps_paw_wf(std::vector<double>(wfc.begin(), wfc.begin() + cutoff_radius_index));
703 auto parser = read_json_from_file_or_string(str__);
705 if (parser.empty()) {
710 read_pseudo_uspp(parser);
712 if (parser[
"pseudo_potential"].count(
"paw_data")) {
713 read_pseudo_paw(parser);
718 name_ = parser[
"name"].get<std::string>();
719 symbol_ = parser[
"symbol"].get<std::string>();
720 mass_ = parser[
"mass"].get<
double>();
721 zn_ = parser[
"number"].get<
int>();
722 double r0 = parser[
"rmin"].get<
double>();
723 double R = parser[
"rmt"].get<
double>();
724 int nmtp = parser[
"nrmt"].get<
int>();
725 this->
lmax_apw_ = parser.value(
"lmax_apw", this->lmax_apw_);
727 auto rg = get_radial_grid_t(
parameters_.cfg().settings().radial_grid());
731 read_input_core(parser);
733 read_input_aw(parser);
735 read_input_lo(parser);
738 auto fa_r = parser[
"free_atom"][
"radial_grid"].get<std::vector<double>>();
758 if (!this->spin_orbit_coupling()) {
767 for (
int xi2 = 0; xi2 < nbf; xi2++) {
768 const int l2 = this->indexb(xi2).am.l();
769 const double j2 = this->indexb(xi2).am.j();
770 const int m2 = this->indexb(xi2).m;
771 for (
int xi1 = 0; xi1 < nbf; xi1++) {
772 const int l1 = this->indexb(xi1).am.l();
773 const double j1 = this->indexb(xi1).am.j();
774 const int m1 = this->indexb(xi1).m;
776 if ((l2 == l1) && (std::abs(j1 - j2) < 1e-8)) {
778 for (
auto sigma2 = 0; sigma2 < 2; sigma2++) {
779 for (
auto sigma1 = 0; sigma1 < 2; sigma1++) {
780 std::complex<double> coef = {0.0, 0.0};
787 int jj1 =
static_cast<int>(2.0 * j1 + 1e-8);
788 for (
int mj = -jj1; mj <= jj1; mj += 2) {
789 coef += sht::calculate_U_sigma_m(l1, j1, mj, m1, sigma1) *
790 sht::ClebschGordan(l1, j1, mj / 2.0, sigma1) *
791 std::conj(sht::calculate_U_sigma_m(l2, j2, mj, m2, sigma2)) *
792 sht::ClebschGordan(l2, j2, mj / 2.0, sigma2);
805 if (!
parameters_.cfg().parameters().hubbard_correction()) {
813 if (ho.atom_type() == this->label()) {
814 std::array<double, 6> coeff{0, 0, 0, 0, 0, 0};
815 if (ho.contains(
"U")) {
818 if (ho.contains(
"J")) {
821 if (ho.contains(
"BE2")) {
824 if (ho.contains(
"E3")) {
827 if (ho.contains(
"alpha")) {
828 coeff[4] = ho.alpha();
830 if (ho.contains(
"beta")) {
831 coeff[5] = ho.beta();
834 for (
int s = 0; s < 6; s++) {
837 std::vector<double> initial_occupancy;
838 if (ho.contains(
"initial_occupancy")) {
839 initial_occupancy = ho.initial_occupancy();
841 int sz =
static_cast<int>(initial_occupancy.size());
842 int lmmax = 2 * ho.l() + 1;
843 if (!(sz == 0 || sz ==
lmmax || sz == 2 *
lmmax)) {
845 s <<
"wrong size of initial occupacies vector (" << sz <<
") for l = " << ho.l();
850 add_hubbard_orbital(ho.n(), ho.l(), ho.total_initial_occupancy(), coeff[0], coeff[1], &coeff[0], coeff[4],
851 coeff[5], 0.0, initial_occupancy,
true);
857 if (
parameters_.cfg().hubbard().full_orthogonalization()) {
864 add_hubbard_orbital(n, aqn.l(), 0, 0, 0,
nullptr, 0, 0, 0.0, std::vector<double>(2 * aqn.l() + 1, 0),
874 for (
int i = 0; i <
parameters_.cfg().hubbard().local().size(); i++) {
876 if ((ho.atom_type() == this->label()) && ((ho.n() != n) || (ho.l() != aqn.l()))) {
879 std::vector<double>(2 * aqn.l() + 1, 0),
false);
890 double alpha__,
double beta__,
double J0__, std::vector<double> initial_occupancy__,
891 const bool use_for_calculations__)
894 RTE_THROW(
"negative principal quantum number");
899 for (
int s = 0; s < static_cast<int>(
ps_atomic_wfs_.size()); s++) {
904 if ((n == n__) && (aqn.l() == l__)) {
911 s <<
"atomic radial function is not found for atom type " <<
label_ << std::endl
912 <<
" the following atomic wave-functions are set: " << std::endl;
917 s <<
" n=" << n <<
" l=" << aqn.l() <<
" j=" << aqn.j() << std::endl;
919 s <<
" the following atomic orbital is requested for U-correction: n=" << n__ <<
" l=" << l__;
932 lo_descriptors_hub_.emplace_back(n__, l__, -1, occ__, J, U, hub_coef__, alpha__, beta__, J0__, initial_occupancy__,
933 std::move(s.
interpolate()), use_for_calculations__, idx_rf);
Contains declaration and implementation of sirius::Atom_type class.
void add_q_radial_function(int idxrf1__, int idxrf2__, int l__, std::vector< double > qrf__)
Add radial function of the augmentation charge.
Radial_grid< double > radial_grid_
Radial grid of the muffin-tin sphere.
int mt_basis_size() const
Total number of muffin-tin basis functions (APW + LO).
std::vector< atomic_level_descriptor > atomic_levels_
List of atomic levels.
int num_beta_radial_functions() const
Number of beta-radial functions.
radial_functions_index indexr_wfs_
Index for the radial atomic functions.
std::unique_ptr< Gaunt_coefficients< std::complex< double > > > gaunt_coefs_
Non-zero Gaunt coefficients.
std::vector< double > free_atom_density_
Density of a free atom as read from the input file.
std::vector< local_orbital_descriptor > lo_descriptors_
List of radial descriptor sets used to construct local orbitals.
bool hubbard_correction() const
Get the Hubbard correction switch.
Simulation_parameters const & parameters_
Basic parameters.
int lmax_beta() const
Maximum orbital quantum number between all beta-projector radial functions.
Radial_grid< double > free_atom_radial_grid_
Radial grid of a free atom.
auto const & beta_radial_function(rf_index idxrf__) const
Return a radial beta function.
int num_mt_points() const
Return number of muffin-tin radial grid points.
std::vector< ps_atomic_wf_descriptor > ps_atomic_wfs_
Atomic wave-functions used to setup the initial subspace and to apply U-correction.
void read_hubbard_input()
Pass information from the hubbard input section (parsed in input.hpp) to the atom type.
auto const & indexr() const
Return const reference to the index of radial functions.
basis_functions_index indexb_hub_
Index of basis functions for hubbard orbitals.
std::vector< double > const & local_potential() const
Get the radial function of the local potential.
double mt_radius() const
Return muffin-tin radius.
void print_info(std::ostream &out__) const
Print basic info to standard output.
void init_free_atom_density(bool smooth)
Initialize the free atom density (smooth or true).
bool spin_orbit_coupling_
True if the pseudo potential includes spin orbit coupling.
Spline< double > free_atom_density_spline_
Density of a free atom.
int lmax_apw_
Maximul orbital quantum number of LAPW basis functions.
void init()
Initialize the atom type.
std::vector< double > const & ae_paw_wf(int i__) const
Get all-electron PAW wave-function.
int mt_radial_basis_size() const
Total number of radial basis functions.
double num_core_electrons_
Number of core electrons.
bool hubbard_correction_
Hubbard correction.
std::vector< radial_solution_descriptor_set > aw_descriptors_
List of radial descriptor sets used to construct augmented waves.
basis_functions_index indexb_wfs_
Index of atomic wavefunctions (radial function * spherical harmonic).
int zn_
Nucleus charge or pseudocharge, treated as positive(!) integer.
basis_functions_index indexb_
Index of atomic basis functions (radial function * spherical harmonic).
radial_functions_index indexr_hub_
Index of radial functions for hubbard orbitals.
sddk::mdarray< double, 2 > ps_paw_wfs_array_
Pseudo wave functions of the PAW method packed in a single array.
std::string symbol_
Chemical element symbol.
void generate_f_coefficients()
Generate coefficients used in spin-orbit case.
std::string name_
Chemical element name.
bool initialized_
True if the atom type was initialized.
std::vector< radial_solution_descriptor_set > aw_specific_l_
Augmented wave configuration for specific l.
std::vector< hubbard_orbital_descriptor > lo_descriptors_hub_
List of Hubbard orbital descriptors.
std::string file_name_
Name of the input file for this atom type.
void add_hubbard_orbital(int n__, int l__, double occ__, double U, double J, const double *hub_coef__, double alpha__, double beta__, double J0__, std::vector< double > initial_occupancy__, const bool use_for_calculations__)
Add a hubbard orbital to a list.
radial_functions_index indexr_
Index of radial basis functions.
radial_solution_descriptor_set aw_default_l_
Default augmented wave configuration.
int num_ae_paw_wf() const
Get the number of all-electron PAW wave-functions.
void init_aw_descriptors()
Initialize descriptors of the augmented-wave radial functions.
std::string label_
Unique string label for the atom type.
void set_radial_grid(radial_grid_t grid_type__, int num_points__, double rmin__, double rmax__, double p__)
Set the radial grid of the given type.
int max_aw_order_
Maximum number of AW radial functions across angular momentums.
bool augment() const
Return true if this atom type has an augementation charge.
sddk::mdarray< std::complex< double >, 4 > f_coefficients_
void add_ps_atomic_wf(int n__, angular_momentum am__, std::vector< double > f__, double occ__=0.0)
Add atomic radial function to the list.
void read_input(std::string const &str__)
Read atomic parameters from json file or string.
sddk::mdarray< double, 2 > ae_paw_wfs_array_
All-electron wave functions of the PAW method packed in a single array.
void add_ae_paw_wf(std::vector< double > f__)
Add all-electron PAW wave-function.
bool is_paw_
True if the pseudopotential is used for PAW.
double num_valence_electrons_
Number of valence electrons.
void add_beta_radial_function(angular_momentum am__, std::vector< double > beta__)
Add a radial function of beta-projector to a list of functions.
Compact storage of non-zero Gaunt coefficients .
External radial grid provided as a list of points.
T first() const
First point of the grid.
T x(const int i) const
Return .
int num_points() const
Number of grid points.
static std::complex< double > gaunt_hybrid(int l1, int l2, int l3, int m1, int m2, int m3)
Gaunt coefficent of two complex and one real spherical harmonics.
int num_mag_dims() const
Number of dimensions in the magnetization vector.
Spline< T, U > & interpolate()
Angular momentum quantum number.
A helper class to establish various index mappings for the atomic basis functions.
int size() const
Return total number of MT basis functions.
void add_lo(angular_momentum am__)
Add local-orbital type of radial function.
int size() const
Return total number of radial functions.
void add(angular_momentum am__)
Add a single radial function with a given angular momentum.
void zero(memory_t mem__, size_t idx0__, size_t n__)
Zero n elements starting from idx0.
mdarray< T, N > & allocate(memory_t memory__)
Allocate memory for array.
@ value
the parser finished reading a JSON value
void copy(T *target__, T const *source__, size_t n__)
Copy memory inside a device.
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.
std::vector< int > l_by_lm(int lmax__)
Get array of orbital quantum numbers for each lm component.
Namespace of the SIRIUS library.
std::vector< radial_solution_descriptor > radial_solution_descriptor_set
Set of radial solution descriptors, used to construct augmented waves or local orbitals.
strong_type< int, struct __rf_index_tag > rf_index
Radial function index.
const double ha2ev
Hartree in electron-volt units.
auto conj(double x__)
Return complex conjugate of a number. For a real value this is the number itself.