SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
sirius::Simulation_parameters Class Reference

Set of basic parameters of a simulation. More...

#include <simulation_parameters.hpp>

Inherited by sirius::Simulation_context.

Public Member Functions

Configcfg ()
 
Config const & cfg () const
 
void import (std::string const &str__)
 Import parameters from a file or a serialized json string. More...
 
void import (nlohmann::json const &dict__)
 Import parameters from a json dictionary. More...
 
void import (cmd_args const &args__)
 Import from command line arguments. More...
 
void lmax_apw (int lmax_apw__)
 
void lmax_rho (int lmax_rho__)
 
void lmax_pot (int lmax_pot__)
 
void set_num_mag_dims (int num_mag_dims__)
 
void set_hubbard_correction (bool hubbard_correction__)
 
bool gamma_point (bool gamma_point__)
 Set flag for Gamma-point calculation. More...
 
std::vector< int > mpi_grid_dims (std::vector< int > mpi_grid_dims__)
 Set dimensions of MPI grid for band diagonalization problem. More...
 
void add_xc_functional (std::string name__)
 
void electronic_structure_method (std::string name__)
 
auto electronic_structure_method () const
 
void core_relativity (std::string name__)
 Set core relativity for the LAPW method. More...
 
void valence_relativity (std::string name__)
 Set valence relativity for the LAPW method. More...
 
void processing_unit (std::string name__)
 
void smearing (std::string name__)
 
auto smearing () const
 
void molecule (bool molecule__)
 
auto verbosity () const
 
int verbosity (int level__)
 Set verbosity level. More...
 
int lmax_rho () const
 
int lmmax_rho () const
 
int lmax_pot () const
 
int lmmax_pot () const
 
double aw_cutoff () const
 
double aw_cutoff (double aw_cutoff__)
 
double pw_cutoff () const
 Plane-wave cutoff for G-vectors (in 1/[a.u.]). More...
 
double pw_cutoff (double pw_cutoff__)
 Set plane-wave cutoff. More...
 
double gk_cutoff () const
 Cutoff for G+k vectors (in 1/[a.u.]). More...
 
double gk_cutoff (double gk_cutoff__)
 Set the cutoff for G+k vectors. More...
 
int num_mag_dims () const
 Number of dimensions in the magnetization vector. More...
 
int num_spins () const
 Number of spin components. More...
 
int num_mag_comp () const
 Number of components in the complex density matrix. More...
 
int num_spinor_comp () const
 Number of non-zero spinor components. More...
 
int num_spinors () const
 Number of spinor wave-functions labeled by a sinlge band index. More...
 
int num_fv_states (int num_fv_states__)
 Set the number of first-variational states. More...
 
int num_fv_states () const
 Number of first-variational states. More...
 
int num_bands (int num_bands__)
 Set the number of bands. More...
 
int num_bands () const
 Total number of bands. More...
 
int max_occupancy () const
 Maximum band occupancy. More...
 
double min_occupancy () const
 Minimum occupancy to consider band to be occupied. More...
 
double min_occupancy (double val__)
 Set minimum occupancy. More...
 
bool so_correction () const
 
bool so_correction (bool so_correction__)
 
bool hubbard_correction () const
 
bool gamma_point () const
 
sddk::device_t processing_unit () const
 
double smearing_width () const
 
double smearing_width (double smearing_width__)
 
void set_auto_rmt (int auto_rmt__)
 
int auto_rmt () const
 
bool need_sv () const
 
std::vector< int > mpi_grid_dims () const
 
int cyclic_block_size () const
 
bool full_potential () const
 
std::vector< std::string > xc_functionals () const
 
std::string std_evp_solver_name () const
 Get the name of the standard eigen-value solver to use. More...
 
std::string std_evp_solver_name (std::string name__)
 Set the name of the standard eigen-value solver to use. More...
 
std::string gen_evp_solver_name () const
 Get the name of the generalized eigen-value solver to use. More...
 
std::string gen_evp_solver_name (std::string name__)
 Set the name of the generalized eigen-value solver to use. More...
 
relativity_t valence_relativity () const
 
relativity_t core_relativity () const
 
double rmt_max () const
 
double spglib_tolerance () const
 
bool molecule () const
 
bool use_symmetry () const
 Get a use_symmetry flag. More...
 
bool use_symmetry (bool use_symmetry__)
 Set a use_symmetry flag. More...
 
