Step 1. How to generate EPIq input files

All the material needed to follow the tutorials can be found in the tutorials folder inside the epiq folder.

THIS STEP IS MANDATORY

In order to obtain any kind of non-adiabatic Wannier-interpolated response functions, EPIq requires two preliminary calculations: a Wannierization of the electronic structure ( using Wannier90 ) and a density functional perturbation theory calculation ( using Quantum Espresso).

EPIq requires Quantum Espresso version >= 7.1

We refer to this preliminary part as Step 1., which in turn is divided into three subparts. Here we demonstrate the procedure for the case of MgB2. All the material is in the tutorials/mgb2 folder of the EPIq release.

1.Wannier:

Perform a precise Wannierization of the system you want to study using Wannier90. The wannierized bands must be very accurate. The larger the error on the bands, the larger the error on the electron-phonon coupling.

Navigate to the tutorials/mgb2/1.Wannier folder. Then, the wannierization is performed as follows:

 pw.x  < MgB2.scf.in > MgB2.scf.out
 pw.x  < MgB2.nscf.in > MgB2.bands.out
 wannier90.x -pp MgB2
 pw2wannier90.x < MgB2.pw2wan > MgB2.pw2wan.out_wannwfc
 wannier90.x  MgB2

The initial self-consistent and non self-consistent calculations have to be performed within Quantum Espresso.

If you managed to complete the wannierization correctly, you should have produced MgB2.chk and MgB2.eig files. The outdir folder will be used in 3.electron_phonon.

2.phonons:

Navigate to the tutorials/mgb2/2.phonons folder. We now perform a linear response phonon calculation within Quantum ESPRESSO. Important notes: we set ldisp=.true. and nq1=nk1w, nq2=nk2w and nq3=nkw3, where nk1w,nk2w,nk3w indicate the Wannier grid dimensions. Run the phonons one after the other. Finally note the following option in the ph.x input file:

    dvscf_star%open=.true.,
    dvscf_star%basis= "cartesian", 

With these options, ph.x will produce a directory

Rotated_DVSCF

where all the potential variation files, dvscf_q(G), are stored. In the file Rotated_DVSCF/prefix.dfile_dir the full list of dvscf and the corresponding coordinates of the phonon momenta are given. Please note that the lines of this file must be ordered (i.e., phonons must be run in sequential order).

The procedure of step 2 goes as follows:

pw.x < MgB2.scf.in > MgB2.scf.out
ph.x <  MgB2.ph.in > MgB2.ph.out

3.electron_phonon (only one pool!):

Important: pools are not implemented for part III, do not use -npool

We now calculate the electron-phonon matrix elements on the same grid used in the Wannierization. The procedure is the following: Copy the dynamical matrices produced in the tuotorials/mgb2/2.phonons folder (dynq files) into tutorials/mgb2/3.electron_phonon. Navigate to the tutorials/mgb2/3.electron_phonon folder. Then:

ph.x -in  MgB2.elphm.in > MgB2.elphm.out

In the MgB2.elphm.in input file we have to specify:

&inputph
    ...
    outdir='../1.Wannier/tmp/',
    electron_phonon='Wannier',
    dvscf_star%dir='../2.phonons/Rotated_DVSCF',
    dvscf_star%basis='cartesian',
    dvscf_star%ext='dvscf',
    ldisp=.true.,
    nq1=6,
    nq2=6,
    nq3=4,
    ...
&end

Again, nq1=nk1w, nq2=nk2w, nq3=nk3w.

moreover

outdir points towards the outdir of the 1.Wannier step and dvscf_star%dir to the Rotated_DVSCF directory produced by the 2.phonons step. This is the end of Step 1. If everything went smoothly, you should have produced the following files that are needed for Step 2.:

   prefix.chk
   prefix.eig
   prefix_elph.mat.q_X  with X=1,...,nq1*nq2*nq3

Updated: