In this section, we describe how to compute spin relaxation times. The ‘prefix’_epr.h5 file must be generated with fully relativistic pseudopotentials, spin-orbit coupling, and noncollinear magnetism. The scf, nscf, and Wannier90 calculations include spinor-related variables, and these input files can be found in the directory “example08-diamond-spin/pw-ph-wann”

Once these calculations are complete, we run qe2pert.x to generate the ‘prefix’_epr.h5 file. Here is the input file (qe2pert.in):

&qe2pert
 prefix='diam'
 outdir='.tmp'
 phdir='../pw-ph-wann/phonon/save'
 nk1=4, nk2=4, nk3=4
 dft_band_min=1
 dft_band_max=17
 num_wann=16
 lwannier=.true.
 lspinmat=.true.
/

The input parameters are the same as other qe2pert tutorials, except this flag:

  • lspinmat: a logical flag. Must be true for the spin calculations.

The following files need to be in the directory before running qe2pert.x:

  • ‘prefix’_centres.xyz, ‘prefix’_u.mat (and, when present, ‘prefix’_u_dis.mat), ‘prefix’.spn in the directory “pw-ph-wann/wann”
  • create a directory called “tmp”, and inside it soft link the QE nscf output directory ‘prefix’.save in the “pw-ph-wann/nscf/tmp”

The ‘prefix’.spn file is generated from the Wannier90 calculation flag write_spn.

Run qe2pert.x to get the ‘prefix’_epr.h5 file:

export OMP_NUM_THREADS=4
mpirun -np 2 qe2pert.x -npools 2 -i qe2pert.in > qe2pert.out

E-ph spin-flip matrix elements
calc_mode = ‘ephmat_spin’

The input file variables are the same as the calculation mode 'ephmat', except for the following variable:

For a description of the input parameters, see the 'ephmat' calculation mode section.

In this example, we are computing the e-ph spin-flip matrix elements summed over the bands from 10 to 11. Here is the input file (pert.in):

&perturbo
 prefix = 'diam'
 calc_mode = 'ephmat_spin'
 fklist = 'diam_band.kpt'
 fqlist = 'diam_band.qpt'

 band_min = 10
 band_max = 11

 phfreq_cutoff = 3          !meV
/

Before running perturbo.x, ensure that these files are in the run directory:

  • ‘prefix’_epr.h5: here diam_epr.h5
  • fklist: here diam_band.kpt
  • fqlist: here diam_band.qpt

For the format of fklist or fqlist files, please refer to the section on calc_mode='bands'.

Run perturbo.x:

mpirun -n 1 perturbo.x -npools 1 -i pert.in > pert.out 

The outputted YAML file, here called diam_ephmat_spin.yml, contains the inputs and outputs of the 'ephmat_spin' calculation. The field labeled ephmat_spin contains the information unique to the 'ephmat_spin' calculation, and follows the same format as a ‘prefix’_ephmat.yml file. The remaining sections are common to all Perturbo calculations, and their format is described here.

We can use Perturbopy next to export the data from the YAML file to Python for postprocessing. For more details, see the Perturbopy tutorial.

Spin texture
calc_mode = ‘spins’

The input file variables are the same as the calculation mode 'bands', except for the following variable:

Here is the input file(pert.in):

&perturbo
 prefix = 'diam'
 calc_mode = 'spins'
 fklist = 'diam_band.kpt'
/

Similar to the 'bands' calculation, the \(\mathbf{k}\) point list (here diam_band.kpt) must be included in the run directory. Before running perturbo.x, remember to soft link the ‘prefix’_epr.h5 in the run directory.

Run perturbo.x:

mpirun -n 1 perturbo.x -npools 1 -i pert.in > pert.out 

The outputted YAML file, here diam_spin.yml, contains the inputs and outputs of the 'spins' calculation. The field labeled spins contains information unique to the 'spins' calculation, including the interpolated band structure and the corresponding \(\langle n \vert \sigma_z \vert n \rangle\) values. The remaining sections are common to all Perturbo calculations, and their format is described here.

An example of the spins field is shown below:

spins:

   number of bands:   16

   k-path coordinate units: arbitrary
   k-path coordinates:
      -    0.0000000
      ......
      -    3.7802390

   k-point coordinate units: crystal
   k-point coordinates:
      - [   0.50000,     0.50000,     0.50000,  ]
      ......
      - [   0.00000,     0.00000,     0.00000,  ]

   band units: eV
   band index:

      1:
         -   -2.2625079114
         ......
         -   -8.1405858731
      ......
      16:
         -   29.0554797835
         ......
         -   27.0167795110

   <n|sigma_z|n> units: arbitrary
   band index (spins):

      1:
         -     -0.9999999828832089
         ......
         -     -0.9999999999705342
      ......
      16:
         -      0.9999998110975591
         ......
         -      1.0000000000274569