std::string iterative_solver_type (std::string type__)
 
double empty_states_tolerance (double tolerance__)
 Set the tolerance for empty states. More...
 
int sht_coverage (int sht_coverage__)
 Set the variable which controls the type of sperical coverage. More...
 

Protected Member Functions

 Simulation_parameters (Simulation_parameters const &)=delete
 

Protected Attributes

sddk::device_t processing_unit_ {sddk::device_t::CPU}
 Type of the processing unit. More...
 
relativity_t valence_relativity_ {relativity_t::zora}
 Type of relativity for valence states. More...
 
relativity_t core_relativity_ {relativity_t::dirac}
 Type of relativity for core states. More...
 
electronic_structure_method_t electronic_structure_method_ {electronic_structure_method_t::full_potential_lapwlo}
 Type of electronic structure method. More...
 
smearing::smearing_t smearing_ {smearing::smearing_t::gaussian}
 Type of occupation numbers smearing. More...
 

Private Attributes

Config cfg_
 All user-provided paramters are stored here. More...
 

Detailed Description

Set of basic parameters of a simulation.

This class provides shortcuts to the mostly used input parameters, for example verbosity.

Definition at line 60 of file simulation_parameters.hpp.

Constructor & Destructor Documentation

◆ Simulation_parameters()

sirius::Simulation_parameters::Simulation_parameters ( )
inline

Definition at line 97 of file simulation_parameters.hpp.

Member Function Documentation

◆ cfg() [1/2]

Config & sirius::Simulation_parameters::cfg ( )
inline

Definition at line 67 of file simulation_parameters.hpp.

◆ cfg() [2/2]

Config const & sirius::Simulation_parameters::cfg ( ) const
inline

Definition at line 72 of file simulation_parameters.hpp.

◆ import() [1/3]

void sirius::Simulation_parameters::import ( std::string const &  str__)

Import parameters from a file or a serialized json string.

Definition at line 155 of file simulation_parameters.cpp.

◆ import() [2/3]

void sirius::Simulation_parameters::import ( nlohmann::json const &  dict__)

Import parameters from a json dictionary.

Definition at line 162 of file simulation_parameters.cpp.

◆ import() [3/3]

void sirius::Simulation_parameters::import ( cmd_args const &  args__)

Import from command line arguments.

Definition at line 168 of file simulation_parameters.cpp.

◆ lmax_apw()

void sirius::Simulation_parameters::lmax_apw ( int  lmax_apw__)
inline

Definition at line 110 of file simulation_parameters.hpp.

◆ lmax_rho() [1/2]

void sirius::Simulation_parameters::lmax_rho ( int  lmax_rho__)
inline

Definition at line 115 of file simulation_parameters.hpp.

◆ lmax_pot() [1/2]

void sirius::Simulation_parameters::lmax_pot ( int  lmax_pot__)
inline

Definition at line 120 of file simulation_parameters.hpp.

◆ set_num_mag_dims()

void sirius::Simulation_parameters::set_num_mag_dims ( int  num_mag_dims__)
inline

Definition at line 125 of file simulation_parameters.hpp.

◆ set_hubbard_correction()

void sirius::Simulation_parameters::set_hubbard_correction ( bool  hubbard_correction__)
inline

Definition at line 132 of file simulation_parameters.hpp.

◆ gamma_point() [1/2]

bool sirius::Simulation_parameters::gamma_point ( bool  gamma_point__)
inline

Set flag for Gamma-point calculation.

Definition at line 139 of file simulation_parameters.hpp.

◆ mpi_grid_dims() [1/2]

std::vector< int > sirius::Simulation_parameters::mpi_grid_dims ( std::vector< int >  mpi_grid_dims__)
inline

Set dimensions of MPI grid for band diagonalization problem.

Definition at line 146 of file simulation_parameters.hpp.

◆ add_xc_functional()

void sirius::Simulation_parameters::add_xc_functional ( std::string  name__)
inline

Definition at line 152 of file simulation_parameters.hpp.

◆ electronic_structure_method() [1/2]

void sirius::Simulation_parameters::electronic_structure_method ( std::string  name__)

Definition at line 228 of file simulation_parameters.cpp.

◆ electronic_structure_method() [2/2]

auto sirius::Simulation_parameters::electronic_structure_method ( ) const
inline

Definition at line 161 of file simulation_parameters.hpp.

