Hi,
The lifetime that is computed in the OUTCAR file is our best try to compute a value which when used as a constant relaxation time should yield the same result as the full calculation.
The formula implemented is this one:
\(
\tau_{\mathrm{avg}} = \frac{ \sum_{n, \mathbf{k}, s} \tau_{n \mathbf{k} s} \, f'\left( \epsilon_{n \mathbf{k} s} - \mu \right) }
{ \sum_{n, \mathbf{k}, s} f'\left( \epsilon_{n \mathbf{k} s} - \mu \right) }
\)
with
\(
f'(x) = \frac{ e^{x / (k_B T)} }{ \left( e^{x / (k_B T)} + 1 \right)^2 }
\)
Note that this is not well defined for T=0 so that is why you might see some NaN in the OUTCAR.
It can be fixed using the tetrahedron method but I did not get around to do it.
Yes it is possible to plot the lifetimes of each of the KS states as function of their energy.
We are working on providing this functionality using py4vasp.
In the meantime you can use a simple python script that reads the hdf5 file like this one:
Code: Select all
import h5py
import matplotlib.pyplot as plt
itemp = 0
with h5py.File('vaspout.h5', 'r') as f:
ncalculators = f['/results/electron_phonon/electrons/self_energy_meta/ncalculators'][()]
for i in range(ncalculators):
scattering_approx = f[f'/results/electron_phonon/electrons/self_energy_{i+1}/scattering_approximation'][()]
if "SERTA" not in scattering_approx.decode('utf-8'): continue
fan_re = f[f'/results/electron_phonon/electrons/self_energy_{i+1}/selfen_fan'][:]
energies = f[f'/results/electron_phonon/electrons/self_energy_{i+1}/energies'][:]
fan = fan_re[:,:,:,0] + 1j * fan_re[:,:,:,1]
x=energies.flatten()
y=abs(fan[:,:,itemp].flatten().imag)
plt.scatter(x,y,label=i)
break
plt.legend()
plt.show()