#include <energy_calculator.hpp>
Public Member Functions | |
| PlanewaveKohnShamEnergyCalculator (const KPointsGrid &kpoint_grid, const PlanewaveKohnShamQuantumSystem &quantum_system, const SmearingScheme *smearing_scheme) | |
| Real | compute_band_energy (int number_of_bands, int number_of_spin_components) const |
| Real | compute_smearing_entropy (int number_of_bands, int number_of_spin_components) const |
Computes the band energy and smearing entropy contribution from the occupied Kohn-Sham eigenvalues and occupations.
All referenced objects must outlive this calculator (non-owning references). The smearing_scheme pointer is nullable; pass nullptr for insulators.
Definition at line 33 of file energy_calculator.hpp.
|
inline |
Construct a calculator bound to the given k-point grid, quantum system, and smearing scheme.
| kpoint_grid | K-point grid providing coordinates and integration weights. |
| quantum_system | The Kohn-Sham quantum system (eigenvalues, occupations, Fermi energy). |
| smearing_scheme | Pointer to the active smearing scheme, or nullptr for no smearing. |
Definition at line 43 of file energy_calculator.hpp.
|
inline |
Compute the band energy: Σ_{k,n} w_k * f_{k,n} * ε_{k,n} (Ry).
| number_of_bands | Number of bands per k-point state. |
| number_of_spin_components | 1 (non-spin-polarized) or 2 (LSDA). |
Definition at line 56 of file energy_calculator.hpp.
References q3::PlanewaveKohnShamQuantumSystem::eigenvalue(), q3::KPointsGrid::number_of_kpoints(), and q3::PlanewaveKohnShamQuantumSystem::occupation_by_kpoint_state_index_and_band_index().
|
inline |
Compute the smearing entropy contribution -T*S (Ry).
Returns 0.0 immediately if no smearing scheme is active.
| number_of_bands | Number of bands per k-point state. |
| number_of_spin_components | 1 (non-spin-polarized) or 2 (LSDA). |
Definition at line 84 of file energy_calculator.hpp.
References q3::PlanewaveKohnShamQuantumSystem::eigenvalue(), q3::SmearingScheme::entropy_weight(), q3::PlanewaveKohnShamQuantumSystem::fermi_energy(), q3::KPointsGrid::number_of_kpoints(), q3::SmearingScheme::smearing_width(), and q3::SmearingScheme::uses_smearing().