◆ core_relativity() [1/2]

void sirius::Simulation_parameters::core_relativity ( std::string  name__)

Set core relativity for the LAPW method.

Definition at line 192 of file simulation_parameters.cpp.

◆ valence_relativity() [1/2]

void sirius::Simulation_parameters::valence_relativity ( std::string  name__)

Set valence relativity for the LAPW method.

Definition at line 199 of file simulation_parameters.cpp.

◆ processing_unit() [1/2]

void sirius::Simulation_parameters::processing_unit ( std::string  name__)

Definition at line 206 of file simulation_parameters.cpp.

◆ smearing() [1/2]

void sirius::Simulation_parameters::smearing ( std::string  name__)

Definition at line 221 of file simulation_parameters.cpp.

◆ smearing() [2/2]

auto sirius::Simulation_parameters::smearing ( ) const
inline

Definition at line 176 of file simulation_parameters.hpp.

◆ molecule() [1/2]

void sirius::Simulation_parameters::molecule ( bool  molecule__)
inline

Definition at line 181 of file simulation_parameters.hpp.

◆ verbosity() [1/2]

auto sirius::Simulation_parameters::verbosity ( ) const
inline

Definition at line 186 of file simulation_parameters.hpp.

◆ verbosity() [2/2]

int sirius::Simulation_parameters::verbosity ( int  level__)
inline

Set verbosity level.

Definition at line 192 of file simulation_parameters.hpp.

◆ lmax_rho() [2/2]

int sirius::Simulation_parameters::lmax_rho ( ) const
inline

Definition at line 198 of file simulation_parameters.hpp.

◆ lmmax_rho()

int sirius::Simulation_parameters::lmmax_rho ( ) const
inline

Definition at line 203 of file simulation_parameters.hpp.

◆ lmax_pot() [2/2]

int sirius::Simulation_parameters::lmax_pot ( ) const
inline

Definition at line 208 of file simulation_parameters.hpp.

◆ lmmax_pot()

int sirius::Simulation_parameters::lmmax_pot ( ) const
inline

Definition at line 213 of file simulation_parameters.hpp.

◆ aw_cutoff() [1/2]

double sirius::Simulation_parameters::aw_cutoff ( ) const
inline

Definition at line 218 of file simulation_parameters.hpp.

◆ aw_cutoff() [2/2]

double sirius::Simulation_parameters::aw_cutoff ( double  aw_cutoff__)
inline

Definition at line 223 of file simulation_parameters.hpp.

◆ pw_cutoff() [1/2]

double sirius::Simulation_parameters::pw_cutoff ( ) const
inline

Plane-wave cutoff for G-vectors (in 1/[a.u.]).

Definition at line 230 of file simulation_parameters.hpp.

◆ pw_cutoff() [2/2]

double sirius::Simulation_parameters::pw_cutoff ( double  pw_cutoff__)
inline

Set plane-wave cutoff.

Definition at line 236 of file simulation_parameters.hpp.

◆ gk_cutoff() [1/2]

double sirius::Simulation_parameters::gk_cutoff ( ) const
inline

Cutoff for G+k vectors (in 1/[a.u.]).

Definition at line 243 of file simulation_parameters.hpp.

◆ gk_cutoff() [2/2]

double sirius::Simulation_parameters::gk_cutoff ( double  gk_cutoff__)
inline

Set the cutoff for G+k vectors.

Definition at line 249 of file simulation_parameters.hpp.

◆ num_mag_dims()

int sirius::Simulation_parameters::num_mag_dims ( ) const
inline

Number of dimensions in the magnetization vector.

Definition at line 256 of file simulation_parameters.hpp.

◆ num_spins()

int sirius::Simulation_parameters::num_spins ( ) const
inline

Number of spin components.

This parameter can take only two values: 1 – non-magnetic calcaulation and wave-functions, 2 – spin-polarized calculation and wave-functions.

Definition at line 266 of file simulation_parameters.hpp.

◆ num_mag_comp()

int sirius::Simulation_parameters::num_mag_comp ( ) const
inline

Number of components in the complex density matrix.

In case of non-collinear magnetism only one out of two non-diagonal components is stored.

Definition at line 273 of file simulation_parameters.hpp.

◆ num_spinor_comp()

int sirius::Simulation_parameters::num_spinor_comp ( ) const
inline

Number of non-zero spinor components.

