SIRIUS 7.5.0
Electronic structure library and applications
|
Set of k-points. More...
#include <k_point_set.hpp>
Public Member Functions | |
K_point_set (Simulation_context &ctx__) | |
Create empty k-point set. More... | |
K_point_set (Simulation_context &ctx__, r3::vector< int > k_grid__, r3::vector< int > k_shift__, int use_symmetry__) | |
Create a regular mesh of k-points. More... | |
K_point_set (Simulation_context &ctx__, std::vector< std::array< double, 3 > > vec__) | |
Create k-point set from a list of vectors. More... | |
K_point_set (Simulation_context &ctx__, std::initializer_list< std::array< double, 3 > > vec__) | |
Create k-point set from a list of vectors. More... | |
void | initialize (std::vector< int > const &counts={}) |
Initialize the k-point set. More... | |
template<typename T , sync_band_t what> | |
void | sync_band () |
Sync band energies or occupancies between all MPI ranks. More... | |
template<typename T > | |
void | find_band_occupancies () |
Find Fermi energy and band occupation numbers. More... | |
void | print_info () |
Print basic info to the standard output. More... | |
void | save (std::string const &name__) const |
Save k-point set to HDF5 file. More... | |
void | load () |
double | valence_eval_sum () const |
Return sum of valence eigen-values. More... | |
double | entropy_sum () const |
Return entropy contribution from smearing. More... | |
auto const & | spl_num_kpoints () const |
auto const & | comm () const |
void | update () |
Update k-points after moving atoms or changing the lattice vectors. More... | |
template<typename T > | |
auto | get_band_energies (int ik__, int ispn__) const |
Get a list of band energies for a given k-point index. More... | |
int | max_num_gkvec () const |
Return maximum number of G+k vectors among all k-points. More... | |
void | add_kpoint (r3::vector< double > vk__, double weight__) |
Add k-point to the set. More... | |
void | add_kpoints (sddk::mdarray< double, 2 > const &kpoints__, double const *weights__) |
Add multiple k-points to the set. More... | |
template<typename T > | |
K_point< T > * | get (int ik__) const |
template<typename T > | |
K_point< T > * | get (int ik__) |
int | num_kpoints () const |
Return total number of k-points. More... | |
auto | spl_num_kpoints (kp_index_t::local ikloc__) const |
double | energy_fermi () const |
void | set_energy_fermi (double energy_fermi__) |
double | band_gap () const |
int | find_kpoint (r3::vector< double > vk__) |
Find index of k-point. More... | |
auto & | ctx () |
const auto & | unit_cell () |
fft::Gvec | get_gkvec (kp_index_t::global jk__, int rank__) |
Send G+k vectors of k-point jk to a given rank. More... | |
template<> | |
K_point< double > * | get (int ik__) const |
template<> | |
K_point< float > * | get (int ik__) const |
Private Member Functions | |
K_point_set (K_point_set &src)=delete | |
Copy constuctor is not allowed. | |
void | create_k_mesh (r3::vector< int > k_grid__, r3::vector< int > k_shift__, int use_symmetry__) |
Create regular grid of k-points. More... | |
template<typename T > | |
double | valence_eval_sum () const |
Return sum of valence eigen-values store in Kpoint<T>. More... | |
template<typename T > | |
double | entropy_sum () const |
Return entropy contribution from smearing store in Kpoint<T>. More... | |
Private Attributes | |
Simulation_context & | ctx_ |
Context of a simulation. More... | |
std::vector< std::unique_ptr< K_point< double > > > | kpoints_ |
List of k-points. More... | |
splindex_chunk< kp_index_t > | spl_num_kpoints_ |
Split index of k-points. More... | |
double | energy_fermi_ {0} |
Fermi energy which is searched in find_band_occupancies(). More... | |
double | band_gap_ {0} |
Band gap found by find_band_occupancies(). More... | |
bool | initialized_ {false} |
Set of k-points.
Definition at line 40 of file k_point_set.hpp.
|
inline |
Create empty k-point set.
Definition at line 80 of file k_point_set.hpp.
|
inline |
Create a regular mesh of k-points.
Definition at line 86 of file k_point_set.hpp.
|
inline |
Create k-point set from a list of vectors.
Definition at line 93 of file k_point_set.hpp.
|
inline |
Create k-point set from a list of vectors.
Definition at line 103 of file k_point_set.hpp.
|
private |
Create regular grid of k-points.
Definition at line 90 of file k_point_set.cpp.
|
private |
Return sum of valence eigen-values store in Kpoint<T>.
Definition at line 450 of file k_point_set.cpp.
|
private |
Return entropy contribution from smearing store in Kpoint<T>.
Definition at line 487 of file k_point_set.cpp.
void sirius::K_point_set::initialize | ( | std::vector< int > const & | counts = {} | ) |
Initialize the k-point set.
Definition at line 133 of file k_point_set.cpp.
void sirius::K_point_set::sync_band |
Sync band energies or occupancies between all MPI ranks.
Definition at line 30 of file k_point_set.cpp.
template void sirius::K_point_set::find_band_occupancies< double > | ( | ) |
Find Fermi energy and band occupation numbers.
Definition at line 276 of file k_point_set.cpp.
void sirius::K_point_set::print_info | ( | ) |
Print basic info to the standard output.
Definition at line 534 of file k_point_set.cpp.
void sirius::K_point_set::save | ( | std::string const & | name__ | ) | const |
Save k-point set to HDF5 file.
Definition at line 564 of file k_point_set.cpp.
void sirius::K_point_set::load | ( | ) |
Definition at line 586 of file k_point_set.cpp.
double sirius::K_point_set::valence_eval_sum | ( | ) | const |
Return sum of valence eigen-values.
Definition at line 472 of file k_point_set.cpp.
double sirius::K_point_set::entropy_sum | ( | ) | const |
Return entropy contribution from smearing.
Definition at line 520 of file k_point_set.cpp.
|
inline |
Definition at line 133 of file k_point_set.hpp.
|
inline |
Definition at line 138 of file k_point_set.hpp.
|
inline |
Update k-points after moving atoms or changing the lattice vectors.
Definition at line 144 of file k_point_set.hpp.
|
inline |
Get a list of band energies for a given k-point index.
Definition at line 157 of file k_point_set.hpp.
|
inline |
Return maximum number of G+k vectors among all k-points.
Definition at line 167 of file k_point_set.hpp.
|
inline |
Add k-point to the set.
Definition at line 178 of file k_point_set.hpp.
|
inline |
Add multiple k-points to the set.
Definition at line 187 of file k_point_set.hpp.
|
inline |
Definition at line 198 of file k_point_set.hpp.
|
inline |
Return total number of k-points.
Definition at line 204 of file k_point_set.hpp.
|
inline |
Definition at line 209 of file k_point_set.hpp.
|
inline |
Definition at line 214 of file k_point_set.hpp.
|
inline |
Definition at line 219 of file k_point_set.hpp.
|
inline |
Definition at line 224 of file k_point_set.hpp.
|
inline |
Find index of k-point.
Definition at line 230 of file k_point_set.hpp.
|
inline |
Definition at line 240 of file k_point_set.hpp.
|
inline |
Definition at line 245 of file k_point_set.hpp.
|
inline |
Send G+k vectors of k-point jk to a given rank.
Other ranks receive an empty Gvec placeholder
Definition at line 252 of file k_point_set.hpp.
|
inline |
Definition at line 1 of file k_point_set.hpp.
|
inline |
Definition at line 1 of file k_point_set.hpp.
|
private |
Context of a simulation.
Definition at line 44 of file k_point_set.hpp.
|
private |
List of k-points.
Definition at line 47 of file k_point_set.hpp.
|
private |
Split index of k-points.
Definition at line 55 of file k_point_set.hpp.
|
private |
Fermi energy which is searched in find_band_occupancies().
Definition at line 58 of file k_point_set.hpp.
|
private |
Band gap found by find_band_occupancies().
Definition at line 61 of file k_point_set.hpp.
|
private |
Definition at line 69 of file k_point_set.hpp.