SIRIUS 7.5.0
Electronic structure library and applications
config.hpp
1// Warning! This file is autogenerated from input_schema.json using gen_input_struct.py script
2
3namespace sirius {
4
5std::string const locked_msg("parameters are locked");
6
8{
9 public:
10 nlohmann::json const& dict() const
11 {
12 return dict_;
13 }
14 /// Parameters of the mixer
15 class mixer_t
16 {
17 public:
18 mixer_t(nlohmann::json& dict__)
19 : dict_(dict__)
20 {
21 }
22 /// Type of the mixer.
23 inline auto type() const
24 {
25 return dict_.at("/mixer/type"_json_pointer).get<std::string>();
26 }
27 inline void type(std::string type__)
28 {
29 if (dict_.contains("locked")) {
30 throw std::runtime_error(locked_msg);
31 }
32 dict_["/mixer/type"_json_pointer] = type__;
33 }
34 /// Mixing parameter
35 inline auto beta() const
36 {
37 return dict_.at("/mixer/beta"_json_pointer).get<double>();
38 }
39 inline void beta(double beta__)
40 {
41 if (dict_.contains("locked")) {
42 throw std::runtime_error(locked_msg);
43 }
44 dict_["/mixer/beta"_json_pointer] = beta__;
45 }
46 /// Mixing ratio in case of initial linear mixing
47 inline auto beta0() const
48 {
49 return dict_.at("/mixer/beta0"_json_pointer).get<double>();
50 }
51 inline void beta0(double beta0__)
52 {
53 if (dict_.contains("locked")) {
54 throw std::runtime_error(locked_msg);
55 }
56 dict_["/mixer/beta0"_json_pointer] = beta0__;
57 }
58 /// RMS tolerance above which the linear mixing is triggered
59 inline auto linear_mix_rms_tol() const
60 {
61 return dict_.at("/mixer/linear_mix_rms_tol"_json_pointer).get<double>();
62 }
63 inline void linear_mix_rms_tol(double linear_mix_rms_tol__)
64 {
65 if (dict_.contains("locked")) {
66 throw std::runtime_error(locked_msg);
67 }
68 dict_["/mixer/linear_mix_rms_tol"_json_pointer] = linear_mix_rms_tol__;
69 }
70 /// Number of history steps for Broyden-type mixers
71 inline auto max_history() const
72 {
73 return dict_.at("/mixer/max_history"_json_pointer).get<int>();
74 }
75 inline void max_history(int max_history__)
76 {
77 if (dict_.contains("locked")) {
78 throw std::runtime_error(locked_msg);
79 }
80 dict_["/mixer/max_history"_json_pointer] = max_history__;
81 }
82 /// Scaling factor for mixing parameter
83 inline auto beta_scaling_factor() const
84 {
85 return dict_.at("/mixer/beta_scaling_factor"_json_pointer).get<double>();
86 }
87 inline void beta_scaling_factor(double beta_scaling_factor__)
88 {
89 if (dict_.contains("locked")) {
90 throw std::runtime_error(locked_msg);
91 }
92 dict_["/mixer/beta_scaling_factor"_json_pointer] = beta_scaling_factor__;
93 }
94 /// Use Hartree potential in the inner() product for residuals
95 inline auto use_hartree() const
96 {
97 return dict_.at("/mixer/use_hartree"_json_pointer).get<bool>();
98 }
99 inline void use_hartree(bool use_hartree__)
100 {
101 if (dict_.contains("locked")) {
102 throw std::runtime_error(locked_msg);
103 }
104 dict_["/mixer/use_hartree"_json_pointer] = use_hartree__;
105 }
106 private:
107 nlohmann::json& dict_;
108 };
109 inline auto const& mixer() const {return mixer_;}
110 inline auto& mixer() {return mixer_;}
111 /// Settings control the internal parameters related to the numerical implementation.
112 /**
113 Changing of setting parameters will have a small impact on the final result.
114 */
116 {
117 public:
118 settings_t(nlohmann::json& dict__)
119 : dict_(dict__)
120 {
121 }
122 /// Point density (in a.u.^-1) for interpolating radial integrals of the local part of pseudopotential
123 inline auto nprii_vloc() const
124 {
125 return dict_.at("/settings/nprii_vloc"_json_pointer).get<int>();
126 }
127 inline void nprii_vloc(int nprii_vloc__)
128 {
129 if (dict_.contains("locked")) {
130 throw std::runtime_error(locked_msg);
131 }
132 dict_["/settings/nprii_vloc"_json_pointer] = nprii_vloc__;
133 }
134 /// Point density (in a.u.^-1) for interpolating radial integrals of the beta projectors
135 inline auto nprii_beta() const
136 {
137 return dict_.at("/settings/nprii_beta"_json_pointer).get<int>();
138 }
139 inline void nprii_beta(int nprii_beta__)
140 {
141 if (dict_.contains("locked")) {
142 throw std::runtime_error(locked_msg);
143 }
144 dict_["/settings/nprii_beta"_json_pointer] = nprii_beta__;
145 }
146 /// Point density (in a.u.^-1) for interpolating radial integrals of the augmentation operator
147 inline auto nprii_aug() const
148 {
149 return dict_.at("/settings/nprii_aug"_json_pointer).get<int>();
150 }
151 inline void nprii_aug(int nprii_aug__)
152 {
153 if (dict_.contains("locked")) {
154 throw std::runtime_error(locked_msg);
155 }
156 dict_["/settings/nprii_aug"_json_pointer] = nprii_aug__;
157 }
158 /// Point density (in a.u.^-1) for interpolating radial integrals of the core charge density
159 inline auto nprii_rho_core() const
160 {
161 return dict_.at("/settings/nprii_rho_core"_json_pointer).get<int>();
162 }
163 inline void nprii_rho_core(int nprii_rho_core__)
164 {
165 if (dict_.contains("locked")) {
166 throw std::runtime_error(locked_msg);
167 }
168 dict_["/settings/nprii_rho_core"_json_pointer] = nprii_rho_core__;
169 }
170 /// Update wave-functions in the Davdison solver even if they immediately satisfy the convergence criterion
171 inline auto always_update_wf() const
172 {
173 return dict_.at("/settings/always_update_wf"_json_pointer).get<bool>();
174 }
175 inline void always_update_wf(bool always_update_wf__)
176 {
177 if (dict_.contains("locked")) {
178 throw std::runtime_error(locked_msg);
179 }
180 dict_["/settings/always_update_wf"_json_pointer] = always_update_wf__;
181 }
182 /// Minimum value of allowed RMS for the mixer.
183 /**
184 Mixer will not mix functions if the RMS between previous and current functions is below this tolerance.
185 */
186 inline auto mixer_rms_min() const
187 {
188 return dict_.at("/settings/mixer_rms_min"_json_pointer).get<double>();
189 }
190 inline void mixer_rms_min(double mixer_rms_min__)
191 {
192 if (dict_.contains("locked")) {
193 throw std::runtime_error(locked_msg);
194 }
195 dict_["/settings/mixer_rms_min"_json_pointer] = mixer_rms_min__;
196 }
197 /// Minimum tolerance of the iterative solver.
198 inline auto itsol_tol_min() const
199 {
200 return dict_.at("/settings/itsol_tol_min"_json_pointer).get<double>();
201 }
202 inline void itsol_tol_min(double itsol_tol_min__)
203 {
204 if (dict_.contains("locked")) {
205 throw std::runtime_error(locked_msg);
206 }
207 dict_["/settings/itsol_tol_min"_json_pointer] = itsol_tol_min__;
208 }
209 /// Minimum occupancy below which the band is treated as being 'empty'
210 inline auto min_occupancy() const
211 {
212 return dict_.at("/settings/min_occupancy"_json_pointer).get<double>();
213 }
214 inline void min_occupancy(double min_occupancy__)
215 {
216 if (dict_.contains("locked")) {
217 throw std::runtime_error(locked_msg);
218 }
219 dict_["/settings/min_occupancy"_json_pointer] = min_occupancy__;
220 }
221 /// Fine control of the empty states tolerance.
222 /**
223 This is the ratio between the tolerance of empty and occupied states. Used in the code like this:
224 \code{.cpp}
225 // tolerance of occupied bands
226 double tol = ctx_.iterative_solver().energy_tolerance();
227 // final tolerance of empty bands
228 double empy_tol = std::max(tol * ctx_.settings().itsol_tol_ratio_, itso.empty_states_tolerance_);
229 \endcode
230 */
231 inline auto itsol_tol_ratio() const
232 {
233 return dict_.at("/settings/itsol_tol_ratio"_json_pointer).get<double>();
234 }
235 inline void itsol_tol_ratio(double itsol_tol_ratio__)
236 {
237 if (dict_.contains("locked")) {
238 throw std::runtime_error(locked_msg);
239 }
240 dict_["/settings/itsol_tol_ratio"_json_pointer] = itsol_tol_ratio__;
241 }
242 /// Scaling parameters of the iterative solver tolerance.
243 /**
244 First number is the scaling of density RMS, that gives the estimate of the new
245 tolerance. Second number is the scaling of the old tolerance. New tolerance is then the minimum
246 between the two. This is how it is done in the code:
247 \code{.cpp}
248 double old_tol = ctx_.iterative_solver_tolerance();
249 // estimate new tolerance of iterative solver
250 double tol = std::min(ctx_.settings().itsol_tol_scale_[0] * rms, ctx_.settings().itsol_tol_scale_[1] * old_tol);
251 tol = std::max(ctx_.settings().itsol_tol_min_, tol);
252 // set new tolerance of iterative solver
253 ctx_.iterative_solver().energy_tolerance(tol);\endcode
254 */
255 inline auto itsol_tol_scale() const
256 {
257 return dict_.at("/settings/itsol_tol_scale"_json_pointer).get<std::array<double, 2>>();
258 }
259 inline void itsol_tol_scale(std::array<double, 2> itsol_tol_scale__)
260 {
261 if (dict_.contains("locked")) {
262 throw std::runtime_error(locked_msg);
263 }
264 dict_["/settings/itsol_tol_scale"_json_pointer] = itsol_tol_scale__;
265 }
266 /// Tolerance to recompute the LAPW linearisation energies.
267 inline auto auto_enu_tol() const
268 {
269 return dict_.at("/settings/auto_enu_tol"_json_pointer).get<double>();
270 }
271 inline void auto_enu_tol(double auto_enu_tol__)
272 {
273 if (dict_.contains("locked")) {
274 throw std::runtime_error(locked_msg);
275 }
276 dict_["/settings/auto_enu_tol"_json_pointer] = auto_enu_tol__;
277 }
278 /// Initial dimenstions for the fine-grain FFT grid
279 inline auto fft_grid_size() const
280 {
281 return dict_.at("/settings/fft_grid_size"_json_pointer).get<std::array<int, 3>>();
282 }
283 inline void fft_grid_size(std::array<int, 3> fft_grid_size__)
284 {
285 if (dict_.contains("locked")) {
286 throw std::runtime_error(locked_msg);
287 }
288 dict_["/settings/fft_grid_size"_json_pointer] = fft_grid_size__;
289 }
290 /// Default radial grid for LAPW species.
291 inline auto radial_grid() const
292 {
293 return dict_.at("/settings/radial_grid"_json_pointer).get<std::string>();
294 }
295 inline void radial_grid(std::string radial_grid__)
296 {
297 if (dict_.contains("locked")) {
298 throw std::runtime_error(locked_msg);
299 }
300 dict_["/settings/radial_grid"_json_pointer] = radial_grid__;
301 }
302 /// Coverage of sphere in case of spherical harmonics transformation
303 /**
304 0 is Lebedev-Laikov coverage, 1 is unifrom coverage
305 */
306 inline auto sht_coverage() const
307 {
308 return dict_.at("/settings/sht_coverage"_json_pointer).get<int>();
309 }
310 inline void sht_coverage(int sht_coverage__)
311 {
312 if (dict_.contains("locked")) {
313 throw std::runtime_error(locked_msg);
314 }
315 dict_["/settings/sht_coverage"_json_pointer] = sht_coverage__;
316 }
317 /// Density RMS tolerance to switch to FP64 implementation. If zero, estimation of iterative solver tolerance is used.
318 inline auto fp32_to_fp64_rms() const
319 {
320 return dict_.at("/settings/fp32_to_fp64_rms"_json_pointer).get<double>();
321 }
322 inline void fp32_to_fp64_rms(double fp32_to_fp64_rms__)
323 {
324 if (dict_.contains("locked")) {
325 throw std::runtime_error(locked_msg);
326 }
327 dict_["/settings/fp32_to_fp64_rms"_json_pointer] = fp32_to_fp64_rms__;
328 }
329 private:
330 nlohmann::json& dict_;
331 };
332 inline auto const& settings() const {return settings_;}
333 inline auto& settings() {return settings_;}
334 /// Unit cell representation
336 {
337 public:
338 unit_cell_t(nlohmann::json& dict__)
339 : dict_(dict__)
340 {
341 }
342 /// Three non-collinear vectors of the primitive unit cell.
343 inline auto lattice_vectors() const
344 {
345 return dict_.at("/unit_cell/lattice_vectors"_json_pointer).get<std::array<std::array<double, 3>, 3>>();
346 }
347 inline void lattice_vectors(std::array<std::array<double, 3>, 3> lattice_vectors__)
348 {
349 if (dict_.contains("locked")) {
350 throw std::runtime_error(locked_msg);
351 }
352 dict_["/unit_cell/lattice_vectors"_json_pointer] = lattice_vectors__;
353 }
354 /// Scaling factor for the lattice vectors
355 /**
356 Lattice vectors are multiplied by this constant.
357 */
358 inline auto lattice_vectors_scale() const
359 {
360 return dict_.at("/unit_cell/lattice_vectors_scale"_json_pointer).get<double>();
361 }
362 inline void lattice_vectors_scale(double lattice_vectors_scale__)
363 {
364 if (dict_.contains("locked")) {
365 throw std::runtime_error(locked_msg);
366 }
367 dict_["/unit_cell/lattice_vectors_scale"_json_pointer] = lattice_vectors_scale__;
368 }
369 /// Type of atomic coordinates: lattice, atomic units or Angstroms
370 inline auto atom_coordinate_units() const
371 {
372 return dict_.at("/unit_cell/atom_coordinate_units"_json_pointer).get<std::string>();
373 }
374 inline void atom_coordinate_units(std::string atom_coordinate_units__)
375 {
376 if (dict_.contains("locked")) {
377 throw std::runtime_error(locked_msg);
378 }
379 dict_["/unit_cell/atom_coordinate_units"_json_pointer] = atom_coordinate_units__;
380 }
381 /// List of atom type labels
382 inline auto atom_types() const
383 {
384 return dict_.at("/unit_cell/atom_types"_json_pointer).get<std::vector<std::string>>();
385 }
386 inline void atom_types(std::vector<std::string> atom_types__)
387 {
388 if (dict_.contains("locked")) {
389 throw std::runtime_error(locked_msg);
390 }
391 dict_["/unit_cell/atom_types"_json_pointer] = atom_types__;
392 }
393 /// Mapping between atom type labels and atomic files
394 inline auto atom_files(std::string label__) const
395 {
396 nlohmann::json::json_pointer p("/unit_cell/atom_files");
397 return dict_.at(p / label__).get<std::string>();
398 }
399 /// Atomic coordinates
400 inline auto atoms(std::string label__) const
401 {
402 nlohmann::json::json_pointer p("/unit_cell/atoms");
403 return dict_.at(p / label__).get<std::vector<std::vector<double>>>();
404 }
405 private:
406 nlohmann::json& dict_;
407 };
408 inline auto const& unit_cell() const {return unit_cell_;}
409 inline auto& unit_cell() {return unit_cell_;}
410 /// Parameters of the iterative solver.
412 {
413 public:
414 iterative_solver_t(nlohmann::json& dict__)
415 : dict_(dict__)
416 {
417 }
418 /// Type of the iterative solver.
419 inline auto type() const
420 {
421 return dict_.at("/iterative_solver/type"_json_pointer).get<std::string>();
422 }
423 inline void type(std::string type__)
424 {
425 if (dict_.contains("locked")) {
426 throw std::runtime_error(locked_msg);
427 }
428 dict_["/iterative_solver/type"_json_pointer] = type__;
429 }
430 /// Number of steps (iterations) of the solver.
431 inline auto num_steps() const
432 {
433 return dict_.at("/iterative_solver/num_steps"_json_pointer).get<int>();
434 }
435 inline void num_steps(int num_steps__)
436 {
437 if (dict_.contains("locked")) {
438 throw std::runtime_error(locked_msg);
439 }
440 dict_["/iterative_solver/num_steps"_json_pointer] = num_steps__;
441 }
442 /// Size of the variational subspace is this number times the number of bands.
443 inline auto subspace_size() const
444 {
445 return dict_.at("/iterative_solver/subspace_size"_json_pointer).get<int>();
446 }
447 inline void subspace_size(int subspace_size__)
448 {
449 if (dict_.contains("locked")) {
450 throw std::runtime_error(locked_msg);
451 }
452 dict_["/iterative_solver/subspace_size"_json_pointer] = subspace_size__;
453 }
454 /// Lock eigenvectors of the smallest eigenvalues when they have converged at restart.
455 inline auto locking() const
456 {
457 return dict_.at("/iterative_solver/locking"_json_pointer).get<bool>();
458 }
459 inline void locking(bool locking__)
460 {
461 if (dict_.contains("locked")) {
462 throw std::runtime_error(locked_msg);
463 }
464 dict_["/iterative_solver/locking"_json_pointer] = locking__;
465 }
466 /// Restart early when the ratio unconverged vs lockable vectors drops below this threshold.
467 /**
468 When there's just a few vectors left unconverged, it can be more efficient to lock the converged ones,
469 such that the dense eigenproblem solved in each Davidson iteration has lower dimension.
470 Restarting has some overhead in that it requires updating wave functions.
471 */
472 inline auto early_restart() const
473 {
474 return dict_.at("/iterative_solver/early_restart"_json_pointer).get<double>();
475 }
476 inline void early_restart(double early_restart__)
477 {
478 if (dict_.contains("locked")) {
479 throw std::runtime_error(locked_msg);
480 }
481 dict_["/iterative_solver/early_restart"_json_pointer] = early_restart__;
482 }
483 /// Tolerance for the eigen-energy difference \f$ |\epsilon_i^{old} - \epsilon_i^{new} | \f$
484 /**
485 This parameter is reduced during the SCF cycle to reach the high accuracy of the wave-functions.
486 */
487 inline auto energy_tolerance() const
488 {
489 return dict_.at("/iterative_solver/energy_tolerance"_json_pointer).get<double>();
490 }
491 inline void energy_tolerance(double energy_tolerance__)
492 {
493 if (dict_.contains("locked")) {
494 throw std::runtime_error(locked_msg);
495 }
496 dict_["/iterative_solver/energy_tolerance"_json_pointer] = energy_tolerance__;
497 }
498 /// Tolerance for the residual L2 norm.
499 inline auto residual_tolerance() const
500 {
501 return dict_.at("/iterative_solver/residual_tolerance"_json_pointer).get<double>();
502 }
503 inline void residual_tolerance(double residual_tolerance__)
504 {
505 if (dict_.contains("locked")) {
506 throw std::runtime_error(locked_msg);
507 }
508 dict_["/iterative_solver/residual_tolerance"_json_pointer] = residual_tolerance__;
509 }
510 /// Relative tolerance for the residual L2 norm. (0 means this criterion is effectively not used.
511 inline auto relative_tolerance() const
512 {
513 return dict_.at("/iterative_solver/relative_tolerance"_json_pointer).get<double>();
514 }
515 inline void relative_tolerance(double relative_tolerance__)
516 {
517 if (dict_.contains("locked")) {
518 throw std::runtime_error(locked_msg);
519 }
520 dict_["/iterative_solver/relative_tolerance"_json_pointer] = relative_tolerance__;
521 }
522 /// Additional tolerance for empty states.
523 /**
524 Setting this variable to 0 will treat empty states with the same tolerance as occupied states.
525 */
526 inline auto empty_states_tolerance() const
527 {
528 return dict_.at("/iterative_solver/empty_states_tolerance"_json_pointer).get<double>();
529 }
530 inline void empty_states_tolerance(double empty_states_tolerance__)
531 {
532 if (dict_.contains("locked")) {
533 throw std::runtime_error(locked_msg);
534 }
535 dict_["/iterative_solver/empty_states_tolerance"_json_pointer] = empty_states_tolerance__;
536 }
537 /// Defines the flavour of the iterative solver.
538 /**
539 If converge_by_energy is set to 0, then the residuals are estimated by their norm. If converge_by_energy
540 is set to 1 then the residuals are estimated by the eigen-energy difference. This allows to estimate the
541 unconverged residuals and then compute only the unconverged ones.
542 */
543 inline auto converge_by_energy() const
544 {
545 return dict_.at("/iterative_solver/converge_by_energy"_json_pointer).get<int>();
546 }
547 inline void converge_by_energy(int converge_by_energy__)
548 {
549 if (dict_.contains("locked")) {
550 throw std::runtime_error(locked_msg);
551 }
552 dict_["/iterative_solver/converge_by_energy"_json_pointer] = converge_by_energy__;
553 }
554 /// Minimum number of residuals to continue iterative diagonalization process.
555 inline auto min_num_res() const
556 {
557 return dict_.at("/iterative_solver/min_num_res"_json_pointer).get<int>();
558 }
559 inline void min_num_res(int min_num_res__)
560 {
561 if (dict_.contains("locked")) {
562 throw std::runtime_error(locked_msg);
563 }
564 dict_["/iterative_solver/min_num_res"_json_pointer] = min_num_res__;
565 }
566 /// Number of singular components for the LAPW Davidson solver.
567 /**
568 Singular components are the eigen-vectors of the APW-APW block of overlap matrix
569 */
570 inline auto num_singular() const
571 {
572 return dict_.at("/iterative_solver/num_singular"_json_pointer).get<int>();
573 }
574 inline void num_singular(int num_singular__)
575 {
576 if (dict_.contains("locked")) {
577 throw std::runtime_error(locked_msg);
578 }
579 dict_["/iterative_solver/num_singular"_json_pointer] = num_singular__;
580 }
581 /// Initialize eigen-values with previous (old) values.
582 inline auto init_eval_old() const
583 {
584 return dict_.at("/iterative_solver/init_eval_old"_json_pointer).get<bool>();
585 }
586 inline void init_eval_old(bool init_eval_old__)
587 {
588 if (dict_.contains("locked")) {
589 throw std::runtime_error(locked_msg);
590 }
591 dict_["/iterative_solver/init_eval_old"_json_pointer] = init_eval_old__;
592 }
593 /// Tell how to initialize the subspace.
594 /**
595 It can be either 'lcao', i.e. start from the linear combination of atomic orbitals or
596 'random'- start from the randomized wave functions.
597 */
598 inline auto init_subspace() const
599 {
600 return dict_.at("/iterative_solver/init_subspace"_json_pointer).get<std::string>();
601 }
602 inline void init_subspace(std::string init_subspace__)
603 {
604 if (dict_.contains("locked")) {
605 throw std::runtime_error(locked_msg);
606 }
607 dict_["/iterative_solver/init_subspace"_json_pointer] = init_subspace__;
608 }
609 /// Orthogonalize the new subspace basis functions one more time in order to improve the numerical stability.
610 inline auto extra_ortho() const
611 {
612 return dict_.at("/iterative_solver/extra_ortho"_json_pointer).get<bool>();
613 }
614 inline void extra_ortho(bool extra_ortho__)
615 {
616 if (dict_.contains("locked")) {
617 throw std::runtime_error(locked_msg);
618 }
619 dict_["/iterative_solver/extra_ortho"_json_pointer] = extra_ortho__;
620 }
621 private:
622 nlohmann::json& dict_;
623 };
624 inline auto const& iterative_solver() const {return iterative_solver_;}
625 inline auto& iterative_solver() {return iterative_solver_;}
626 /// Control parameters
627 /**
628 Parameters of the control input sections do not in general change the numerics,
629 but instead control how the results are obtained. Changing parameters in control section should
630 not change the significant digits in final results.
631 */
633 {
634 public:
635 control_t(nlohmann::json& dict__)
636 : dict_(dict__)
637 {
638 }
639 /// the mpi grid is setting the parameters for blacs grid / band parallelisation, the rest going to k-point parallelization.
640 inline auto mpi_grid_dims() const
641 {
642 return dict_.at("/control/mpi_grid_dims"_json_pointer).get<std::vector<int>>();
643 }
644 inline void mpi_grid_dims(std::vector<int> mpi_grid_dims__)
645 {
646 if (dict_.contains("locked")) {
647 throw std::runtime_error(locked_msg);
648 }
649 dict_["/control/mpi_grid_dims"_json_pointer] = mpi_grid_dims__;
650 }
651 /// Block size for ScaLAPACK, ELPA, and DLA-Future.
652 inline auto cyclic_block_size() const
653 {
654 return dict_.at("/control/cyclic_block_size"_json_pointer).get<int>();
655 }
656 inline void cyclic_block_size(int cyclic_block_size__)
657 {
658 if (dict_.contains("locked")) {
659 throw std::runtime_error(locked_msg);
660 }
661 dict_["/control/cyclic_block_size"_json_pointer] = cyclic_block_size__;
662 }
663 /// Reduce G-vectors by inversion symmetry.
664 /**
665 For real-valued functions like density and potential it is sufficient to store only
666 half of the G-vectors and use the relation f(G) = f^{*}(-G) to recover second half
667 of the plane-wave expansion coefficients.
668 */
669 inline auto reduce_gvec() const
670 {
671 return dict_.at("/control/reduce_gvec"_json_pointer).get<bool>();
672 }
673 inline void reduce_gvec(bool reduce_gvec__)
674 {
675 if (dict_.contains("locked")) {
676 throw std::runtime_error(locked_msg);
677 }
678 dict_["/control/reduce_gvec"_json_pointer] = reduce_gvec__;
679 }
680 /// Standard eigen-value solver to use.
681 inline auto std_evp_solver_name() const
682 {
683 return dict_.at("/control/std_evp_solver_name"_json_pointer).get<std::string>();
684 }
685 inline void std_evp_solver_name(std::string std_evp_solver_name__)
686 {
687 if (dict_.contains("locked")) {
688 throw std::runtime_error(locked_msg);
689 }
690 dict_["/control/std_evp_solver_name"_json_pointer] = std_evp_solver_name__;
691 }
692 /// Generalized eigen-value solver to use.
693 inline auto gen_evp_solver_name() const
694 {
695 return dict_.at("/control/gen_evp_solver_name"_json_pointer).get<std::string>();
696 }
697 inline void gen_evp_solver_name(std::string gen_evp_solver_name__)
698 {
699 if (dict_.contains("locked")) {
700 throw std::runtime_error(locked_msg);
701 }
702 dict_["/control/gen_evp_solver_name"_json_pointer] = gen_evp_solver_name__;
703 }
704 /// Coarse grid FFT mode (`serial` or `parallel`).
705 /**
706 Coarse FFT grid is used in application of the Hamiltonian to the wave-functions
707 and also in the construction of the charge density from the wave-functions squared.
708 */
709 inline auto fft_mode() const
710 {
711 return dict_.at("/control/fft_mode"_json_pointer).get<std::string>();
712 }
713 inline void fft_mode(std::string fft_mode__)
714 {
715 if (dict_.contains("locked")) {
716 throw std::runtime_error(locked_msg);
717 }
718 dict_["/control/fft_mode"_json_pointer] = fft_mode__;
719 }
720 /// Main processing unit to use during the execution.
721 inline auto processing_unit() const
722 {
723 return dict_.at("/control/processing_unit"_json_pointer).get<std::string>();
724 }
725 inline void processing_unit(std::string processing_unit__)
726 {
727 if (dict_.contains("locked")) {
728 throw std::runtime_error(locked_msg);
729 }
730 dict_["/control/processing_unit"_json_pointer] = processing_unit__;
731 }
732 /// Maximum allowed muffin-tin radius in case of LAPW.
733 inline auto rmt_max() const
734 {
735 return dict_.at("/control/rmt_max"_json_pointer).get<double>();
736 }
737 inline void rmt_max(double rmt_max__)
738 {
739 if (dict_.contains("locked")) {
740 throw std::runtime_error(locked_msg);
741 }
742 dict_["/control/rmt_max"_json_pointer] = rmt_max__;
743 }
744 /// Tolerance of the spglib in finding crystal symmetries
745 inline auto spglib_tolerance() const
746 {
747 return dict_.at("/control/spglib_tolerance"_json_pointer).get<double>();
748 }
749 inline void spglib_tolerance(double spglib_tolerance__)
750 {
751 if (dict_.contains("locked")) {
752 throw std::runtime_error(locked_msg);
753 }
754 dict_["/control/spglib_tolerance"_json_pointer] = spglib_tolerance__;
755 }
756 /// Level of verbosity.
757 /**
758 The following convention in proposed:
759 - 0: silent mode (no output is printed)
760 - 1: basic output (low level of output)
761 - 2: extended output (medium level of output)
762 - 3: extensive output (high level of output)
763 */
764 inline auto verbosity() const
765 {
766 return dict_.at("/control/verbosity"_json_pointer).get<int>();
767 }
768 inline void verbosity(int verbosity__)
769 {
770 if (dict_.contains("locked")) {
771 throw std::runtime_error(locked_msg);
772 }
773 dict_["/control/verbosity"_json_pointer] = verbosity__;
774 }
775 /// Level of internal verification.
776 /**
777 Depending on the level, more expensive self-checks will be performed.
778 */
779 inline auto verification() const
780 {
781 return dict_.at("/control/verification"_json_pointer).get<int>();
782 }
783 inline void verification(int verification__)
784 {
785 if (dict_.contains("locked")) {
786 throw std::runtime_error(locked_msg);
787 }
788 dict_["/control/verification"_json_pointer] = verification__;
789 }
790 /// Number of eigen-values that are printed to the standard output.
791 inline auto num_bands_to_print() const
792 {
793 return dict_.at("/control/num_bands_to_print"_json_pointer).get<int>();
794 }
795 inline void num_bands_to_print(int num_bands_to_print__)
796 {
797 if (dict_.contains("locked")) {
798 throw std::runtime_error(locked_msg);
799 }
800 dict_["/control/num_bands_to_print"_json_pointer] = num_bands_to_print__;
801 }
802 /// If true then the stress tensor components are printed at the end of SCF run.
803 inline auto print_stress() const
804 {
805 return dict_.at("/control/print_stress"_json_pointer).get<bool>();
806 }
807 inline void print_stress(bool print_stress__)
808 {
809 if (dict_.contains("locked")) {
810 throw std::runtime_error(locked_msg);
811 }
812 dict_["/control/print_stress"_json_pointer] = print_stress__;
813 }
814 /// If true then the atomic forces are printed at the end of SCF run.
815 inline auto print_forces() const
816 {
817 return dict_.at("/control/print_forces"_json_pointer).get<bool>();
818 }
819 inline void print_forces(bool print_forces__)
820 {
821 if (dict_.contains("locked")) {
822 throw std::runtime_error(locked_msg);
823 }
824 dict_["/control/print_forces"_json_pointer] = print_forces__;
825 }
826 /// If true then the list of nearest neighbours for each atom is printed to the standard output.
827 inline auto print_neighbors() const
828 {
829 return dict_.at("/control/print_neighbors"_json_pointer).get<bool>();
830 }
831 inline void print_neighbors(bool print_neighbors__)
832 {
833 if (dict_.contains("locked")) {
834 throw std::runtime_error(locked_msg);
835 }
836 dict_["/control/print_neighbors"_json_pointer] = print_neighbors__;
837 }
838 /// True if second-variational diagonalization is used in LAPW method.
839 inline auto use_second_variation() const
840 {
841 return dict_.at("/control/use_second_variation"_json_pointer).get<bool>();
842 }
843 inline void use_second_variation(bool use_second_variation__)
844 {
845 if (dict_.contains("locked")) {
846 throw std::runtime_error(locked_msg);
847 }
848 dict_["/control/use_second_variation"_json_pointer] = use_second_variation__;
849 }
850 /// Number of atoms in a chunk of beta-projectors.
851 inline auto beta_chunk_size() const
852 {
853 return dict_.at("/control/beta_chunk_size"_json_pointer).get<int>();
854 }
855 inline void beta_chunk_size(int beta_chunk_size__)
856 {
857 if (dict_.contains("locked")) {
858 throw std::runtime_error(locked_msg);
859 }
860 dict_["/control/beta_chunk_size"_json_pointer] = beta_chunk_size__;
861 }
862 /// Orthogonalize LAPW radial functions.
863 inline auto ortho_rf() const
864 {
865 return dict_.at("/control/ortho_rf"_json_pointer).get<bool>();
866 }
867 inline void ortho_rf(bool ortho_rf__)
868 {
869 if (dict_.contains("locked")) {
870 throw std::runtime_error(locked_msg);
871 }
872 dict_["/control/ortho_rf"_json_pointer] = ortho_rf__;
873 }
874 /// Type of the output stream (stdout:, file:name)
875 inline auto output() const
876 {
877 return dict_.at("/control/output"_json_pointer).get<std::string>();
878 }
879 inline void output(std::string output__)
880 {
881 if (dict_.contains("locked")) {
882 throw std::runtime_error(locked_msg);
883 }
884 dict_["/control/output"_json_pointer] = output__;
885 }
886 /// Split local G-vectors in chunks to reduce the GPU memory consumption of augmentation operator.
887 inline auto gvec_chunk_size() const
888 {
889 return dict_.at("/control/gvec_chunk_size"_json_pointer).get<int>();
890 }
891 inline void gvec_chunk_size(int gvec_chunk_size__)
892 {
893 if (dict_.contains("locked")) {
894 throw std::runtime_error(locked_msg);
895 }
896 dict_["/control/gvec_chunk_size"_json_pointer] = gvec_chunk_size__;
897 }
898 private:
899 nlohmann::json& dict_;
900 };
901 inline auto const& control() const {return control_;}
902 inline auto& control() {return control_;}
903 /// Parameters of the simulation.
904 /**
905 Most of this parameters control the behavior of high-level classes
906 like sirius::DFT_ground_state.
907 */
909 {
910 public:
911 parameters_t(nlohmann::json& dict__)
912 : dict_(dict__)
913 {
914 }
915 /// Type of electronic structure method.
916 inline auto electronic_structure_method() const
917 {
918 return dict_.at("/parameters/electronic_structure_method"_json_pointer).get<std::string>();
919 }
920 inline void electronic_structure_method(std::string electronic_structure_method__)
921 {
922 if (dict_.contains("locked")) {
923 throw std::runtime_error(locked_msg);
924 }
925 dict_["/parameters/electronic_structure_method"_json_pointer] = electronic_structure_method__;
926 }
927 /// List of XC functionals (typically contains exchange term and correlation term).
928 /**
929 Naming convention of LibXC is used, names should be provided in capital letters.
930 */
931 inline auto xc_functionals() const
932 {
933 return dict_.at("/parameters/xc_functionals"_json_pointer).get<std::vector<std::string>>();
934 }
935 inline void xc_functionals(std::vector<std::string> xc_functionals__)
936 {
937 if (dict_.contains("locked")) {
938 throw std::runtime_error(locked_msg);
939 }
940 dict_["/parameters/xc_functionals"_json_pointer] = xc_functionals__;
941 }
942 /// Type of core-states relativity in full-potential LAPW case.
943 inline auto core_relativity() const
944 {
945 return dict_.at("/parameters/core_relativity"_json_pointer).get<std::string>();
946 }
947 inline void core_relativity(std::string core_relativity__)
948 {
949 if (dict_.contains("locked")) {
950 throw std::runtime_error(locked_msg);
951 }
952 dict_["/parameters/core_relativity"_json_pointer] = core_relativity__;
953 }
954 /// Type of valence states relativity in full-potential LAPW case.
955 inline auto valence_relativity() const
956 {
957 return dict_.at("/parameters/valence_relativity"_json_pointer).get<std::string>();
958 }
959 inline void valence_relativity(std::string valence_relativity__)
960 {
961 if (dict_.contains("locked")) {
962 throw std::runtime_error(locked_msg);
963 }
964 dict_["/parameters/valence_relativity"_json_pointer] = valence_relativity__;
965 }
966 /// Number of bands.
967 /**
968 In spin-collinear case this is the number of bands for each spin channel.
969 */
970 inline auto num_bands() const
971 {
972 return dict_.at("/parameters/num_bands"_json_pointer).get<int>();
973 }
974 inline void num_bands(int num_bands__)
975 {
976 if (dict_.contains("locked")) {
977 throw std::runtime_error(locked_msg);
978 }
979 dict_["/parameters/num_bands"_json_pointer] = num_bands__;
980 }
981 /// Number of first-variational states.
982 inline auto num_fv_states() const
983 {
984 return dict_.at("/parameters/num_fv_states"_json_pointer).get<int>();
985 }
986 inline void num_fv_states(int num_fv_states__)
987 {
988 if (dict_.contains("locked")) {
989 throw std::runtime_error(locked_msg);
990 }
991 dict_["/parameters/num_fv_states"_json_pointer] = num_fv_states__;
992 }
993 /// Width of the smearing delta-function in the units of [Ha].
994 inline auto smearing_width() const
995 {
996 return dict_.at("/parameters/smearing_width"_json_pointer).get<double>();
997 }
998 inline void smearing_width(double smearing_width__)
999 {
1000 if (dict_.contains("locked")) {
1001 throw std::runtime_error(locked_msg);
1002 }
1003 dict_["/parameters/smearing_width"_json_pointer] = smearing_width__;
1004 }
1005 /// Type of occupancy smearing.
1006 inline auto smearing() const
1007 {
1008 return dict_.at("/parameters/smearing"_json_pointer).get<std::string>();
1009 }
1010 inline void smearing(std::string smearing__)
1011 {
1012 if (dict_.contains("locked")) {
1013 throw std::runtime_error(locked_msg);
1014 }
1015 dict_["/parameters/smearing"_json_pointer] = smearing__;
1016 }
1017 /// Cutoff for plane-waves (for density and potential expansion) in the units of [a.u.^-1]
1018 inline auto pw_cutoff() const
1019 {
1020 return dict_.at("/parameters/pw_cutoff"_json_pointer).get<double>();
1021 }
1022 inline void pw_cutoff(double pw_cutoff__)
1023 {
1024 if (dict_.contains("locked")) {
1025 throw std::runtime_error(locked_msg);
1026 }
1027 dict_["/parameters/pw_cutoff"_json_pointer] = pw_cutoff__;
1028 }
1029 /// Cutoff for augmented-wave functions.
1030 /**
1031 This value is equal to R_{MT} * |G+k|_{max}
1032 */
1033 inline auto aw_cutoff() const
1034 {
1035 return dict_.at("/parameters/aw_cutoff"_json_pointer).get<double>();
1036 }
1037 inline void aw_cutoff(double aw_cutoff__)
1038 {
1039 if (dict_.contains("locked")) {
1040 throw std::runtime_error(locked_msg);
1041 }
1042 dict_["/parameters/aw_cutoff"_json_pointer] = aw_cutoff__;
1043 }
1044 /// Cutoff for |G+k| plane-waves in the units of [a.u.^-1].
1045 inline auto gk_cutoff() const
1046 {
1047 return dict_.at("/parameters/gk_cutoff"_json_pointer).get<double>();
1048 }
1049 inline void gk_cutoff(double gk_cutoff__)
1050 {
1051 if (dict_.contains("locked")) {
1052 throw std::runtime_error(locked_msg);
1053 }
1054 dict_["/parameters/gk_cutoff"_json_pointer] = gk_cutoff__;
1055 }
1056 /// Maximum l for APW functions.
1057 inline auto lmax_apw() const
1058 {
1059 return dict_.at("/parameters/lmax_apw"_json_pointer).get<int>();
1060 }
1061 inline void lmax_apw(int lmax_apw__)
1062 {
1063 if (dict_.contains("locked")) {
1064 throw std::runtime_error(locked_msg);
1065 }
1066 dict_["/parameters/lmax_apw"_json_pointer] = lmax_apw__;
1067 }
1068 /// Maximum l for density expansion in real spherical harmonics.
1069 inline auto lmax_rho() const
1070 {
1071 return dict_.at("/parameters/lmax_rho"_json_pointer).get<int>();
1072 }
1073 inline void lmax_rho(int lmax_rho__)
1074 {
1075 if (dict_.contains("locked")) {
1076 throw std::runtime_error(locked_msg);
1077 }
1078 dict_["/parameters/lmax_rho"_json_pointer] = lmax_rho__;
1079 }
1080 /// Maximum l for potential expansion in real spherical harmonics.
1081 inline auto lmax_pot() const
1082 {
1083 return dict_.at("/parameters/lmax_pot"_json_pointer).get<int>();
1084 }
1085 inline void lmax_pot(int lmax_pot__)
1086 {
1087 if (dict_.contains("locked")) {
1088 throw std::runtime_error(locked_msg);
1089 }
1090 dict_["/parameters/lmax_pot"_json_pointer] = lmax_pot__;
1091 }
1092 /// Number of dimensions of the magnetization and effective magnetic field vector.
1093 inline auto num_mag_dims() const
1094 {
1095 return dict_.at("/parameters/num_mag_dims"_json_pointer).get<int>();
1096 }
1097 inline void num_mag_dims(int num_mag_dims__)
1098 {
1099 if (dict_.contains("locked")) {
1100 throw std::runtime_error(locked_msg);
1101 }
1102 dict_["/parameters/num_mag_dims"_json_pointer] = num_mag_dims__;
1103 }
1104 /// A choice of scaleing muffin-tin radii automatically.
1105 inline auto auto_rmt() const
1106 {
1107 return dict_.at("/parameters/auto_rmt"_json_pointer).get<int>();
1108 }
1109 inline void auto_rmt(int auto_rmt__)
1110 {
1111 if (dict_.contains("locked")) {
1112 throw std::runtime_error(locked_msg);
1113 }
1114 dict_["/parameters/auto_rmt"_json_pointer] = auto_rmt__;
1115 }
1116 /// Regular k-point grid for the SCF ground state.
1117 inline auto ngridk() const
1118 {
1119 return dict_.at("/parameters/ngridk"_json_pointer).get<std::array<int, 3>>();
1120 }
1121 inline void ngridk(std::array<int, 3> ngridk__)
1122 {
1123 if (dict_.contains("locked")) {
1124 throw std::runtime_error(locked_msg);
1125 }
1126 dict_["/parameters/ngridk"_json_pointer] = ngridk__;
1127 }
1128 /// Shift in the k-point grid.
1129 inline auto shiftk() const
1130 {
1131 return dict_.at("/parameters/shiftk"_json_pointer).get<std::array<int, 3>>();
1132 }
1133 inline void shiftk(std::array<int, 3> shiftk__)
1134 {
1135 if (dict_.contains("locked")) {
1136 throw std::runtime_error(locked_msg);
1137 }
1138 dict_["/parameters/shiftk"_json_pointer] = shiftk__;
1139 }
1140 /// Specific list of k-point coordinates.
1141 inline auto vk() const
1142 {
1143 return dict_.at("/parameters/vk"_json_pointer).get<std::vector<std::array<double, 3>>>();
1144 }
1145 inline void vk(std::vector<std::array<double, 3>> vk__)
1146 {
1147 if (dict_.contains("locked")) {
1148 throw std::runtime_error(locked_msg);
1149 }
1150 dict_["/parameters/vk"_json_pointer] = vk__;
1151 }
1152 /// Number of SCF iterations.
1153 inline auto num_dft_iter() const
1154 {
1155 return dict_.at("/parameters/num_dft_iter"_json_pointer).get<int>();
1156 }
1157 inline void num_dft_iter(int num_dft_iter__)
1158 {
1159 if (dict_.contains("locked")) {
1160 throw std::runtime_error(locked_msg);
1161 }
1162 dict_["/parameters/num_dft_iter"_json_pointer] = num_dft_iter__;
1163 }
1164 /// Tolerance in total energy change (in units of [Ha]).
1165 inline auto energy_tol() const
1166 {
1167 return dict_.at("/parameters/energy_tol"_json_pointer).get<double>();
1168 }
1169 inline void energy_tol(double energy_tol__)
1170 {
1171 if (dict_.contains("locked")) {
1172 throw std::runtime_error(locked_msg);
1173 }
1174 dict_["/parameters/energy_tol"_json_pointer] = energy_tol__;
1175 }
1176 /// Tolerance for the density mixing.
1177 inline auto density_tol() const
1178 {
1179 return dict_.at("/parameters/density_tol"_json_pointer).get<double>();
1180 }
1181 inline void density_tol(double density_tol__)
1182 {
1183 if (dict_.contains("locked")) {
1184 throw std::runtime_error(locked_msg);
1185 }
1186 dict_["/parameters/density_tol"_json_pointer] = density_tol__;
1187 }
1188 /// True if this is a molecule calculation.
1189 inline auto molecule() const
1190 {
1191 return dict_.at("/parameters/molecule"_json_pointer).get<bool>();
1192 }
1193 inline void molecule(bool molecule__)
1194 {
1195 if (dict_.contains("locked")) {
1196 throw std::runtime_error(locked_msg);
1197 }
1198 dict_["/parameters/molecule"_json_pointer] = molecule__;
1199 }
1200 /// True if gamma-point (real) version of the PW code is used.
1201 inline auto gamma_point() const
1202 {
1203 return dict_.at("/parameters/gamma_point"_json_pointer).get<bool>();
1204 }
1205 inline void gamma_point(bool gamma_point__)
1206 {
1207 if (dict_.contains("locked")) {
1208 throw std::runtime_error(locked_msg);
1209 }
1210 dict_["/parameters/gamma_point"_json_pointer] = gamma_point__;
1211 }
1212 /// True if spin-orbit correction is applied.
1213 inline auto so_correction() const
1214 {
1215 return dict_.at("/parameters/so_correction"_json_pointer).get<bool>();
1216 }
1217 inline void so_correction(bool so_correction__)
1218 {
1219 if (dict_.contains("locked")) {
1220 throw std::runtime_error(locked_msg);
1221 }
1222 dict_["/parameters/so_correction"_json_pointer] = so_correction__;
1223 }
1224 /// True if Hubbard U correction is applied.
1225 inline auto hubbard_correction() const
1226 {
1227 return dict_.at("/parameters/hubbard_correction"_json_pointer).get<bool>();
1228 }
1229 inline void hubbard_correction(bool hubbard_correction__)
1230 {
1231 if (dict_.contains("locked")) {
1232 throw std::runtime_error(locked_msg);
1233 }
1234 dict_["/parameters/hubbard_correction"_json_pointer] = hubbard_correction__;
1235 }
1236 /// True if symmetry is used.
1237 inline auto use_symmetry() const
1238 {
1239 return dict_.at("/parameters/use_symmetry"_json_pointer).get<bool>();
1240 }
1241 inline void use_symmetry(bool use_symmetry__)
1242 {
1243 if (dict_.contains("locked")) {
1244 throw std::runtime_error(locked_msg);
1245 }
1246 dict_["/parameters/use_symmetry"_json_pointer] = use_symmetry__;
1247 }
1248 /// Use irreducible Brillouin zone.
1249 inline auto use_ibz() const
1250 {
1251 return dict_.at("/parameters/use_ibz"_json_pointer).get<bool>();
1252 }
1253 inline void use_ibz(bool use_ibz__)
1254 {
1255 if (dict_.contains("locked")) {
1256 throw std::runtime_error(locked_msg);
1257 }
1258 dict_["/parameters/use_ibz"_json_pointer] = use_ibz__;
1259 }
1260 /// Radius of atom nearest-neighbour cluster.
1261 inline auto nn_radius() const
1262 {
1263 return dict_.at("/parameters/nn_radius"_json_pointer).get<double>();
1264 }
1265 inline void nn_radius(double nn_radius__)
1266 {
1267 if (dict_.contains("locked")) {
1268 throw std::runtime_error(locked_msg);
1269 }
1270 dict_["/parameters/nn_radius"_json_pointer] = nn_radius__;
1271 }
1272 /// Reduction of the auxiliary magnetic field at each SCF step.
1273 inline auto reduce_aux_bf() const
1274 {
1275 return dict_.at("/parameters/reduce_aux_bf"_json_pointer).get<double>();
1276 }
1277 inline void reduce_aux_bf(double reduce_aux_bf__)
1278 {
1279 if (dict_.contains("locked")) {
1280 throw std::runtime_error(locked_msg);
1281 }
1282 dict_["/parameters/reduce_aux_bf"_json_pointer] = reduce_aux_bf__;
1283 }
1284 /// Introduce extra charge to the system. Positive charge means extra holes, negative charge - extra electrons.
1285 inline auto extra_charge() const
1286 {
1287 return dict_.at("/parameters/extra_charge"_json_pointer).get<double>();
1288 }
1289 inline void extra_charge(double extra_charge__)
1290 {
1291 if (dict_.contains("locked")) {
1292 throw std::runtime_error(locked_msg);
1293 }
1294 dict_["/parameters/extra_charge"_json_pointer] = extra_charge__;
1295 }
1296 /// XC density threshold (debug purposes).
1297 inline auto xc_dens_tre() const
1298 {
1299 return dict_.at("/parameters/xc_dens_tre"_json_pointer).get<double>();
1300 }
1301 inline void xc_dens_tre(double xc_dens_tre__)
1302 {
1303 if (dict_.contains("locked")) {
1304 throw std::runtime_error(locked_msg);
1305 }
1306 dict_["/parameters/xc_dens_tre"_json_pointer] = xc_dens_tre__;
1307 }
1308 /// True if SCF correction to total energy should be computed.
1309 inline auto use_scf_correction() const
1310 {
1311 return dict_.at("/parameters/use_scf_correction"_json_pointer).get<bool>();
1312 }
1313 inline void use_scf_correction(bool use_scf_correction__)
1314 {
1315 if (dict_.contains("locked")) {
1316 throw std::runtime_error(locked_msg);
1317 }
1318 dict_["/parameters/use_scf_correction"_json_pointer] = use_scf_correction__;
1319 }
1320 /// The floating point precision of the Kohn-Sham wave-functions.
1321 inline auto precision_wf() const
1322 {
1323 return dict_.at("/parameters/precision_wf"_json_pointer).get<std::string>();
1324 }
1325 inline void precision_wf(std::string precision_wf__)
1326 {
1327 if (dict_.contains("locked")) {
1328 throw std::runtime_error(locked_msg);
1329 }
1330 dict_["/parameters/precision_wf"_json_pointer] = precision_wf__;
1331 }
1332 /// The floating point precision of the Hamiltonian subspace matrices.
1333 inline auto precision_hs() const
1334 {
1335 return dict_.at("/parameters/precision_hs"_json_pointer).get<std::string>();
1336 }
1337 inline void precision_hs(std::string precision_hs__)
1338 {
1339 if (dict_.contains("locked")) {
1340 throw std::runtime_error(locked_msg);
1341 }
1342 dict_["/parameters/precision_hs"_json_pointer] = precision_hs__;
1343 }
1344 /// The final floating point precision of the ground state DFT calculation (dev options).
1345 inline auto precision_gs() const
1346 {
1347 return dict_.at("/parameters/precision_gs"_json_pointer).get<std::string>();
1348 }
1349 inline void precision_gs(std::string precision_gs__)
1350 {
1351 if (dict_.contains("locked")) {
1352 throw std::runtime_error(locked_msg);
1353 }
1354 dict_["/parameters/precision_gs"_json_pointer] = precision_gs__;
1355 }
1356 private:
1357 nlohmann::json& dict_;
1358 };
1359 inline auto const& parameters() const {return parameters_;}
1360 inline auto& parameters() {return parameters_;}
1361 /// Non-linear conjugate gradient minimisation
1363 {
1364 public:
1365 nlcg_t(nlohmann::json& dict__)
1366 : dict_(dict__)
1367 {
1368 }
1369 /// Maximum number of CG iterations
1370 inline auto maxiter() const
1371 {
1372 return dict_.at("/nlcg/maxiter"_json_pointer).get<int>();
1373 }
1374 inline void maxiter(int maxiter__)
1375 {
1376 if (dict_.contains("locked")) {
1377 throw std::runtime_error(locked_msg);
1378 }
1379 dict_["/nlcg/maxiter"_json_pointer] = maxiter__;
1380 }
1381 /// CG restart
1382 inline auto restart() const
1383 {
1384 return dict_.at("/nlcg/restart"_json_pointer).get<int>();
1385 }
1386 inline void restart(int restart__)
1387 {
1388 if (dict_.contains("locked")) {
1389 throw std::runtime_error(locked_msg);
1390 }
1391 dict_["/nlcg/restart"_json_pointer] = restart__;
1392 }
1393 /// Backtracking search, step parameter
1394 inline auto tau() const
1395 {
1396 return dict_.at("/nlcg/tau"_json_pointer).get<double>();
1397 }
1398 inline void tau(double tau__)
1399 {
1400 if (dict_.contains("locked")) {
1401 throw std::runtime_error(locked_msg);
1402 }
1403 dict_["/nlcg/tau"_json_pointer] = tau__;
1404 }
1405 /// Temperature in Kelvin
1406 inline auto T() const
1407 {
1408 return dict_.at("/nlcg/T"_json_pointer).get<double>();
1409 }
1410 inline void T(double T__)
1411 {
1412 if (dict_.contains("locked")) {
1413 throw std::runtime_error(locked_msg);
1414 }
1415 dict_["/nlcg/T"_json_pointer] = T__;
1416 }
1417 /// Scalar preconditioning of pseudo Hamiltonian
1418 inline auto kappa() const
1419 {
1420 return dict_.at("/nlcg/kappa"_json_pointer).get<double>();
1421 }
1422 inline void kappa(double kappa__)
1423 {
1424 if (dict_.contains("locked")) {
1425 throw std::runtime_error(locked_msg);
1426 }
1427 dict_["/nlcg/kappa"_json_pointer] = kappa__;
1428 }
1429 /// CG tolerance
1430 inline auto tol() const
1431 {
1432 return dict_.at("/nlcg/tol"_json_pointer).get<double>();
1433 }
1434 inline void tol(double tol__)
1435 {
1436 if (dict_.contains("locked")) {
1437 throw std::runtime_error(locked_msg);
1438 }
1439 dict_["/nlcg/tol"_json_pointer] = tol__;
1440 }
1441 /// NLCG processing unit
1442 inline auto processing_unit() const
1443 {
1444 return dict_.at("/nlcg/processing_unit"_json_pointer).get<std::string>();
1445 }
1446 inline void processing_unit(std::string processing_unit__)
1447 {
1448 if (dict_.contains("locked")) {
1449 throw std::runtime_error(locked_msg);
1450 }
1451 dict_["/nlcg/processing_unit"_json_pointer] = processing_unit__;
1452 }
1453 private:
1454 nlohmann::json& dict_;
1455 };
1456 inline auto const& nlcg() const {return nlcg_;}
1457 inline auto& nlcg() {return nlcg_;}
1458 /// Variable cell shape stabilized quasi Newton method (VC-SQNM)
1460 {
1461 public:
1462 vcsqnm_t(nlohmann::json& dict__)
1463 : dict_(dict__)
1464 {
1465 }
1466 /// Initial step size
1467 inline auto initial_step_size() const
1468 {
1469 return dict_.at("/vcsqnm/initial_step_size"_json_pointer).get<double>();
1470 }
1471 inline void initial_step_size(double initial_step_size__)
1472 {
1473 if (dict_.contains("locked")) {
1474 throw std::runtime_error(locked_msg);
1475 }
1476 dict_["/vcsqnm/initial_step_size"_json_pointer] = initial_step_size__;
1477 }
1478 /// Maximal number of steps that will be stored in the history list
1479 inline auto nhist_max() const
1480 {
1481 return dict_.at("/vcsqnm/nhist_max"_json_pointer).get<int>();
1482 }
1483 inline void nhist_max(int nhist_max__)
1484 {
1485 if (dict_.contains("locked")) {
1486 throw std::runtime_error(locked_msg);
1487 }
1488 dict_["/vcsqnm/nhist_max"_json_pointer] = nhist_max__;
1489 }
1490 /// Weight / size of the supercell that is used to transform lattice derivatives. Use a value between 1 and 2.
1491 inline auto lattice_weight() const
1492 {
1493 return dict_.at("/vcsqnm/lattice_weight"_json_pointer).get<double>();
1494 }
1495 inline void lattice_weight(double lattice_weight__)
1496 {
1497 if (dict_.contains("locked")) {
1498 throw std::runtime_error(locked_msg);
1499 }
1500 dict_["/vcsqnm/lattice_weight"_json_pointer] = lattice_weight__;
1501 }
1502 /// Lower limit on the step size
1503 inline auto alpha0() const
1504 {
1505 return dict_.at("/vcsqnm/alpha0"_json_pointer).get<double>();
1506 }
1507 inline void alpha0(double alpha0__)
1508 {
1509 if (dict_.contains("locked")) {
1510 throw std::runtime_error(locked_msg);
1511 }
1512 dict_["/vcsqnm/alpha0"_json_pointer] = alpha0__;
1513 }
1514 /// Lower limit on linear dependencies of basis vectors in history list
1515 inline auto eps_subsp() const
1516 {
1517 return dict_.at("/vcsqnm/eps_subsp"_json_pointer).get<double>();
1518 }
1519 inline void eps_subsp(double eps_subsp__)
1520 {
1521 if (dict_.contains("locked")) {
1522 throw std::runtime_error(locked_msg);
1523 }
1524 dict_["/vcsqnm/eps_subsp"_json_pointer] = eps_subsp__;
1525 }
1526 /// Total error tolerance on the atomic forces
1527 inline auto forces_tol() const
1528 {
1529 return dict_.at("/vcsqnm/forces_tol"_json_pointer).get<double>();
1530 }
1531 inline void forces_tol(double forces_tol__)
1532 {
1533 if (dict_.contains("locked")) {
1534 throw std::runtime_error(locked_msg);
1535 }
1536 dict_["/vcsqnm/forces_tol"_json_pointer] = forces_tol__;
1537 }
1538 /// Total error tolerance on the lattice stress
1539 inline auto stress_tol() const
1540 {
1541 return dict_.at("/vcsqnm/stress_tol"_json_pointer).get<double>();
1542 }
1543 inline void stress_tol(double stress_tol__)
1544 {
1545 if (dict_.contains("locked")) {
1546 throw std::runtime_error(locked_msg);
1547 }
1548 dict_["/vcsqnm/stress_tol"_json_pointer] = stress_tol__;
1549 }
1550 /// Number of lattice relaxation steps
1551 inline auto num_steps() const
1552 {
1553 return dict_.at("/vcsqnm/num_steps"_json_pointer).get<int>();
1554 }
1555 inline void num_steps(int num_steps__)
1556 {
1557 if (dict_.contains("locked")) {
1558 throw std::runtime_error(locked_msg);
1559 }
1560 dict_["/vcsqnm/num_steps"_json_pointer] = num_steps__;
1561 }
1562 private:
1563 nlohmann::json& dict_;
1564 };
1565 inline auto const& vcsqnm() const {return vcsqnm_;}
1566 inline auto& vcsqnm() {return vcsqnm_;}
1567 /// Hubbard U correction
1569 {
1570 public:
1571 hubbard_t(nlohmann::json& dict__)
1572 : dict_(dict__)
1573 {
1574 }
1575 /// If true, orthogonalization is applied to Hubbard orbitals.
1576 inline auto orthogonalize() const
1577 {
1578 return dict_.at("/hubbard/orthogonalize"_json_pointer).get<bool>();
1579 }
1580 inline void orthogonalize(bool orthogonalize__)
1581 {
1582 if (dict_.contains("locked")) {
1583 throw std::runtime_error(locked_msg);
1584 }
1585 dict_["/hubbard/orthogonalize"_json_pointer] = orthogonalize__;
1586 }
1587 /// If true, all atomic orbitals from all atoms are used to orthogonalize the hubbard subspace
1588 inline auto full_orthogonalization() const
1589 {
1590 return dict_.at("/hubbard/full_orthogonalization"_json_pointer).get<bool>();
1591 }
1592 inline void full_orthogonalization(bool full_orthogonalization__)
1593 {
1594 if (dict_.contains("locked")) {
1595 throw std::runtime_error(locked_msg);
1596 }
1597 dict_["/hubbard/full_orthogonalization"_json_pointer] = full_orthogonalization__;
1598 }
1599 /// If true, normalization is applied to Hubbard orbitals.
1600 inline auto normalize() const
1601 {
1602 return dict_.at("/hubbard/normalize"_json_pointer).get<bool>();
1603 }
1604 inline void normalize(bool normalize__)
1605 {
1606 if (dict_.contains("locked")) {
1607 throw std::runtime_error(locked_msg);
1608 }
1609 dict_["/hubbard/normalize"_json_pointer] = normalize__;
1610 }
1611 /// If true, simplified version of Hubbard correction is used.
1612 inline auto simplified() const
1613 {
1614 return dict_.at("/hubbard/simplified"_json_pointer).get<bool>();
1615 }
1616 inline void simplified(bool simplified__)
1617 {
1618 if (dict_.contains("locked")) {
1619 throw std::runtime_error(locked_msg);
1620 }
1621 dict_["/hubbard/simplified"_json_pointer] = simplified__;
1622 }
1623 /// Description of the on-site (local) Hubbard interaction
1625 {
1626 private:
1627 nlohmann::json& dict_;
1628 public:
1629 local_t(nlohmann::json& dict__)
1630 : dict_(dict__)
1631 {
1632 }
1633 auto atom_type() const
1634 {
1635 return dict_.at("atom_type").get<std::string>();
1636 }
1637 auto n() const
1638 {
1639 return dict_.at("n").get<int>();
1640 }
1641 auto l() const
1642 {
1643 return dict_.at("l").get<int>();
1644 }
1645 auto U() const
1646 {
1647 return dict_.at("U").get<double>();
1648 }
1649 auto J() const
1650 {
1651 return dict_.at("J").get<double>();
1652 }
1653 auto BE2() const
1654 {
1655 return dict_.at("BE2").get<double>();
1656 }
1657 auto E3() const
1658 {
1659 return dict_.at("E3").get<double>();
1660 }
1661 auto alpha() const
1662 {
1663 return dict_.at("alpha").get<double>();
1664 }
1665 auto beta() const
1666 {
1667 return dict_.at("beta").get<double>();
1668 }
1669 auto initial_occupancy() const
1670 {
1671 return dict_.at("initial_occupancy").get<std::vector<double>>();
1672 }
1673 auto total_initial_occupancy() const
1674 {
1675 return dict_.at("total_initial_occupancy").get<double>();
1676 }
1677 bool contains(std::string key__) const
1678 {
1679 return dict_.contains(key__);
1680 }
1681 };
1683 {
1684 private:
1685 nlohmann::json& dict_;
1686 public:
1687 local_list_t(nlohmann::json& dict__)
1688 : dict_(dict__)
1689 {
1690 }
1691 int size() const
1692 {
1693 return dict_.size();
1694 }
1695 void append(nlohmann::json& node__)
1696 {
1697 dict_.push_back(node__);
1698 }
1699 };
1700 local_t local(int idx__)
1701 {
1702 nlohmann::json::json_pointer ptr("/hubbard/local");
1703 return local_t(dict_.at(ptr / idx__));
1704 }
1705 local_t local(int idx__) const
1706 {
1707 nlohmann::json::json_pointer ptr("/hubbard/local");
1708 return local_t(dict_.at(ptr / idx__));
1709 }
1710 local_list_t local()
1711 {
1712 nlohmann::json::json_pointer ptr("/hubbard/local");
1713 return local_list_t(dict_.at(ptr));
1714 }
1715 local_list_t local() const
1716 {
1717 nlohmann::json::json_pointer ptr("/hubbard/local");
1718 return local_list_t(dict_.at(ptr));
1719 }
1720 /// Description of the off-site (nonlocal) Hubbard interaction
1722 {
1723 private:
1724 nlohmann::json& dict_;
1725 public:
1726 nonlocal_t(nlohmann::json& dict__)
1727 : dict_(dict__)
1728 {
1729 }
1730 auto atom_pair() const
1731 {
1732 return dict_.at("atom_pair").get<std::array<int, 2>>();
1733 }
1734 auto T() const
1735 {
1736 return dict_.at("T").get<std::array<int, 3>>();
1737 }
1738 auto n() const
1739 {
1740 return dict_.at("n").get<std::array<int, 2>>();
1741 }
1742 auto l() const
1743 {
1744 return dict_.at("l").get<std::array<int, 2>>();
1745 }
1746 auto V() const
1747 {
1748 return dict_.at("V").get<double>();
1749 }
1750 bool contains(std::string key__) const
1751 {
1752 return dict_.contains(key__);
1753 }
1754 };
1756 {
1757 private:
1758 nlohmann::json& dict_;
1759 public:
1760 nonlocal_list_t(nlohmann::json& dict__)
1761 : dict_(dict__)
1762 {
1763 }
1764 int size() const
1765 {
1766 return dict_.size();
1767 }
1768 void append(nlohmann::json& node__)
1769 {
1770 dict_.push_back(node__);
1771 }
1772 };
1773 nonlocal_t nonlocal(int idx__)
1774 {
1775 nlohmann::json::json_pointer ptr("/hubbard/nonlocal");
1776 return nonlocal_t(dict_.at(ptr / idx__));
1777 }
1778 nonlocal_t nonlocal(int idx__) const
1779 {
1780 nlohmann::json::json_pointer ptr("/hubbard/nonlocal");
1781 return nonlocal_t(dict_.at(ptr / idx__));
1782 }
1783 nonlocal_list_t nonlocal()
1784 {
1785 nlohmann::json::json_pointer ptr("/hubbard/nonlocal");
1786 return nonlocal_list_t(dict_.at(ptr));
1787 }
1788 nonlocal_list_t nonlocal() const
1789 {
1790 nlohmann::json::json_pointer ptr("/hubbard/nonlocal");
1791 return nonlocal_list_t(dict_.at(ptr));
1792 }
1793 private:
1794 nlohmann::json& dict_;
1795 };
1796 inline auto const& hubbard() const {return hubbard_;}
1797 inline auto& hubbard() {return hubbard_;}
1798 private:
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_};
1808 protected:
1809 nlohmann::json dict_;
1810};
1811
1812}
::nlohmann::json_pointer< StringType > json_pointer
JSON Pointer, see nlohmann::json_pointer.
Control parameters.
Definition: config.hpp:633
auto processing_unit() const
Main processing unit to use during the execution.
Definition: config.hpp:721
auto verbosity() const
Level of verbosity.
Definition: config.hpp:764
auto num_bands_to_print() const
Number of eigen-values that are printed to the standard output.
Definition: config.hpp:791
auto print_stress() const
If true then the stress tensor components are printed at the end of SCF run.
Definition: config.hpp:803
auto gvec_chunk_size() const
Split local G-vectors in chunks to reduce the GPU memory consumption of augmentation operator.
Definition: config.hpp:887
auto print_neighbors() const
If true then the list of nearest neighbours for each atom is printed to the standard output.
Definition: config.hpp:827
auto reduce_gvec() const
Reduce G-vectors by inversion symmetry.
Definition: config.hpp:669
auto verification() const
Level of internal verification.
Definition: config.hpp:779
auto beta_chunk_size() const
Number of atoms in a chunk of beta-projectors.
Definition: config.hpp:851
auto mpi_grid_dims() const
the mpi grid is setting the parameters for blacs grid / band parallelisation, the rest going to k-poi...
Definition: config.hpp:640
auto spglib_tolerance() const
Tolerance of the spglib in finding crystal symmetries.
Definition: config.hpp:745
auto fft_mode() const
Coarse grid FFT mode (serial or parallel).
Definition: config.hpp:709
auto print_forces() const
If true then the atomic forces are printed at the end of SCF run.
Definition: config.hpp:815
auto use_second_variation() const
True if second-variational diagonalization is used in LAPW method.
Definition: config.hpp:839
auto output() const
Type of the output stream (stdout:, file:name)
Definition: config.hpp:875
auto rmt_max() const
Maximum allowed muffin-tin radius in case of LAPW.
Definition: config.hpp:733
auto cyclic_block_size() const
Block size for ScaLAPACK, ELPA, and DLA-Future.
Definition: config.hpp:652
auto std_evp_solver_name() const
Standard eigen-value solver to use.
Definition: config.hpp:681
auto gen_evp_solver_name() const
Generalized eigen-value solver to use.
Definition: config.hpp:693
auto ortho_rf() const
Orthogonalize LAPW radial functions.
Definition: config.hpp:863
Description of the on-site (local) Hubbard interaction.
Definition: config.hpp:1625
Description of the off-site (nonlocal) Hubbard interaction.
Definition: config.hpp:1722
Hubbard U correction.
Definition: config.hpp:1569
auto simplified() const
If true, simplified version of Hubbard correction is used.
Definition: config.hpp:1612
auto normalize() const
If true, normalization is applied to Hubbard orbitals.
Definition: config.hpp:1600
auto orthogonalize() const
If true, orthogonalization is applied to Hubbard orbitals.
Definition: config.hpp:1576
auto full_orthogonalization() const
If true, all atomic orbitals from all atoms are used to orthogonalize the hubbard subspace.
Definition: config.hpp:1588
Parameters of the iterative solver.
Definition: config.hpp:412
auto extra_ortho() const
Orthogonalize the new subspace basis functions one more time in order to improve the numerical stabil...
Definition: config.hpp:610
auto type() const
Type of the iterative solver.
Definition: config.hpp:419
auto energy_tolerance() const
Tolerance for the eigen-energy difference .
Definition: config.hpp:487
auto locking() const
Lock eigenvectors of the smallest eigenvalues when they have converged at restart.
Definition: config.hpp:455
auto early_restart() const
Restart early when the ratio unconverged vs lockable vectors drops below this threshold.
Definition: config.hpp:472
auto init_subspace() const
Tell how to initialize the subspace.
Definition: config.hpp:598
auto converge_by_energy() const
Defines the flavour of the iterative solver.
Definition: config.hpp:543
auto num_singular() const
Number of singular components for the LAPW Davidson solver.
Definition: config.hpp:570
auto min_num_res() const
Minimum number of residuals to continue iterative diagonalization process.
Definition: config.hpp:555
auto subspace_size() const
Size of the variational subspace is this number times the number of bands.
Definition: config.hpp:443
auto init_eval_old() const
Initialize eigen-values with previous (old) values.
Definition: config.hpp:582
auto residual_tolerance() const
Tolerance for the residual L2 norm.
Definition: config.hpp:499
auto relative_tolerance() const
Relative tolerance for the residual L2 norm. (0 means this criterion is effectively not used.
Definition: config.hpp:511
auto num_steps() const
Number of steps (iterations) of the solver.
Definition: config.hpp:431
auto empty_states_tolerance() const
Additional tolerance for empty states.
Definition: config.hpp:526
Parameters of the mixer.
Definition: config.hpp:16
auto type() const
Type of the mixer.
Definition: config.hpp:23
auto linear_mix_rms_tol() const
RMS tolerance above which the linear mixing is triggered.
Definition: config.hpp:59
auto beta0() const
Mixing ratio in case of initial linear mixing.
Definition: config.hpp:47
auto beta() const
Mixing parameter.
Definition: config.hpp:35
auto beta_scaling_factor() const
Scaling factor for mixing parameter.
Definition: config.hpp:83
auto use_hartree() const
Use Hartree potential in the inner() product for residuals.
Definition: config.hpp:95
auto max_history() const
Number of history steps for Broyden-type mixers.
Definition: config.hpp:71
Non-linear conjugate gradient minimisation.
Definition: config.hpp:1363
auto tol() const
CG tolerance.
Definition: config.hpp:1430
auto processing_unit() const
NLCG processing unit.
Definition: config.hpp:1442
auto restart() const
CG restart.
Definition: config.hpp:1382
auto tau() const
Backtracking search, step parameter.
Definition: config.hpp:1394
auto kappa() const
Scalar preconditioning of pseudo Hamiltonian.
Definition: config.hpp:1418
auto T() const
Temperature in Kelvin.
Definition: config.hpp:1406
auto maxiter() const
Maximum number of CG iterations.
Definition: config.hpp:1370
Parameters of the simulation.
Definition: config.hpp:909
auto precision_hs() const
The floating point precision of the Hamiltonian subspace matrices.
Definition: config.hpp:1333
auto ngridk() const
Regular k-point grid for the SCF ground state.
Definition: config.hpp:1117
auto so_correction() const
True if spin-orbit correction is applied.
Definition: config.hpp:1213
auto precision_gs() const
The final floating point precision of the ground state DFT calculation (dev options).
Definition: config.hpp:1345
auto use_symmetry() const
True if symmetry is used.
Definition: config.hpp:1237
auto use_ibz() const
Use irreducible Brillouin zone.
Definition: config.hpp:1249
auto lmax_rho() const
Maximum l for density expansion in real spherical harmonics.
Definition: config.hpp:1069
auto auto_rmt() const
A choice of scaleing muffin-tin radii automatically.
Definition: config.hpp:1105
auto pw_cutoff() const
Cutoff for plane-waves (for density and potential expansion) in the units of [a.u....
Definition: config.hpp:1018
auto energy_tol() const
Tolerance in total energy change (in units of [Ha]).
Definition: config.hpp:1165
auto lmax_apw() const
Maximum l for APW functions.
Definition: config.hpp:1057
auto xc_functionals() const
List of XC functionals (typically contains exchange term and correlation term).
Definition: config.hpp:931
auto hubbard_correction() const
True if Hubbard U correction is applied.
Definition: config.hpp:1225
auto num_bands() const
Number of bands.
Definition: config.hpp:970
auto num_mag_dims() const
Number of dimensions of the magnetization and effective magnetic field vector.
Definition: config.hpp:1093
auto extra_charge() const
Introduce extra charge to the system. Positive charge means extra holes, negative charge - extra elec...
Definition: config.hpp:1285
auto core_relativity() const
Type of core-states relativity in full-potential LAPW case.
Definition: config.hpp:943
auto shiftk() const
Shift in the k-point grid.
Definition: config.hpp:1129
auto aw_cutoff() const
Cutoff for augmented-wave functions.
Definition: config.hpp:1033
auto reduce_aux_bf() const
Reduction of the auxiliary magnetic field at each SCF step.
Definition: config.hpp:1273
auto electronic_structure_method() const
Type of electronic structure method.
Definition: config.hpp:916
auto nn_radius() const
Radius of atom nearest-neighbour cluster.
Definition: config.hpp:1261
auto valence_relativity() const
Type of valence states relativity in full-potential LAPW case.
Definition: config.hpp:955
auto molecule() const
True if this is a molecule calculation.
Definition: config.hpp:1189
auto vk() const
Specific list of k-point coordinates.
Definition: config.hpp:1141
auto num_dft_iter() const
Number of SCF iterations.
Definition: config.hpp:1153
auto gk_cutoff() const
Cutoff for |G+k| plane-waves in the units of [a.u.^-1].
Definition: config.hpp:1045
auto smearing_width() const
Width of the smearing delta-function in the units of [Ha].
Definition: config.hpp:994
auto smearing() const
Type of occupancy smearing.
Definition: config.hpp:1006
auto xc_dens_tre() const
XC density threshold (debug purposes).
Definition: config.hpp:1297
auto precision_wf() const
The floating point precision of the Kohn-Sham wave-functions.
Definition: config.hpp:1321
auto lmax_pot() const
Maximum l for potential expansion in real spherical harmonics.
Definition: config.hpp:1081
auto num_fv_states() const
Number of first-variational states.
Definition: config.hpp:982
auto gamma_point() const
True if gamma-point (real) version of the PW code is used.
Definition: config.hpp:1201
auto density_tol() const
Tolerance for the density mixing.
Definition: config.hpp:1177
auto use_scf_correction() const
True if SCF correction to total energy should be computed.
Definition: config.hpp:1309
Settings control the internal parameters related to the numerical implementation.
Definition: config.hpp:116
auto itsol_tol_min() const
Minimum tolerance of the iterative solver.
Definition: config.hpp:198
auto mixer_rms_min() const
Minimum value of allowed RMS for the mixer.
Definition: config.hpp:186
auto always_update_wf() const
Update wave-functions in the Davdison solver even if they immediately satisfy the convergence criteri...
Definition: config.hpp:171
auto min_occupancy() const
Minimum occupancy below which the band is treated as being 'empty'.
Definition: config.hpp:210
auto nprii_vloc() const
Point density (in a.u.^-1) for interpolating radial integrals of the local part of pseudopotential.
Definition: config.hpp:123
auto nprii_rho_core() const
Point density (in a.u.^-1) for interpolating radial integrals of the core charge density.
Definition: config.hpp:159
auto nprii_aug() const
Point density (in a.u.^-1) for interpolating radial integrals of the augmentation operator.
Definition: config.hpp:147
auto sht_coverage() const
Coverage of sphere in case of spherical harmonics transformation.
Definition: config.hpp:306
auto fft_grid_size() const
Initial dimenstions for the fine-grain FFT grid.
Definition: config.hpp:279
auto fp32_to_fp64_rms() const
Density RMS tolerance to switch to FP64 implementation. If zero, estimation of iterative solver toler...
Definition: config.hpp:318
auto itsol_tol_ratio() const
Fine control of the empty states tolerance.
Definition: config.hpp:231
auto nprii_beta() const
Point density (in a.u.^-1) for interpolating radial integrals of the beta projectors.
Definition: config.hpp:135
auto itsol_tol_scale() const
Scaling parameters of the iterative solver tolerance.
Definition: config.hpp:255
auto radial_grid() const
Default radial grid for LAPW species.
Definition: config.hpp:291
auto auto_enu_tol() const
Tolerance to recompute the LAPW linearisation energies.
Definition: config.hpp:267
Unit cell representation.
Definition: config.hpp:336
auto lattice_vectors_scale() const
Scaling factor for the lattice vectors.
Definition: config.hpp:358
auto atom_coordinate_units() const
Type of atomic coordinates: lattice, atomic units or Angstroms.
Definition: config.hpp:370
auto atom_files(std::string label__) const
Mapping between atom type labels and atomic files.
Definition: config.hpp:394
auto atom_types() const
List of atom type labels.
Definition: config.hpp:382
auto lattice_vectors() const
Three non-collinear vectors of the primitive unit cell.
Definition: config.hpp:343
auto atoms(std::string label__) const
Atomic coordinates.
Definition: config.hpp:400
Variable cell shape stabilized quasi Newton method (VC-SQNM)
Definition: config.hpp:1460
auto num_steps() const
Number of lattice relaxation steps.
Definition: config.hpp:1551
auto forces_tol() const
Total error tolerance on the atomic forces.
Definition: config.hpp:1527
auto alpha0() const
Lower limit on the step size.
Definition: config.hpp:1503
auto lattice_weight() const
Weight / size of the supercell that is used to transform lattice derivatives. Use a value between 1 a...
Definition: config.hpp:1491
auto stress_tol() const
Total error tolerance on the lattice stress.
Definition: config.hpp:1539
auto eps_subsp() const
Lower limit on linear dependencies of basis vectors in history list.
Definition: config.hpp:1515
auto initial_step_size() const
Initial step size.
Definition: config.hpp:1467
auto nhist_max() const
Maximal number of steps that will be stored in the history list.
Definition: config.hpp:1479
Namespace of the SIRIUS library.
Definition: sirius.f90:5
Variable cell stable quasi-Newton lattice optimizer.
Definition: historylist.hpp:13