In non magnetic case this is equal to 1, in collinear magnetic case it is also equal to 1 (pure spinors), in non-collinear case the number of components is 2 (general spinor case).

Definition at line 281 of file simulation_parameters.hpp.

◆ num_spinors()

int sirius::Simulation_parameters::num_spinors ( ) const
inline

Number of spinor wave-functions labeled by a sinlge band index.

In magnetic collinear case the wave-functions have two spin components, but they describe different states (pure spin-up, pure spin-dn), thus the number of spinors packed in a single band index is 2. In non-collinear case we have full two-component spinors for each band index.

Definition at line 294 of file simulation_parameters.hpp.

◆ num_fv_states() [1/2]

int sirius::Simulation_parameters::num_fv_states ( int  num_fv_states__)
inline

Set the number of first-variational states.

Definition at line 304 of file simulation_parameters.hpp.

◆ num_fv_states() [2/2]

int sirius::Simulation_parameters::num_fv_states ( ) const
inline

Number of first-variational states.

Definition at line 311 of file simulation_parameters.hpp.

◆ num_bands() [1/2]

int sirius::Simulation_parameters::num_bands ( int  num_bands__)
inline

Set the number of bands.

Definition at line 317 of file simulation_parameters.hpp.

◆ num_bands() [2/2]

int sirius::Simulation_parameters::num_bands ( ) const
inline

Total number of bands.

Definition at line 324 of file simulation_parameters.hpp.

◆ max_occupancy()

int sirius::Simulation_parameters::max_occupancy ( ) const
inline

Maximum band occupancy.

Definition at line 334 of file simulation_parameters.hpp.

◆ min_occupancy() [1/2]

double sirius::Simulation_parameters::min_occupancy ( ) const
inline

Minimum occupancy to consider band to be occupied.

Definition at line 340 of file simulation_parameters.hpp.

◆ min_occupancy() [2/2]

double sirius::Simulation_parameters::min_occupancy ( double  val__)
inline

Set minimum occupancy.

Definition at line 346 of file simulation_parameters.hpp.

◆ so_correction() [1/2]

bool sirius::Simulation_parameters::so_correction ( ) const
inline

Definition at line 352 of file simulation_parameters.hpp.

◆ so_correction() [2/2]

bool sirius::Simulation_parameters::so_correction ( bool  so_correction__)
inline

Definition at line 357 of file simulation_parameters.hpp.

◆ hubbard_correction()

bool sirius::Simulation_parameters::hubbard_correction ( ) const
inline

Definition at line 363 of file simulation_parameters.hpp.

◆ gamma_point() [2/2]

bool sirius::Simulation_parameters::gamma_point ( ) const
inline

Definition at line 368 of file simulation_parameters.hpp.

◆ processing_unit() [2/2]

sddk::device_t sirius::Simulation_parameters::processing_unit ( ) const
inline

Definition at line 373 of file simulation_parameters.hpp.

◆ smearing_width() [1/2]

double sirius::Simulation_parameters::smearing_width ( ) const
inline

Definition at line 378 of file simulation_parameters.hpp.

◆ smearing_width() [2/2]

double sirius::Simulation_parameters::smearing_width ( double  smearing_width__)
inline

Definition at line 383 of file simulation_parameters.hpp.

◆ set_auto_rmt()

void sirius::Simulation_parameters::set_auto_rmt ( int  auto_rmt__)
inline

Definition at line 389 of file simulation_parameters.hpp.

◆ auto_rmt()

int sirius::Simulation_parameters::auto_rmt ( ) const
inline

Definition at line 394 of file simulation_parameters.hpp.

◆ need_sv()

bool sirius::Simulation_parameters::need_sv ( ) const
inline

Definition at line 399 of file simulation_parameters.hpp.

◆ mpi_grid_dims() [2/2]

std::vector< int > sirius::Simulation_parameters::mpi_grid_dims ( ) const
inline

Definition at line 404 of file simulation_parameters.hpp.

◆ cyclic_block_size()

int sirius::Simulation_parameters::cyclic_block_size ( ) const
inline

Definition at line 409 of file simulation_parameters.hpp.

◆ full_potential()

bool sirius::Simulation_parameters::full_potential ( ) const
inline

Definition at line 414 of file simulation_parameters.hpp.

◆ xc_functionals()

std::vector< std::string > sirius::Simulation_parameters::xc_functionals ( ) const
inline