The output format is identical to the 'bands' output (‘prefix’_bands.yml), with the addition of \(\langle n \vert \sigma_z \vert n \rangle\) values specified for each band index. We can use Perturbopy next to export the data from the YAML file to Python for postprocessing. For more details, see the Perturbopy tutorial.

Imaginary part of e-ph spin-flip self-energy
calc_mode = ‘imsigma_spin’

The 'setup' calculation mode must be done before this, and these input files can be found in the directory “example08-diamond-spin/perturbo/pert-setup”.

The input file variables for the 'imsigma_spin' calculation are the same as the calculation mode 'imsigma', except for the following variable:

For a description of the input parameters, see the 'imsigma' calculation mode section.

Here is the input file (pert.in):

&perturbo
 prefix = 'diam'
 calc_mode = 'imsigma_spin'

 fklist = 'diam_tet.kpt'     !kpt file from setup calculation
 ftemper = 'diam.temper'

 band_min = 10
 band_max = 11

 phfreq_cutoff = 3           ! meV !Phonon frequency cutoff
 delta_smear = 20            ! meV      !Smearing value

 sampling = 'uniform'        !Type of q-point sampling
 nsamples = 1000000          !Number of q-points
 /

Before running perturbo.x, ensure that these files are in the run directory:

  • ‘prefix’_epr.h5: here diam_epr.h5
  • fklist: here diam_tet.kpt obtained in the 'setup' calculation
  • ftemper: here diam.temper obtained in the 'setup' calculation

Run perturbo.x:

export OMP_NUM_THREADS=4
mpirun -n 8 perturbo.x -npools 8 -i pert.in > pert.out

The outputted YAML file, here called diam_imsigma_spin.yml, contains the inputs and outputs of the 'imsigma_spin' calculation. The field labeled imsigma_spin contains the information unique to the 'imsigma_spin' calculation, and follows the same format as a ‘prefix’_imsigma.yml file. The remaining sections are common to all Perturbo calculations, and their format is described here.

We can use Perturbopy next to export the data from the YAML file to Python for postprocessing. For more details, see the Perturbopy tutorial.

Spin relaxation times
calc_mode = ‘spinlifetime’

The 'setup' and 'imsigma_spin' calculation modes must be done before the 'spinlifetime' calculation.

The input file variables are the same as the calculation mode 'setup', except for the following variable:

For a description of the input parameters, see the 'setup' calculation mode section.

Here is the input file (pert.in):

&perturbo
 prefix = 'diam'
 calc_mode = 'spinlifetime'
  
 boltz_kdim(1) = 70
 boltz_kdim(2) = 70
 boltz_kdim(3) = 70

 ftemper  = 'diam.temper'

 band_min = 10
 band_max = 11
/

Before running perturbo.x, ensure that these files are in the run directory:

  • ‘prefix’_epr.h5: here diam_epr.h5
  • ftemper: here diam.temper obtained in the 'setup' calculation
  • prefix_tet.h5: here diam_tet.h5 obtained in the 'setup' calculation
  • prefix.imsigma_flip: here diam.imsigma_flip obtained in the 'imsigma_spin' calculation

Run perturbo.x:

export OMP_NUM_THREADS=4
mpirun -n 8 perturbo.x -npools 8 -i pert.in > pert.out

The outputted YAML file, here called diam_spinlifetime.yml, contains the inputs and outputs of the 'spinlifetime' calculation. The field labeled spin lifetime contains information unique to the 'spinlifetime' calculation. The remaining sections are common to all Perturbo calculations, and their format is described here.

An example of results from the spin lifetime field is given below:

spin lifetime:

   temperature units: K

   chemical potential units: eV

   tau units: ns

   # Configuration means one line in the temper file:
   # temperature efermi concentration
   number of configurations:   1

   configuration index:

      1:
         temperature: 300.00
         chemical potential:  17.29939
         tau:  0.256138E+03

Note that in this case, we only used one configuration. Under the configuration index field, data for each of the configurations from the ftemper file are given:

  • The temperature of the configuration is given in K units, and chemical potential is given in eV units.
  • The relaxation time \(\tau\) is given in nanoseconds.