Loading...
Searching...
No Matches
init.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * SmearingScheme — abstract interface for electronic occupation smearing.
5 *
6 * Defines the contract for Gaussian, Methfessel-Paxton, Marzari-Vanderbilt,
7 * Fermi-Dirac, and fixed-occupation schemes used in metallic Kohn-Sham
8 * calculations to smooth the Fermi surface.
9 */
10
11#include <string>
12
15
16namespace q3 {
17
18/// Abstract interface for electronic smearing schemes.
20 public:
22 virtual ~SmearingScheme() = default;
23
24 /// Compute the occupation f(x) where x = (E - E_F) / σ.
25 [[nodiscard]] virtual Real occupation(Real x) const = 0;
26
27 /// Compute the entropy contribution δ(x) weight.
28 [[nodiscard]] virtual Real entropy_weight(Real x) const = 0;
29
30 [[nodiscard]] virtual std::string name() const = 0;
31
32 /// Smearing width σ (degauss) in Ry.
33 [[nodiscard]] Real smearing_width() const {
34 return smearing_width_;
35 }
36
37 /// Whether this scheme uses actual smearing (width > 0).
38 [[nodiscard]] bool uses_smearing() const {
40 }
41
42 protected:
44};
45
46} // namespace q3
Abstract interface for electronic smearing schemes.
Definition init.hpp:19
virtual Real entropy_weight(Real x) const =0
Compute the entropy contribution δ(x) weight.
virtual std::string name() const =0
Real smearing_width() const
Smearing width σ (degauss) in Ry.
Definition init.hpp:33
SmearingScheme(Real smearing_width=0.0)
Definition init.hpp:21
virtual ~SmearingScheme()=default
Real smearing_width_
Definition init.hpp:43
virtual Real occupation(Real x) const =0
Compute the occupation f(x) where x = (E - E_F) / σ.
bool uses_smearing() const
Whether this scheme uses actual smearing (width > 0).
Definition init.hpp:38
constexpr double smearing_width_threshold
double Real