Definition at line 419 of file simulation_parameters.hpp.

◆ std_evp_solver_name() [1/2]

std::string sirius::Simulation_parameters::std_evp_solver_name ( ) const
inline

Get the name of the standard eigen-value solver to use.

Definition at line 425 of file simulation_parameters.hpp.

◆ std_evp_solver_name() [2/2]

std::string sirius::Simulation_parameters::std_evp_solver_name ( std::string  name__)
inline

Set the name of the standard eigen-value solver to use.

Definition at line 431 of file simulation_parameters.hpp.

◆ gen_evp_solver_name() [1/2]

std::string sirius::Simulation_parameters::gen_evp_solver_name ( ) const
inline

Get the name of the generalized eigen-value solver to use.

Definition at line 438 of file simulation_parameters.hpp.

◆ gen_evp_solver_name() [2/2]

std::string sirius::Simulation_parameters::gen_evp_solver_name ( std::string  name__)
inline

Set the name of the generalized eigen-value solver to use.

Definition at line 444 of file simulation_parameters.hpp.

◆ valence_relativity() [2/2]

relativity_t sirius::Simulation_parameters::valence_relativity ( ) const
inline

Definition at line 450 of file simulation_parameters.hpp.

◆ core_relativity() [2/2]

relativity_t sirius::Simulation_parameters::core_relativity ( ) const
inline

Definition at line 455 of file simulation_parameters.hpp.

◆ rmt_max()

double sirius::Simulation_parameters::rmt_max ( ) const
inline

Definition at line 460 of file simulation_parameters.hpp.

◆ spglib_tolerance()

double sirius::Simulation_parameters::spglib_tolerance ( ) const
inline

Definition at line 465 of file simulation_parameters.hpp.

◆ molecule() [2/2]

bool sirius::Simulation_parameters::molecule ( ) const
inline

Definition at line 470 of file simulation_parameters.hpp.

◆ use_symmetry() [1/2]

bool sirius::Simulation_parameters::use_symmetry ( ) const
inline

Get a use_symmetry flag.

If crystal symmetry is used, density and potential are symmetrized.

Definition at line 477 of file simulation_parameters.hpp.

◆ use_symmetry() [2/2]

bool sirius::Simulation_parameters::use_symmetry ( bool  use_symmetry__)
inline

Set a use_symmetry flag.

Definition at line 483 of file simulation_parameters.hpp.

◆ iterative_solver_type()

std::string sirius::Simulation_parameters::iterative_solver_type ( std::string  type__)
inline

Definition at line 489 of file simulation_parameters.hpp.

◆ empty_states_tolerance()

double sirius::Simulation_parameters::empty_states_tolerance ( double  tolerance__)
inline

Set the tolerance for empty states.

Definition at line 496 of file simulation_parameters.hpp.

◆ sht_coverage()

int sirius::Simulation_parameters::sht_coverage ( int  sht_coverage__)
inline

Set the variable which controls the type of sperical coverage.

Definition at line 503 of file simulation_parameters.hpp.

Member Data Documentation

◆ cfg_

Config sirius::Simulation_parameters::cfg_
private

All user-provided paramters are stored here.

Definition at line 64 of file simulation_parameters.hpp.

◆ processing_unit_

sddk::device_t sirius::Simulation_parameters::processing_unit_ {sddk::device_t::CPU}
protected

Type of the processing unit.

Definition at line 79 of file simulation_parameters.hpp.

◆ valence_relativity_

relativity_t sirius::Simulation_parameters::valence_relativity_ {relativity_t::zora}
protected

Type of relativity for valence states.

Definition at line 82 of file simulation_parameters.hpp.

◆ core_relativity_

relativity_t sirius::Simulation_parameters::core_relativity_ {relativity_t::dirac}
protected

Type of relativity for core states.

Definition at line 85 of file simulation_parameters.hpp.

◆ electronic_structure_method_

electronic_structure_method_t sirius::Simulation_parameters::electronic_structure_method_ {electronic_structure_method_t::full_potential_lapwlo}
protected

Type of electronic structure method.

Definition at line 88 of file simulation_parameters.hpp.

◆ smearing_

smearing::smearing_t sirius::Simulation_parameters::smearing_ {smearing::smearing_t::gaussian}
protected

Type of occupation numbers smearing.

Definition at line 91 of file simulation_parameters.hpp.


The documentation for this class was generated from the following files: