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
This semiclassical gain calculation has the following limitations:
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 ~ \delta F ~ e^{-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. As shown by Wacker (Phys. Rev. B 66, 085336 (2002)), the Green's function linear response reads: $$ \delta G^R(E,\omega) = G^R(E+\hbar\omega) (H_{ac}+\delta\Sigma^R(E,\omega))G^R(E) $$
$$ \delta G^<(E,\omega) = G^R(E+\hbar\omega) H_{ac} G^<(E) \\ + G^<(E+\hbar\omega) H_{ac} G^A(E) \\ + G^R(E+\hbar\omega) \delta\Sigma^R(E,\omega) G^<(E) \\ + G^R(E+\hbar\omega) \delta\Sigma^<(E,\omega) G^A(E) \\ + G^<(E+\hbar\omega) \delta\Sigma^A(E,\omega) G^A(E) $$
In the self-consistent gain calculation, the 3 last terms are accounted. Indeed, to account for them, the self-energies $\delta\Sigma (E,\omega)$ need to be calculated from $\delta G^<(E,\omega)$, requiring a self-consistent loop. This self-consistent Gain calculation is activated by the command
<Gain> <GainMethod>1</GainMethod> ... </Gain>
in the input file. On the other hand, in the case of this command option 0 (not recommended), the 3 terms involving self-energies are neglected.
From this Green's function response, the a.c. conductivity is calculated: $$ \sigma(\omega) = \frac{\delta j(\omega)}{\delta F} $$ where the current a.c. response reads $$ \delta j(\omega) = Tr(G^< J) $$
where $J$ is the current operator.
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)} $$