5std::string
const locked_msg(
"parameters are locked");
10 nlohmann::json
const& dict()
const
25 return dict_.at(
"/mixer/type"_json_pointer).get<std::string>();
27 inline void type(std::string type__)
29 if (dict_.contains(
"locked")) {
30 throw std::runtime_error(locked_msg);
32 dict_[
"/mixer/type"_json_pointer] = type__;
37 return dict_.at(
"/mixer/beta"_json_pointer).get<
double>();
39 inline void beta(
double beta__)
41 if (dict_.contains(
"locked")) {
42 throw std::runtime_error(locked_msg);
44 dict_[
"/mixer/beta"_json_pointer] = beta__;
49 return dict_.at(
"/mixer/beta0"_json_pointer).get<
double>();
51 inline void beta0(
double beta0__)
53 if (dict_.contains(
"locked")) {
54 throw std::runtime_error(locked_msg);
56 dict_[
"/mixer/beta0"_json_pointer] = beta0__;
61 return dict_.at(
"/mixer/linear_mix_rms_tol"_json_pointer).get<
double>();
65 if (dict_.contains(
"locked")) {
66 throw std::runtime_error(locked_msg);
68 dict_[
"/mixer/linear_mix_rms_tol"_json_pointer] = linear_mix_rms_tol__;
73 return dict_.at(
"/mixer/max_history"_json_pointer).get<
int>();
77 if (dict_.contains(
"locked")) {
78 throw std::runtime_error(locked_msg);
80 dict_[
"/mixer/max_history"_json_pointer] = max_history__;
85 return dict_.at(
"/mixer/beta_scaling_factor"_json_pointer).get<
double>();
89 if (dict_.contains(
"locked")) {
90 throw std::runtime_error(locked_msg);
92 dict_[
"/mixer/beta_scaling_factor"_json_pointer] = beta_scaling_factor__;
97 return dict_.at(
"/mixer/use_hartree"_json_pointer).get<
bool>();
101 if (dict_.contains(
"locked")) {
102 throw std::runtime_error(locked_msg);
104 dict_[
"/mixer/use_hartree"_json_pointer] = use_hartree__;
107 nlohmann::json& dict_;
109 inline auto const& mixer()
const {
return mixer_;}
110 inline auto& mixer() {
return mixer_;}
125 return dict_.at(
"/settings/nprii_vloc"_json_pointer).get<
int>();
129 if (dict_.contains(
"locked")) {
130 throw std::runtime_error(locked_msg);
132 dict_[
"/settings/nprii_vloc"_json_pointer] = nprii_vloc__;
137 return dict_.at(
"/settings/nprii_beta"_json_pointer).get<
int>();
141 if (dict_.contains(
"locked")) {
142 throw std::runtime_error(locked_msg);
144 dict_[
"/settings/nprii_beta"_json_pointer] = nprii_beta__;
149 return dict_.at(
"/settings/nprii_aug"_json_pointer).get<
int>();
153 if (dict_.contains(
"locked")) {
154 throw std::runtime_error(locked_msg);
156 dict_[
"/settings/nprii_aug"_json_pointer] = nprii_aug__;
161 return dict_.at(
"/settings/nprii_rho_core"_json_pointer).get<
int>();
165 if (dict_.contains(
"locked")) {
166 throw std::runtime_error(locked_msg);
168 dict_[
"/settings/nprii_rho_core"_json_pointer] = nprii_rho_core__;
173 return dict_.at(
"/settings/always_update_wf"_json_pointer).get<
bool>();
177 if (dict_.contains(
"locked")) {
178 throw std::runtime_error(locked_msg);
180 dict_[
"/settings/always_update_wf"_json_pointer] = always_update_wf__;
188 return dict_.at(
"/settings/mixer_rms_min"_json_pointer).get<
double>();
192 if (dict_.contains(
"locked")) {
193 throw std::runtime_error(locked_msg);
195 dict_[
"/settings/mixer_rms_min"_json_pointer] = mixer_rms_min__;
200 return dict_.at(
"/settings/itsol_tol_min"_json_pointer).get<
double>();
204 if (dict_.contains(
"locked")) {
205 throw std::runtime_error(locked_msg);
207 dict_[
"/settings/itsol_tol_min"_json_pointer] = itsol_tol_min__;
212 return dict_.at(
"/settings/min_occupancy"_json_pointer).get<
double>();
216 if (dict_.contains(
"locked")) {
217 throw std::runtime_error(locked_msg);
219 dict_[
"/settings/min_occupancy"_json_pointer] = min_occupancy__;
233 return dict_.at(
"/settings/itsol_tol_ratio"_json_pointer).get<
double>();
237 if (dict_.contains(
"locked")) {
238 throw std::runtime_error(locked_msg);
240 dict_[
"/settings/itsol_tol_ratio"_json_pointer] = itsol_tol_ratio__;
257 return dict_.at(
"/settings/itsol_tol_scale"_json_pointer).get<std::array<double, 2>>();
261 if (dict_.contains(
"locked")) {
262 throw std::runtime_error(locked_msg);
264 dict_[
"/settings/itsol_tol_scale"_json_pointer] = itsol_tol_scale__;
269 return dict_.at(
"/settings/auto_enu_tol"_json_pointer).get<
double>();
273 if (dict_.contains(
"locked")) {
274 throw std::runtime_error(locked_msg);
276 dict_[
"/settings/auto_enu_tol"_json_pointer] = auto_enu_tol__;
281 return dict_.at(
"/settings/fft_grid_size"_json_pointer).get<std::array<int, 3>>();
283 inline void fft_grid_size(std::array<int, 3> fft_grid_size__)
285 if (dict_.contains(
"locked")) {
286 throw std::runtime_error(locked_msg);
288 dict_[
"/settings/fft_grid_size"_json_pointer] = fft_grid_size__;
293 return dict_.at(
"/settings/radial_grid"_json_pointer).get<std::string>();
297 if (dict_.contains(
"locked")) {
298 throw std::runtime_error(locked_msg);
300 dict_[
"/settings/radial_grid"_json_pointer] = radial_grid__;
308 return dict_.at(
"/settings/sht_coverage"_json_pointer).get<
int>();
312 if (dict_.contains(
"locked")) {
313 throw std::runtime_error(locked_msg);
315 dict_[
"/settings/sht_coverage"_json_pointer] = sht_coverage__;
320 return dict_.at(
"/settings/fp32_to_fp64_rms"_json_pointer).get<
double>();
324 if (dict_.contains(
"locked")) {
325 throw std::runtime_error(locked_msg);
327 dict_[
"/settings/fp32_to_fp64_rms"_json_pointer] = fp32_to_fp64_rms__;
330 nlohmann::json& dict_;
332 inline auto const& settings()
const {
return settings_;}
333 inline auto& settings() {
return settings_;}
345 return dict_.at(
"/unit_cell/lattice_vectors"_json_pointer).get<std::array<std::array<double, 3>, 3>>();
347 inline void lattice_vectors(std::array<std::array<double, 3>, 3> lattice_vectors__)
349 if (dict_.contains(
"locked")) {
350 throw std::runtime_error(locked_msg);
352 dict_[
"/unit_cell/lattice_vectors"_json_pointer] = lattice_vectors__;
360 return dict_.at(
"/unit_cell/lattice_vectors_scale"_json_pointer).get<
double>();
364 if (dict_.contains(
"locked")) {
365 throw std::runtime_error(locked_msg);
367 dict_[
"/unit_cell/lattice_vectors_scale"_json_pointer] = lattice_vectors_scale__;
372 return dict_.at(
"/unit_cell/atom_coordinate_units"_json_pointer).get<std::string>();
376 if (dict_.contains(
"locked")) {
377 throw std::runtime_error(locked_msg);
379 dict_[
"/unit_cell/atom_coordinate_units"_json_pointer] = atom_coordinate_units__;
384 return dict_.at(
"/unit_cell/atom_types"_json_pointer).get<std::vector<std::string>>();
386 inline void atom_types(std::vector<std::string> atom_types__)
388 if (dict_.contains(
"locked")) {
389 throw std::runtime_error(locked_msg);
391 dict_[
"/unit_cell/atom_types"_json_pointer] = atom_types__;
397 return dict_.at(p / label__).get<std::string>();
400 inline auto atoms(std::string label__)
const
403 return dict_.at(p / label__).get<std::vector<std::vector<double>>>();
406 nlohmann::json& dict_;
408 inline auto const& unit_cell()
const {
return unit_cell_;}
409 inline auto& unit_cell() {
return unit_cell_;}
421 return dict_.at(
"/iterative_solver/type"_json_pointer).get<std::string>();
423 inline void type(std::string type__)
425 if (dict_.contains(
"locked")) {
426 throw std::runtime_error(locked_msg);
428 dict_[
"/iterative_solver/type"_json_pointer] = type__;
433 return dict_.at(
"/iterative_solver/num_steps"_json_pointer).get<
int>();
437 if (dict_.contains(
"locked")) {
438 throw std::runtime_error(locked_msg);
440 dict_[
"/iterative_solver/num_steps"_json_pointer] = num_steps__;
445 return dict_.at(
"/iterative_solver/subspace_size"_json_pointer).get<
int>();
449 if (dict_.contains(
"locked")) {
450 throw std::runtime_error(locked_msg);
452 dict_[
"/iterative_solver/subspace_size"_json_pointer] = subspace_size__;
457 return dict_.at(
"/iterative_solver/locking"_json_pointer).get<
bool>();
459 inline void locking(
bool locking__)
461 if (dict_.contains(
"locked")) {
462 throw std::runtime_error(locked_msg);
464 dict_[
"/iterative_solver/locking"_json_pointer] = locking__;
474 return dict_.at(
"/iterative_solver/early_restart"_json_pointer).get<
double>();
478 if (dict_.contains(
"locked")) {
479 throw std::runtime_error(locked_msg);
481 dict_[
"/iterative_solver/early_restart"_json_pointer] = early_restart__;
489 return dict_.at(
"/iterative_solver/energy_tolerance"_json_pointer).get<
double>();
493 if (dict_.contains(
"locked")) {
494 throw std::runtime_error(locked_msg);
496 dict_[
"/iterative_solver/energy_tolerance"_json_pointer] = energy_tolerance__;
501 return dict_.at(
"/iterative_solver/residual_tolerance"_json_pointer).get<
double>();
505 if (dict_.contains(
"locked")) {
506 throw std::runtime_error(locked_msg);
508 dict_[
"/iterative_solver/residual_tolerance"_json_pointer] = residual_tolerance__;
513 return dict_.at(
"/iterative_solver/relative_tolerance"_json_pointer).get<
double>();
517 if (dict_.contains(
"locked")) {
518 throw std::runtime_error(locked_msg);
520 dict_[
"/iterative_solver/relative_tolerance"_json_pointer] = relative_tolerance__;
528 return dict_.at(
"/iterative_solver/empty_states_tolerance"_json_pointer).get<
double>();
532 if (dict_.contains(
"locked")) {
533 throw std::runtime_error(locked_msg);
535 dict_[
"/iterative_solver/empty_states_tolerance"_json_pointer] = empty_states_tolerance__;
545 return dict_.at(
"/iterative_solver/converge_by_energy"_json_pointer).get<
int>();
549 if (dict_.contains(
"locked")) {
550 throw std::runtime_error(locked_msg);
552 dict_[
"/iterative_solver/converge_by_energy"_json_pointer] = converge_by_energy__;
557 return dict_.at(
"/iterative_solver/min_num_res"_json_pointer).get<
int>();
561 if (dict_.contains(
"locked")) {
562 throw std::runtime_error(locked_msg);
564 dict_[
"/iterative_solver/min_num_res"_json_pointer] = min_num_res__;
572 return dict_.at(
"/iterative_solver/num_singular"_json_pointer).get<
int>();
576 if (dict_.contains(
"locked")) {
577 throw std::runtime_error(locked_msg);
579 dict_[
"/iterative_solver/num_singular"_json_pointer] = num_singular__;
584 return dict_.at(
"/iterative_solver/init_eval_old"_json_pointer).get<
bool>();
588 if (dict_.contains(
"locked")) {
589 throw std::runtime_error(locked_msg);
591 dict_[
"/iterative_solver/init_eval_old"_json_pointer] = init_eval_old__;
600 return dict_.at(
"/iterative_solver/init_subspace"_json_pointer).get<std::string>();
604 if (dict_.contains(
"locked")) {
605 throw std::runtime_error(locked_msg);
607 dict_[
"/iterative_solver/init_subspace"_json_pointer] = init_subspace__;
612 return dict_.at(
"/iterative_solver/extra_ortho"_json_pointer).get<
bool>();
616 if (dict_.contains(
"locked")) {
617 throw std::runtime_error(locked_msg);
619 dict_[
"/iterative_solver/extra_ortho"_json_pointer] = extra_ortho__;
622 nlohmann::json& dict_;
624 inline auto const& iterative_solver()
const {
return iterative_solver_;}
625 inline auto& iterative_solver() {
return iterative_solver_;}
642 return dict_.at(
"/control/mpi_grid_dims"_json_pointer).get<std::vector<int>>();
646 if (dict_.contains(
"locked")) {
647 throw std::runtime_error(locked_msg);
649 dict_[
"/control/mpi_grid_dims"_json_pointer] = mpi_grid_dims__;
654 return dict_.at(
"/control/cyclic_block_size"_json_pointer).get<
int>();
658 if (dict_.contains(
"locked")) {
659 throw std::runtime_error(locked_msg);
661 dict_[
"/control/cyclic_block_size"_json_pointer] = cyclic_block_size__;
671 return dict_.at(
"/control/reduce_gvec"_json_pointer).get<
bool>();
675 if (dict_.contains(
"locked")) {
676 throw std::runtime_error(locked_msg);
678 dict_[
"/control/reduce_gvec"_json_pointer] = reduce_gvec__;
683 return dict_.at(
"/control/std_evp_solver_name"_json_pointer).get<std::string>();
687 if (dict_.contains(
"locked")) {
688 throw std::runtime_error(locked_msg);
690 dict_[
"/control/std_evp_solver_name"_json_pointer] = std_evp_solver_name__;
695 return dict_.at(
"/control/gen_evp_solver_name"_json_pointer).get<std::string>();
699 if (dict_.contains(
"locked")) {
700 throw std::runtime_error(locked_msg);
702 dict_[
"/control/gen_evp_solver_name"_json_pointer] = gen_evp_solver_name__;
711 return dict_.at(
"/control/fft_mode"_json_pointer).get<std::string>();
713 inline void fft_mode(std::string fft_mode__)
715 if (dict_.contains(
"locked")) {
716 throw std::runtime_error(locked_msg);
718 dict_[
"/control/fft_mode"_json_pointer] = fft_mode__;
723 return dict_.at(
"/control/processing_unit"_json_pointer).get<std::string>();
727 if (dict_.contains(
"locked")) {
728 throw std::runtime_error(locked_msg);
730 dict_[
"/control/processing_unit"_json_pointer] = processing_unit__;
735 return dict_.at(
"/control/rmt_max"_json_pointer).get<
double>();
737 inline void rmt_max(
double rmt_max__)
739 if (dict_.contains(
"locked")) {
740 throw std::runtime_error(locked_msg);
742 dict_[
"/control/rmt_max"_json_pointer] = rmt_max__;
747 return dict_.at(
"/control/spglib_tolerance"_json_pointer).get<
double>();
751 if (dict_.contains(
"locked")) {
752 throw std::runtime_error(locked_msg);
754 dict_[
"/control/spglib_tolerance"_json_pointer] = spglib_tolerance__;
766 return dict_.at(
"/control/verbosity"_json_pointer).get<
int>();
770 if (dict_.contains(
"locked")) {
771 throw std::runtime_error(locked_msg);
773 dict_[
"/control/verbosity"_json_pointer] = verbosity__;
781 return dict_.at(
"/control/verification"_json_pointer).get<
int>();
785 if (dict_.contains(
"locked")) {
786 throw std::runtime_error(locked_msg);
788 dict_[
"/control/verification"_json_pointer] = verification__;
793 return dict_.at(
"/control/num_bands_to_print"_json_pointer).get<
int>();
797 if (dict_.contains(
"locked")) {
798 throw std::runtime_error(locked_msg);
800 dict_[
"/control/num_bands_to_print"_json_pointer] = num_bands_to_print__;
805 return dict_.at(
"/control/print_stress"_json_pointer).get<
bool>();
809 if (dict_.contains(
"locked")) {
810 throw std::runtime_error(locked_msg);
812 dict_[
"/control/print_stress"_json_pointer] = print_stress__;
817 return dict_.at(
"/control/print_forces"_json_pointer).get<
bool>();
821 if (dict_.contains(
"locked")) {
822 throw std::runtime_error(locked_msg);
824 dict_[
"/control/print_forces"_json_pointer] = print_forces__;
829 return dict_.at(
"/control/print_neighbors"_json_pointer).get<
bool>();
833 if (dict_.contains(
"locked")) {
834 throw std::runtime_error(locked_msg);
836 dict_[
"/control/print_neighbors"_json_pointer] = print_neighbors__;
841 return dict_.at(
"/control/use_second_variation"_json_pointer).get<
bool>();
845 if (dict_.contains(
"locked")) {
846 throw std::runtime_error(locked_msg);
848 dict_[
"/control/use_second_variation"_json_pointer] = use_second_variation__;
853 return dict_.at(
"/control/beta_chunk_size"_json_pointer).get<
int>();
857 if (dict_.contains(
"locked")) {
858 throw std::runtime_error(locked_msg);
860 dict_[
"/control/beta_chunk_size"_json_pointer] = beta_chunk_size__;
865 return dict_.at(
"/control/ortho_rf"_json_pointer).get<
bool>();
867 inline void ortho_rf(
bool ortho_rf__)
869 if (dict_.contains(
"locked")) {
870 throw std::runtime_error(locked_msg);
872 dict_[
"/control/ortho_rf"_json_pointer] = ortho_rf__;
877 return dict_.at(
"/control/output"_json_pointer).get<std::string>();
879 inline void output(std::string output__)
881 if (dict_.contains(
"locked")) {
882 throw std::runtime_error(locked_msg);
884 dict_[
"/control/output"_json_pointer] = output__;
889 return dict_.at(
"/control/gvec_chunk_size"_json_pointer).get<
int>();
893 if (dict_.contains(
"locked")) {
894 throw std::runtime_error(locked_msg);
896 dict_[
"/control/gvec_chunk_size"_json_pointer] = gvec_chunk_size__;
899 nlohmann::json& dict_;
901 inline auto const& control()
const {
return control_;}
902 inline auto& control() {
return control_;}
918 return dict_.at(
"/parameters/electronic_structure_method"_json_pointer).get<std::string>();
922 if (dict_.contains(
"locked")) {
923 throw std::runtime_error(locked_msg);
925 dict_[
"/parameters/electronic_structure_method"_json_pointer] = electronic_structure_method__;
933 return dict_.at(
"/parameters/xc_functionals"_json_pointer).get<std::vector<std::string>>();
935 inline void xc_functionals(std::vector<std::string> xc_functionals__)
937 if (dict_.contains(
"locked")) {
938 throw std::runtime_error(locked_msg);
940 dict_[
"/parameters/xc_functionals"_json_pointer] = xc_functionals__;
945 return dict_.at(
"/parameters/core_relativity"_json_pointer).get<std::string>();
949 if (dict_.contains(
"locked")) {
950 throw std::runtime_error(locked_msg);
952 dict_[
"/parameters/core_relativity"_json_pointer] = core_relativity__;
957 return dict_.at(
"/parameters/valence_relativity"_json_pointer).get<std::string>();
961 if (dict_.contains(
"locked")) {
962 throw std::runtime_error(locked_msg);
964 dict_[
"/parameters/valence_relativity"_json_pointer] = valence_relativity__;
972 return dict_.at(
"/parameters/num_bands"_json_pointer).get<
int>();
976 if (dict_.contains(
"locked")) {
977 throw std::runtime_error(locked_msg);
979 dict_[
"/parameters/num_bands"_json_pointer] = num_bands__;
984 return dict_.at(
"/parameters/num_fv_states"_json_pointer).get<
int>();
988 if (dict_.contains(
"locked")) {
989 throw std::runtime_error(locked_msg);
991 dict_[
"/parameters/num_fv_states"_json_pointer] = num_fv_states__;
996 return dict_.at(
"/parameters/smearing_width"_json_pointer).get<
double>();
1000 if (dict_.contains(
"locked")) {
1001 throw std::runtime_error(locked_msg);
1003 dict_[
"/parameters/smearing_width"_json_pointer] = smearing_width__;
1008 return dict_.at(
"/parameters/smearing"_json_pointer).get<std::string>();
1010 inline void smearing(std::string smearing__)
1012 if (dict_.contains(
"locked")) {
1013 throw std::runtime_error(locked_msg);
1015 dict_[
"/parameters/smearing"_json_pointer] = smearing__;
1020 return dict_.at(
"/parameters/pw_cutoff"_json_pointer).get<
double>();
1022 inline void pw_cutoff(
double pw_cutoff__)
1024 if (dict_.contains(
"locked")) {
1025 throw std::runtime_error(locked_msg);
1027 dict_[
"/parameters/pw_cutoff"_json_pointer] = pw_cutoff__;
1035 return dict_.at(
"/parameters/aw_cutoff"_json_pointer).get<
double>();
1037 inline void aw_cutoff(
double aw_cutoff__)
1039 if (dict_.contains(
"locked")) {
1040 throw std::runtime_error(locked_msg);
1042 dict_[
"/parameters/aw_cutoff"_json_pointer] = aw_cutoff__;
1047 return dict_.at(
"/parameters/gk_cutoff"_json_pointer).get<
double>();
1049 inline void gk_cutoff(
double gk_cutoff__)
1051 if (dict_.contains(
"locked")) {
1052 throw std::runtime_error(locked_msg);
1054 dict_[
"/parameters/gk_cutoff"_json_pointer] = gk_cutoff__;
1059 return dict_.at(
"/parameters/lmax_apw"_json_pointer).get<
int>();
1061 inline void lmax_apw(
int lmax_apw__)
1063 if (dict_.contains(
"locked")) {
1064 throw std::runtime_error(locked_msg);
1066 dict_[
"/parameters/lmax_apw"_json_pointer] = lmax_apw__;
1071 return dict_.at(
"/parameters/lmax_rho"_json_pointer).get<
int>();
1073 inline void lmax_rho(
int lmax_rho__)
1075 if (dict_.contains(
"locked")) {
1076 throw std::runtime_error(locked_msg);
1078 dict_[
"/parameters/lmax_rho"_json_pointer] = lmax_rho__;
1083 return dict_.at(
"/parameters/lmax_pot"_json_pointer).get<
int>();
1085 inline void lmax_pot(
int lmax_pot__)
1087 if (dict_.contains(
"locked")) {
1088 throw std::runtime_error(locked_msg);
1090 dict_[
"/parameters/lmax_pot"_json_pointer] = lmax_pot__;
1095 return dict_.at(
"/parameters/num_mag_dims"_json_pointer).get<
int>();
1099 if (dict_.contains(
"locked")) {
1100 throw std::runtime_error(locked_msg);
1102 dict_[
"/parameters/num_mag_dims"_json_pointer] = num_mag_dims__;
1107 return dict_.at(
"/parameters/auto_rmt"_json_pointer).get<
int>();
1109 inline void auto_rmt(
int auto_rmt__)
1111 if (dict_.contains(
"locked")) {
1112 throw std::runtime_error(locked_msg);
1114 dict_[
"/parameters/auto_rmt"_json_pointer] = auto_rmt__;
1119 return dict_.at(
"/parameters/ngridk"_json_pointer).get<std::array<int, 3>>();
1121 inline void ngridk(std::array<int, 3> ngridk__)
1123 if (dict_.contains(
"locked")) {
1124 throw std::runtime_error(locked_msg);
1126 dict_[
"/parameters/ngridk"_json_pointer] = ngridk__;
1131 return dict_.at(
"/parameters/shiftk"_json_pointer).get<std::array<int, 3>>();
1133 inline void shiftk(std::array<int, 3> shiftk__)
1135 if (dict_.contains(
"locked")) {
1136 throw std::runtime_error(locked_msg);
1138 dict_[
"/parameters/shiftk"_json_pointer] = shiftk__;
1143 return dict_.at(
"/parameters/vk"_json_pointer).get<std::vector<std::array<double, 3>>>();
1145 inline void vk(std::vector<std::array<double, 3>> vk__)
1147 if (dict_.contains(
"locked")) {
1148 throw std::runtime_error(locked_msg);
1150 dict_[
"/parameters/vk"_json_pointer] = vk__;
1155 return dict_.at(
"/parameters/num_dft_iter"_json_pointer).get<
int>();
1159 if (dict_.contains(
"locked")) {
1160 throw std::runtime_error(locked_msg);
1162 dict_[
"/parameters/num_dft_iter"_json_pointer] = num_dft_iter__;
1167 return dict_.at(
"/parameters/energy_tol"_json_pointer).get<
double>();
1171 if (dict_.contains(
"locked")) {
1172 throw std::runtime_error(locked_msg);
1174 dict_[
"/parameters/energy_tol"_json_pointer] = energy_tol__;
1179 return dict_.at(
"/parameters/density_tol"_json_pointer).get<
double>();
1183 if (dict_.contains(
"locked")) {
1184 throw std::runtime_error(locked_msg);
1186 dict_[
"/parameters/density_tol"_json_pointer] = density_tol__;
1191 return dict_.at(
"/parameters/molecule"_json_pointer).get<
bool>();
1193 inline void molecule(
bool molecule__)
1195 if (dict_.contains(
"locked")) {
1196 throw std::runtime_error(locked_msg);
1198 dict_[
"/parameters/molecule"_json_pointer] = molecule__;
1203 return dict_.at(
"/parameters/gamma_point"_json_pointer).get<
bool>();
1207 if (dict_.contains(
"locked")) {
1208 throw std::runtime_error(locked_msg);
1210 dict_[
"/parameters/gamma_point"_json_pointer] = gamma_point__;
1215 return dict_.at(
"/parameters/so_correction"_json_pointer).get<
bool>();
1219 if (dict_.contains(
"locked")) {
1220 throw std::runtime_error(locked_msg);
1222 dict_[
"/parameters/so_correction"_json_pointer] = so_correction__;
1227 return dict_.at(
"/parameters/hubbard_correction"_json_pointer).get<
bool>();
1231 if (dict_.contains(
"locked")) {
1232 throw std::runtime_error(locked_msg);
1234 dict_[
"/parameters/hubbard_correction"_json_pointer] = hubbard_correction__;
1239 return dict_.at(
"/parameters/use_symmetry"_json_pointer).get<
bool>();
1243 if (dict_.contains(
"locked")) {
1244 throw std::runtime_error(locked_msg);
1246 dict_[
"/parameters/use_symmetry"_json_pointer] = use_symmetry__;
1251 return dict_.at(
"/parameters/use_ibz"_json_pointer).get<
bool>();
1253 inline void use_ibz(
bool use_ibz__)
1255 if (dict_.contains(
"locked")) {
1256 throw std::runtime_error(locked_msg);
1258 dict_[
"/parameters/use_ibz"_json_pointer] = use_ibz__;
1263 return dict_.at(
"/parameters/nn_radius"_json_pointer).get<
double>();
1265 inline void nn_radius(
double nn_radius__)
1267 if (dict_.contains(
"locked")) {
1268 throw std::runtime_error(locked_msg);
1270 dict_[
"/parameters/nn_radius"_json_pointer] = nn_radius__;
1275 return dict_.at(
"/parameters/reduce_aux_bf"_json_pointer).get<
double>();
1279 if (dict_.contains(
"locked")) {
1280 throw std::runtime_error(locked_msg);
1282 dict_[
"/parameters/reduce_aux_bf"_json_pointer] = reduce_aux_bf__;
1287 return dict_.at(
"/parameters/extra_charge"_json_pointer).get<
double>();
1291 if (dict_.contains(
"locked")) {
1292 throw std::runtime_error(locked_msg);
1294 dict_[
"/parameters/extra_charge"_json_pointer] = extra_charge__;
1299 return dict_.at(
"/parameters/xc_dens_tre"_json_pointer).get<
double>();
1303 if (dict_.contains(
"locked")) {
1304 throw std::runtime_error(locked_msg);
1306 dict_[
"/parameters/xc_dens_tre"_json_pointer] = xc_dens_tre__;
1311 return dict_.at(
"/parameters/use_scf_correction"_json_pointer).get<
bool>();
1315 if (dict_.contains(
"locked")) {
1316 throw std::runtime_error(locked_msg);
1318 dict_[
"/parameters/use_scf_correction"_json_pointer] = use_scf_correction__;
1323 return dict_.at(
"/parameters/precision_wf"_json_pointer).get<std::string>();
1327 if (dict_.contains(
"locked")) {
1328 throw std::runtime_error(locked_msg);
1330 dict_[
"/parameters/precision_wf"_json_pointer] = precision_wf__;
1335 return dict_.at(
"/parameters/precision_hs"_json_pointer).get<std::string>();
1339 if (dict_.contains(
"locked")) {
1340 throw std::runtime_error(locked_msg);
1342 dict_[
"/parameters/precision_hs"_json_pointer] = precision_hs__;
1347 return dict_.at(
"/parameters/precision_gs"_json_pointer).get<std::string>();
1351 if (dict_.contains(
"locked")) {
1352 throw std::runtime_error(locked_msg);
1354 dict_[
"/parameters/precision_gs"_json_pointer] = precision_gs__;
1357 nlohmann::json& dict_;
1359 inline auto const& parameters()
const {
return parameters_;}
1360 inline auto& parameters() {
return parameters_;}
1365 nlcg_t(nlohmann::json& dict__)
1372 return dict_.at(
"/nlcg/maxiter"_json_pointer).get<
int>();
1374 inline void maxiter(
int maxiter__)
1376 if (dict_.contains(
"locked")) {
1377 throw std::runtime_error(locked_msg);
1379 dict_[
"/nlcg/maxiter"_json_pointer] = maxiter__;
1384 return dict_.at(
"/nlcg/restart"_json_pointer).get<
int>();
1386 inline void restart(
int restart__)
1388 if (dict_.contains(
"locked")) {
1389 throw std::runtime_error(locked_msg);
1391 dict_[
"/nlcg/restart"_json_pointer] = restart__;
1396 return dict_.at(
"/nlcg/tau"_json_pointer).get<
double>();
1398 inline void tau(
double tau__)
1400 if (dict_.contains(
"locked")) {
1401 throw std::runtime_error(locked_msg);
1403 dict_[
"/nlcg/tau"_json_pointer] = tau__;
1406 inline auto T()
const
1408 return dict_.at(
"/nlcg/T"_json_pointer).get<
double>();
1410 inline void T(
double T__)
1412 if (dict_.contains(
"locked")) {
1413 throw std::runtime_error(locked_msg);
1415 dict_[
"/nlcg/T"_json_pointer] = T__;
1420 return dict_.at(
"/nlcg/kappa"_json_pointer).get<
double>();
1422 inline void kappa(
double kappa__)
1424 if (dict_.contains(
"locked")) {
1425 throw std::runtime_error(locked_msg);
1427 dict_[
"/nlcg/kappa"_json_pointer] = kappa__;
1432 return dict_.at(
"/nlcg/tol"_json_pointer).get<
double>();
1434 inline void tol(
double tol__)
1436 if (dict_.contains(
"locked")) {
1437 throw std::runtime_error(locked_msg);
1439 dict_[
"/nlcg/tol"_json_pointer] = tol__;
1444 return dict_.at(
"/nlcg/processing_unit"_json_pointer).get<std::string>();
1448 if (dict_.contains(
"locked")) {
1449 throw std::runtime_error(locked_msg);
1451 dict_[
"/nlcg/processing_unit"_json_pointer] = processing_unit__;
1454 nlohmann::json& dict_;
1456 inline auto const& nlcg()
const {
return nlcg_;}
1457 inline auto& nlcg() {
return nlcg_;}
1469 return dict_.at(
"/vcsqnm/initial_step_size"_json_pointer).get<
double>();
1473 if (dict_.contains(
"locked")) {
1474 throw std::runtime_error(locked_msg);
1476 dict_[
"/vcsqnm/initial_step_size"_json_pointer] = initial_step_size__;
1481 return dict_.at(
"/vcsqnm/nhist_max"_json_pointer).get<
int>();
1485 if (dict_.contains(
"locked")) {
1486 throw std::runtime_error(locked_msg);
1488 dict_[
"/vcsqnm/nhist_max"_json_pointer] = nhist_max__;
1493 return dict_.at(
"/vcsqnm/lattice_weight"_json_pointer).get<
double>();
1497 if (dict_.contains(
"locked")) {
1498 throw std::runtime_error(locked_msg);
1500 dict_[
"/vcsqnm/lattice_weight"_json_pointer] = lattice_weight__;
1505 return dict_.at(
"/vcsqnm/alpha0"_json_pointer).get<
double>();
1507 inline void alpha0(
double alpha0__)
1509 if (dict_.contains(
"locked")) {
1510 throw std::runtime_error(locked_msg);
1512 dict_[
"/vcsqnm/alpha0"_json_pointer] = alpha0__;
1517 return dict_.at(
"/vcsqnm/eps_subsp"_json_pointer).get<
double>();
1519 inline void eps_subsp(
double eps_subsp__)
1521 if (dict_.contains(
"locked")) {
1522 throw std::runtime_error(locked_msg);
1524 dict_[
"/vcsqnm/eps_subsp"_json_pointer] = eps_subsp__;
1529 return dict_.at(
"/vcsqnm/forces_tol"_json_pointer).get<
double>();
1533 if (dict_.contains(
"locked")) {
1534 throw std::runtime_error(locked_msg);
1536 dict_[
"/vcsqnm/forces_tol"_json_pointer] = forces_tol__;
1541 return dict_.at(
"/vcsqnm/stress_tol"_json_pointer).get<
double>();
1545 if (dict_.contains(
"locked")) {
1546 throw std::runtime_error(locked_msg);
1548 dict_[
"/vcsqnm/stress_tol"_json_pointer] = stress_tol__;
1553 return dict_.at(
"/vcsqnm/num_steps"_json_pointer).get<
int>();
1557 if (dict_.contains(
"locked")) {
1558 throw std::runtime_error(locked_msg);
1560 dict_[
"/vcsqnm/num_steps"_json_pointer] = num_steps__;
1563 nlohmann::json& dict_;
1565 inline auto const&
vcsqnm()
const {
return vcsqnm_;}
1566 inline auto&
vcsqnm() {
return vcsqnm_;}
1578 return dict_.at(
"/hubbard/orthogonalize"_json_pointer).get<
bool>();
1582 if (dict_.contains(
"locked")) {
1583 throw std::runtime_error(locked_msg);
1585 dict_[
"/hubbard/orthogonalize"_json_pointer] = orthogonalize__;
1590 return dict_.at(
"/hubbard/full_orthogonalization"_json_pointer).get<
bool>();
1594 if (dict_.contains(
"locked")) {
1595 throw std::runtime_error(locked_msg);
1597 dict_[
"/hubbard/full_orthogonalization"_json_pointer] = full_orthogonalization__;
1602 return dict_.at(
"/hubbard/normalize"_json_pointer).get<
bool>();
1606 if (dict_.contains(
"locked")) {
1607 throw std::runtime_error(locked_msg);
1609 dict_[
"/hubbard/normalize"_json_pointer] = normalize__;
1614 return dict_.at(
"/hubbard/simplified"_json_pointer).get<
bool>();
1618 if (dict_.contains(
"locked")) {
1619 throw std::runtime_error(locked_msg);
1621 dict_[
"/hubbard/simplified"_json_pointer] = simplified__;
1627 nlohmann::json& dict_;
1629 local_t(nlohmann::json& dict__)
1633 auto atom_type()
const
1635 return dict_.at(
"atom_type").get<std::string>();
1639 return dict_.at(
"n").get<
int>();
1643 return dict_.at(
"l").get<
int>();
1647 return dict_.at(
"U").get<
double>();
1651 return dict_.at(
"J").get<
double>();
1655 return dict_.at(
"BE2").get<
double>();
1659 return dict_.at(
"E3").get<
double>();
1663 return dict_.at(
"alpha").get<
double>();
1667 return dict_.at(
"beta").get<
double>();
1669 auto initial_occupancy()
const
1671 return dict_.at(
"initial_occupancy").get<std::vector<double>>();
1673 auto total_initial_occupancy()
const
1675 return dict_.at(
"total_initial_occupancy").get<
double>();
1677 bool contains(std::string key__)
const
1679 return dict_.contains(key__);
1685 nlohmann::json& dict_;
1693 return dict_.size();
1695 void append(nlohmann::json& node__)
1697 dict_.push_back(node__);
1703 return local_t(dict_.at(ptr / idx__));
1705 local_t local(
int idx__)
const
1708 return local_t(dict_.at(ptr / idx__));
1710 local_list_t local()
1713 return local_list_t(dict_.at(ptr));
1715 local_list_t local()
const
1718 return local_list_t(dict_.at(ptr));
1724 nlohmann::json& dict_;
1730 auto atom_pair()
const
1732 return dict_.at(
"atom_pair").get<std::array<int, 2>>();
1736 return dict_.at(
"T").get<std::array<int, 3>>();
1740 return dict_.at(
"n").get<std::array<int, 2>>();
1744 return dict_.at(
"l").get<std::array<int, 2>>();
1748 return dict_.at(
"V").get<
double>();
1750 bool contains(std::string key__)
const
1752 return dict_.contains(key__);
1758 nlohmann::json& dict_;
1766 return dict_.size();
1768 void append(nlohmann::json& node__)
1770 dict_.push_back(node__);
1778 nonlocal_t nonlocal(
int idx__)
const
1781 return nonlocal_t(dict_.at(ptr / idx__));
1783 nonlocal_list_t nonlocal()
1786 return nonlocal_list_t(dict_.at(ptr));
1788 nonlocal_list_t nonlocal()
const
1791 return nonlocal_list_t(dict_.at(ptr));
1794 nlohmann::json& dict_;
1796 inline auto const& hubbard()
const {
return hubbard_;}
1797 inline auto& hubbard() {
return hubbard_;}
1799 mixer_t mixer_{dict_};
1800 settings_t settings_{dict_};
1801 unit_cell_t unit_cell_{dict_};
1802 iterative_solver_t iterative_solver_{dict_};
1803 control_t control_{dict_};
1804 parameters_t parameters_{dict_};
1805 nlcg_t nlcg_{dict_};
1806 vcsqnm_t vcsqnm_{dict_};
1807 hubbard_t hubbard_{dict_};
1809 nlohmann::json dict_;
::nlohmann::json_pointer< StringType > json_pointer
JSON Pointer, see nlohmann::json_pointer.
auto processing_unit() const
Main processing unit to use during the execution.
auto verbosity() const
Level of verbosity.
auto num_bands_to_print() const
Number of eigen-values that are printed to the standard output.
auto print_stress() const
If true then the stress tensor components are printed at the end of SCF run.
auto gvec_chunk_size() const
Split local G-vectors in chunks to reduce the GPU memory consumption of augmentation operator.
auto print_neighbors() const
If true then the list of nearest neighbours for each atom is printed to the standard output.
auto reduce_gvec() const
Reduce G-vectors by inversion symmetry.
auto verification() const
Level of internal verification.
auto beta_chunk_size() const
Number of atoms in a chunk of beta-projectors.
auto mpi_grid_dims() const
the mpi grid is setting the parameters for blacs grid / band parallelisation, the rest going to k-poi...
auto spglib_tolerance() const
Tolerance of the spglib in finding crystal symmetries.
auto fft_mode() const
Coarse grid FFT mode (serial or parallel).
auto print_forces() const
If true then the atomic forces are printed at the end of SCF run.
auto use_second_variation() const
True if second-variational diagonalization is used in LAPW method.
auto output() const
Type of the output stream (stdout:, file:name)
auto rmt_max() const
Maximum allowed muffin-tin radius in case of LAPW.
auto cyclic_block_size() const
Block size for ScaLAPACK, ELPA, and DLA-Future.
auto std_evp_solver_name() const
Standard eigen-value solver to use.
auto gen_evp_solver_name() const
Generalized eigen-value solver to use.
auto ortho_rf() const
Orthogonalize LAPW radial functions.
Description of the on-site (local) Hubbard interaction.
Description of the off-site (nonlocal) Hubbard interaction.
auto simplified() const
If true, simplified version of Hubbard correction is used.
auto normalize() const
If true, normalization is applied to Hubbard orbitals.
auto orthogonalize() const
If true, orthogonalization is applied to Hubbard orbitals.
auto full_orthogonalization() const
If true, all atomic orbitals from all atoms are used to orthogonalize the hubbard subspace.
Parameters of the iterative solver.
auto extra_ortho() const
Orthogonalize the new subspace basis functions one more time in order to improve the numerical stabil...
auto type() const
Type of the iterative solver.
auto energy_tolerance() const
Tolerance for the eigen-energy difference .
auto locking() const
Lock eigenvectors of the smallest eigenvalues when they have converged at restart.
auto early_restart() const
Restart early when the ratio unconverged vs lockable vectors drops below this threshold.
auto init_subspace() const
Tell how to initialize the subspace.
auto converge_by_energy() const
Defines the flavour of the iterative solver.
auto num_singular() const
Number of singular components for the LAPW Davidson solver.
auto min_num_res() const
Minimum number of residuals to continue iterative diagonalization process.
auto subspace_size() const
Size of the variational subspace is this number times the number of bands.
auto init_eval_old() const
Initialize eigen-values with previous (old) values.
auto residual_tolerance() const
Tolerance for the residual L2 norm.
auto relative_tolerance() const
Relative tolerance for the residual L2 norm. (0 means this criterion is effectively not used.
auto num_steps() const
Number of steps (iterations) of the solver.
auto empty_states_tolerance() const
Additional tolerance for empty states.
auto type() const
Type of the mixer.
auto linear_mix_rms_tol() const
RMS tolerance above which the linear mixing is triggered.
auto beta0() const
Mixing ratio in case of initial linear mixing.
auto beta() const
Mixing parameter.
auto beta_scaling_factor() const
Scaling factor for mixing parameter.
auto use_hartree() const
Use Hartree potential in the inner() product for residuals.
auto max_history() const
Number of history steps for Broyden-type mixers.
Non-linear conjugate gradient minimisation.
auto tol() const
CG tolerance.
auto processing_unit() const
NLCG processing unit.
auto restart() const
CG restart.
auto tau() const
Backtracking search, step parameter.
auto kappa() const
Scalar preconditioning of pseudo Hamiltonian.
auto T() const
Temperature in Kelvin.
auto maxiter() const
Maximum number of CG iterations.
Parameters of the simulation.
auto precision_hs() const
The floating point precision of the Hamiltonian subspace matrices.
auto ngridk() const
Regular k-point grid for the SCF ground state.
auto so_correction() const
True if spin-orbit correction is applied.
auto precision_gs() const
The final floating point precision of the ground state DFT calculation (dev options).
auto use_symmetry() const
True if symmetry is used.
auto use_ibz() const
Use irreducible Brillouin zone.
auto lmax_rho() const
Maximum l for density expansion in real spherical harmonics.
auto auto_rmt() const
A choice of scaleing muffin-tin radii automatically.
auto pw_cutoff() const
Cutoff for plane-waves (for density and potential expansion) in the units of [a.u....
auto energy_tol() const
Tolerance in total energy change (in units of [Ha]).
auto lmax_apw() const
Maximum l for APW functions.
auto xc_functionals() const
List of XC functionals (typically contains exchange term and correlation term).
auto hubbard_correction() const
True if Hubbard U correction is applied.
auto num_bands() const
Number of bands.
auto num_mag_dims() const
Number of dimensions of the magnetization and effective magnetic field vector.
auto extra_charge() const
Introduce extra charge to the system. Positive charge means extra holes, negative charge - extra elec...
auto core_relativity() const
Type of core-states relativity in full-potential LAPW case.
auto shiftk() const
Shift in the k-point grid.
auto aw_cutoff() const
Cutoff for augmented-wave functions.
auto reduce_aux_bf() const
Reduction of the auxiliary magnetic field at each SCF step.
auto electronic_structure_method() const
Type of electronic structure method.
auto nn_radius() const
Radius of atom nearest-neighbour cluster.
auto valence_relativity() const
Type of valence states relativity in full-potential LAPW case.
auto molecule() const
True if this is a molecule calculation.
auto vk() const
Specific list of k-point coordinates.
auto num_dft_iter() const
Number of SCF iterations.
auto gk_cutoff() const
Cutoff for |G+k| plane-waves in the units of [a.u.^-1].
auto smearing_width() const
Width of the smearing delta-function in the units of [Ha].
auto smearing() const
Type of occupancy smearing.
auto xc_dens_tre() const
XC density threshold (debug purposes).
auto precision_wf() const
The floating point precision of the Kohn-Sham wave-functions.
auto lmax_pot() const
Maximum l for potential expansion in real spherical harmonics.
auto num_fv_states() const
Number of first-variational states.
auto gamma_point() const
True if gamma-point (real) version of the PW code is used.
auto density_tol() const
Tolerance for the density mixing.
auto use_scf_correction() const
True if SCF correction to total energy should be computed.
Settings control the internal parameters related to the numerical implementation.
auto itsol_tol_min() const
Minimum tolerance of the iterative solver.
auto mixer_rms_min() const
Minimum value of allowed RMS for the mixer.
auto always_update_wf() const
Update wave-functions in the Davdison solver even if they immediately satisfy the convergence criteri...
auto min_occupancy() const
Minimum occupancy below which the band is treated as being 'empty'.
auto nprii_vloc() const
Point density (in a.u.^-1) for interpolating radial integrals of the local part of pseudopotential.
auto nprii_rho_core() const
Point density (in a.u.^-1) for interpolating radial integrals of the core charge density.
auto nprii_aug() const
Point density (in a.u.^-1) for interpolating radial integrals of the augmentation operator.
auto sht_coverage() const
Coverage of sphere in case of spherical harmonics transformation.
auto fft_grid_size() const
Initial dimenstions for the fine-grain FFT grid.
auto fp32_to_fp64_rms() const
Density RMS tolerance to switch to FP64 implementation. If zero, estimation of iterative solver toler...
auto itsol_tol_ratio() const
Fine control of the empty states tolerance.
auto nprii_beta() const
Point density (in a.u.^-1) for interpolating radial integrals of the beta projectors.
auto itsol_tol_scale() const
Scaling parameters of the iterative solver tolerance.
auto radial_grid() const
Default radial grid for LAPW species.
auto auto_enu_tol() const
Tolerance to recompute the LAPW linearisation energies.
Unit cell representation.
auto lattice_vectors_scale() const
Scaling factor for the lattice vectors.
auto atom_coordinate_units() const
Type of atomic coordinates: lattice, atomic units or Angstroms.
auto atom_files(std::string label__) const
Mapping between atom type labels and atomic files.
auto atom_types() const
List of atom type labels.
auto lattice_vectors() const
Three non-collinear vectors of the primitive unit cell.
auto atoms(std::string label__) const
Atomic coordinates.
Variable cell shape stabilized quasi Newton method (VC-SQNM)
auto num_steps() const
Number of lattice relaxation steps.
auto forces_tol() const
Total error tolerance on the atomic forces.
auto alpha0() const
Lower limit on the step size.
auto lattice_weight() const
Weight / size of the supercell that is used to transform lattice derivatives. Use a value between 1 a...
auto stress_tol() const
Total error tolerance on the lattice stress.
auto eps_subsp() const
Lower limit on linear dependencies of basis vectors in history list.
auto initial_step_size() const
Initial step size.
auto nhist_max() const
Maximal number of steps that will be stored in the history list.
Namespace of the SIRIUS library.
Variable cell stable quasi-Newton lattice optimizer.