entropy#
Entropy functions.
- jrystal.entropy.fermi_dirac(occupation: Float[Array, 'spin kpt band'], eps: float = 1e-08) Float [source]#
Compute the entropy corresponding to Fermi-Dirac distribution.
The entropy is defined as:
\[-\sum_{\sigma, k, i} [o_{\sigma, k, i} \log(o_{\sigma, k, i} + \epsilon) + (1-o_{\sigma, k, i}) \log(1-o_{\sigma, k, i} + \epsilon)]\]where
\(o_{\sigma, k, i}\) is the occupation number
\(\sigma\) is the spin index
\(k\) is the \(k\)-point index
\(i\) is the band index
\(\epsilon\) is the machine epsilon to prevent numerical instabilities.
- Parameters:
occupation (Float[Array, 'spin kpt band']) – The occupation numbers with shape (spin, kpt, band).
eps (float) – Machine epsilon to prevent numerical instabilities. Default: 1e-8
- Returns:
The entropy value corresponding to the Fermi-Dirac distribution.
- Return type:
Float