This is an old revision of the document!
There are two different kind of gain/absorption calculations which can be made in nextnano.NEGF:
From the Green's functions calculated in steady-state, the populations are extracted in the Wannier-Stark basis. The linewidths are also calculated in this basis. The semiclassical gain/absorption spectrum is then calculated according to:
$$ g(\hbar \omega) = \sum_{i \neq j} (\rho_j - \rho_i) ~ d_{ij}^2 ~ \frac{\Gamma_{ij}}{(\hbar\omega-E_{ij})^2+\Gamma_{ij}^2/4} \frac{e^2 ~ E_{ij}} {\hbar ~ \epsilon_0 \sqrt{\epsilon_r} ~ c} $$
where
In this case the perturbation due to an a.c. electric field along $z$ is considered. The perturbating Hamiltonian reads in the Lorenz Gauge: $$ H_{ac} = e ~ z ~ Ee^{-i\omega t} $$ where the amplitude $E$ of the electric field is small and can be considered as a perturbation. The response Green's function $\delta G^<(E,\omega)$ is calculated within linear response theory.
The bulk relative permittivity, or dielectric constant, is assumed to be given by the Lyddane–Sachs–Teller relation:
$$ \epsilon^{\text{bulk}}_{\text{r}}(\omega) = \epsilon_{\infty} + (\epsilon_{\infty}-\epsilon_{\text{static}}) \frac{\omega_{\text{TO}}}{\omega^2-\omega^2_{\text{TO}}}$$
In the self-consistent gain calculation, the quantity which is actually calculated is the a.c. conductivity $\sigma(\omega)$.
The complex relative permittivity which is output is then:
$$ \epsilon_{\text{r}}(\omega) = \epsilon^{\text{bulk}}_{\text{r}}(\omega) - i \frac{\sigma(\omega)}{\omega \epsilon_0} $$
Finally the gain reads
$$ g(\omega) = -\frac{\text{Re}(\sigma(\omega))}{\epsilon_{\text{r}}(\omega)} $$