Having computed the \(\operatorname{Im}\Sigma\) values from the 'imsigma' PERTURBO calculation (described here), one can find the relaxation time \(\tau\) in the following way:

\[\tau = \frac{\hbar}{2} \frac{1}{\operatorname{Im}\Sigma}.\]

The scattering rate can be then found as the inverse of the relaxation time, \(\tau^{-1}\).

In order to calculate the relaxation times and the scattering rates from the 'imsigma' calculation, we provide the relaxation_time.py Python script. To use it, you should have a ‘preifx’.imsigma file obtained as an output from the 'imsigma' calculation.

Run the script in the directory where the ‘preifx’.imsigma file is located:

$ [perturbo_path]/utils/relaxation_time.py

If you have more than one .imsigma file in the directory, specify the file name with --imsigma_file [file.imsigma] (or -i [file.imsigma]) option.

The script generates the file called relaxation_time.dat, which has the following format:

 # it   ik  ibnd      E(ibnd)(eV)   Relaxation time(in fs)   Scattering rate (in THz)
   1       1     1      6.955370    2.6511488462206518e+01  3.7719496641071323e+01
  ......
  ......
 #------------------------------------------------------------

The first four columns are the same as in the ‘prefix’.imsigma file, which are: 1) the dummy variable for the temperature, 2) the number of \(\mathbf{k}\) point, 3) the band number, 4) the energy. The 5th and 6th columns are the relaxation time (in fs) and the scattering rate (in THz).