How to calculate the photoluminescence spectrum from DFT band calculations?

Photoluminescence (PL) spectrum is one of the experimental observable used, among other things, to have an accurate idea about the material band structure.

It can be calculated using the band structure and wavefunctions together with the Fermi's golden rule.

Is there any tool or script to estimate the PL spectra from DFT calculations using software like SIESTA and/or Quantum ESPRESSO?

Nice question!

My answer will be based on the optical response that can be obtained with the Quantum ESPRESSO package, not the Photoluminescence specifically, but the responses can be correlated. The absorption spectrum can be correlated to the photoluminescence one since it preserves the selection rules from inter and intra-band transitions.

Quantum ESPRESSO has two ways for evaluating optical properties: the codes epsilon.x and turbo_eels.x. The former evaluates the frequency-dependent dielectric function, returning its real ($$\epsilon_1$$) and imaginary ($$\epsilon_2$$) parts. The latter also returns the dielectric function together with the frequency-dependent susceptibility ($$\chi$$) and the imaginary part of the inverse of the complex dielectric function ($$Im(\epsilon^{-1})$$), which is related to inelastic X-ray spectroscopy (IXS) and to electron energy loss spectroscopy (EELS).

From the dielectric function, the absorption spectrum can be obtained by evaluating the real ($$n$$) and imaginary ($$k$$) parts of the refractive index

$$n(\hbar\omega)=\left[ \frac{1}{2}\left(\left(\epsilon_1^2 +\epsilon_2^2 \right)^{\frac{1}{2}} + \epsilon_1\right)\right]^{\frac{1}{2}}$$,
$$k(\hbar\omega)=\left[ \frac{1}{2}\left(\left(\epsilon_1^2 +\epsilon_2^2 \right)^{\frac{1}{2}} - \epsilon_1\right)\right]^{\frac{1}{2}}$$.

Therefore

$$\alpha(\hbar\omega)= \frac{2\omega}{c}k$$.

The epsilon.x code requires the self-consistent field (SCF) calculation to be performed with Norm-conserving pseudopotentials (it is not implemented for Ultrasoft ones), with very-well converged ground stated energy, with thresholds bellow $$10^{-10}$$Ry. For metals, due to the occupations of the bands, a "fake-temperature" like smearing parameter is required and the dielectric response presents a weak-dependence on it and should be optimized. The epsilon.x code does not takes into account electron-electron interaction, which can shift the optical response.

The turbo_eels.x code, though, takes into account electron-electron interaction and can be used with Ultrasoft-pseudopotentials, requiring minor plane-waves cut off. However, the dielectric response should be optimized against the k-points sampling and the number of iterations. It is based on the optical or electronic transferred momentum $$Q$$, allowing for $$\theta$$-dependent responses (where $$\theta$$ is the incidence angle) such as the reflectivity

$$R(\hbar\omega)=\frac{(n_0 - n)^2 + k^2}{(n_0 + n)^2 + k^2}$$,

where $$n_0$$ is the refractive index of the incident medium.

As a final note, this reference shows the results of luminescence and absorption responses for silicon using Quantum ESPRESSO.