25#ifndef __SIMULATION_PARAMETERS_HPP__
26#define __SIMULATION_PARAMETERS_HPP__
34#include "context/config.hpp"
47 void import(nlohmann::json
const& in__);
50 dict_[
"locked"] =
true;
54 dict_.erase(
"locked");
91 smearing::smearing_t
smearing_{smearing::smearing_t::gaussian};
102 void import(std::string
const& str__);
105 void import(nlohmann::json
const& dict__);
108 void import(cmd_args
const& args__);
110 void lmax_apw(
int lmax_apw__)
112 cfg().parameters().lmax_apw(lmax_apw__);
115 void lmax_rho(
int lmax_rho__)
117 cfg().parameters().lmax_rho(lmax_rho__);
120 void lmax_pot(
int lmax_pot__)
122 cfg().parameters().lmax_pot(lmax_pot__);
125 void set_num_mag_dims(
int num_mag_dims__)
127 RTE_ASSERT(num_mag_dims__ == 0 || num_mag_dims__ == 1 || num_mag_dims__ == 3);
129 cfg().parameters().num_mag_dims(num_mag_dims__);
132 void set_hubbard_correction(
bool hubbard_correction__)
134 cfg().parameters().hubbard_correction(hubbard_correction__);
135 cfg().hubbard().simplified(
false);
141 cfg().parameters().gamma_point(gamma_point__);
142 return gamma_point__;
148 cfg().control().mpi_grid_dims(mpi_grid_dims__);
149 return mpi_grid_dims__;
152 void add_xc_functional(std::string name__)
154 auto xcfunc = cfg().parameters().xc_functionals();
155 xcfunc.push_back(name__);
156 cfg().parameters().xc_functionals(xcfunc);
159 void electronic_structure_method(std::string name__);
161 auto electronic_structure_method()
const
172 void processing_unit(std::string name__);
174 void smearing(std::string name__);
176 auto smearing()
const
181 void molecule(
bool molecule__)
183 cfg().parameters().molecule(molecule__);
186 auto verbosity()
const
188 return cfg().control().verbosity();
194 cfg().control().verbosity(level__);
198 inline int lmax_rho()
const
200 return cfg().parameters().lmax_rho();
203 inline int lmmax_rho()
const
208 inline int lmax_pot()
const
210 return cfg().parameters().lmax_pot();
213 inline int lmmax_pot()
const
218 inline double aw_cutoff()
const
220 return cfg().parameters().aw_cutoff();
223 inline double aw_cutoff(
double aw_cutoff__)
225 cfg().parameters().aw_cutoff(aw_cutoff__);
232 return cfg().parameters().pw_cutoff();
238 cfg().parameters().pw_cutoff(pw_cutoff__);
245 return cfg().parameters().gk_cutoff();
251 cfg().parameters().gk_cutoff(gk_cutoff__);
258 auto nmd = cfg().parameters().num_mag_dims();
259 RTE_ASSERT(nmd == 0 || nmd == 1 || nmd == 3);
306 cfg().parameters().num_fv_states(num_fv_states__);
307 return num_fv_states__;
313 return cfg().parameters().num_fv_states();
319 cfg().parameters().num_bands(num_bands__);
329 return cfg().parameters().num_bands();
342 return cfg_.settings().min_occupancy();
348 cfg().settings().min_occupancy(val__);
349 return cfg().settings().min_occupancy();
352 bool so_correction()
const
354 return cfg().parameters().so_correction();
357 bool so_correction(
bool so_correction__)
359 cfg().parameters().so_correction(so_correction__);
360 return so_correction__;
363 bool hubbard_correction()
const
365 return cfg().parameters().hubbard_correction();
370 return cfg().parameters().gamma_point();
373 sddk::device_t processing_unit()
const
378 double smearing_width()
const
380 return cfg().parameters().smearing_width();
383 double smearing_width(
double smearing_width__)
385 cfg().parameters().smearing_width(smearing_width__);
386 return smearing_width__;
389 void set_auto_rmt(
int auto_rmt__)
391 cfg().parameters().auto_rmt(auto_rmt__);
396 return cfg().parameters().auto_rmt();
401 return (
num_spins() == 2 || hubbard_correction() || so_correction());
406 return cfg().control().mpi_grid_dims();
409 int cyclic_block_size()
const
411 return cfg().control().cyclic_block_size();
414 bool full_potential()
const
419 std::vector<std::string> xc_functionals()
const
421 return cfg().parameters().xc_functionals();
427 return cfg().control().std_evp_solver_name();
433 cfg().control().std_evp_solver_name(name__);
440 return cfg().control().gen_evp_solver_name();
446 cfg().control().gen_evp_solver_name(name__);
460 double rmt_max()
const
462 return cfg().control().rmt_max();
465 double spglib_tolerance()
const
467 return cfg().control().spglib_tolerance();
470 bool molecule()
const
472 return cfg().parameters().molecule();
479 return cfg().parameters().use_symmetry();
485 cfg().parameters().use_symmetry(use_symmetry__);
486 return use_symmetry__;
489 std::string iterative_solver_type(std::string type__)
491 cfg().iterative_solver().type(type__);
498 cfg().iterative_solver().empty_states_tolerance(tolerance__);
505 cfg_.settings().sht_coverage(sht_coverage__);
506 return cfg_.settings().sht_coverage();
Set of basic parameters of a simulation.
int verbosity(int level__)
Set verbosity level.
sddk::device_t processing_unit_
Type of the processing unit.
std::vector< int > mpi_grid_dims(std::vector< int > mpi_grid_dims__)
Set dimensions of MPI grid for band diagonalization problem.
std::string gen_evp_solver_name(std::string name__)
Set the name of the generalized eigen-value solver to use.
double pw_cutoff(double pw_cutoff__)
Set plane-wave cutoff.
int num_spins() const
Number of spin components.
smearing::smearing_t smearing_
Type of occupation numbers smearing.
bool gamma_point(bool gamma_point__)
Set flag for Gamma-point calculation.
int num_fv_states(int num_fv_states__)
Set the number of first-variational states.
bool use_symmetry(bool use_symmetry__)
Set a use_symmetry flag.
int num_spinors() const
Number of spinor wave-functions labeled by a sinlge band index.
int num_mag_comp() const
Number of components in the complex density matrix.
int max_occupancy() const
Maximum band occupancy.
int sht_coverage(int sht_coverage__)
Set the variable which controls the type of sperical coverage.
relativity_t valence_relativity_
Type of relativity for valence states.
void core_relativity(std::string name__)
Set core relativity for the LAPW method.
int num_bands() const
Total number of bands.
int num_bands(int num_bands__)
Set the number of bands.
int num_spinor_comp() const
Number of non-zero spinor components.
int num_mag_dims() const
Number of dimensions in the magnetization vector.
std::string std_evp_solver_name(std::string name__)
Set the name of the standard eigen-value solver to use.
double pw_cutoff() const
Plane-wave cutoff for G-vectors (in 1/[a.u.]).
Config cfg_
All user-provided paramters are stored here.
void valence_relativity(std::string name__)
Set valence relativity for the LAPW method.
bool use_symmetry() const
Get a use_symmetry flag.
double gk_cutoff() const
Cutoff for G+k vectors (in 1/[a.u.]).
relativity_t core_relativity_
Type of relativity for core states.
double min_occupancy() const
Minimum occupancy to consider band to be occupied.
int num_fv_states() const
Number of first-variational states.
double empty_states_tolerance(double tolerance__)
Set the tolerance for empty states.
std::string gen_evp_solver_name() const
Get the name of the generalized eigen-value solver to use.
electronic_structure_method_t electronic_structure_method_
Type of electronic structure method.
double gk_cutoff(double gk_cutoff__)
Set the cutoff for G+k vectors.
double min_occupancy(double val__)
Set minimum occupancy.
std::string std_evp_solver_name() const
Get the name of the standard eigen-value solver to use.
Contains definition and implementation of cmd_args class.
Interface to nlohmann::json library and helper functions.
Memory management functions and classes.
device_t
Type of the main processing unit.
int lmmax(int lmax)
Maximum number of combinations for a given .
Namespace of the SIRIUS library.
relativity_t
Type of relativity treatment in the case of LAPW.
electronic_structure_method_t
Type of electronic structure methods.
@ full_potential_lapwlo
Full potential linearized augmented plane waves with local orbitals.
nlohmann::json const & get_section_options(std::string const §ion__)
Get all possible options of a given input section. It is a json dictionary.
nlohmann::json const & get_options_dictionary()
Get all possible options for initializing sirius. It is a json dictionary.
Smearing functions used in finding the band occupancies.
Contains typedefs, enums and simple descriptors.