Electron Phonon Coupling (new)
THIS TUTORIAL IS NOT COMPLETE and NOT WORKING YET --- PLEASE USE THE OLD ONE
Electron Phonon Coupling (old tutorial)

Here we show step-by-step how to use Quantum Espresso to calculate phonons and electron-phonon matrix-elements on a regular q-grid. The final aim is to allow Yambo to read them and calculate the temperature-dependent correction to the electronic states. This tutorial is based on Cannuccia blog and it is quite articulated, take your time to do it patiently.
In this first section we will explain how to generate electron-phonon matrix elements in Quantum-Espresso, and how to import them in Yambo. Calculations will be divided in different folders:
- pseudo the pseudo potential folder
- scf for the self-consistent calculation
- nscf for the non-self-consistent calculation with a larger number of bands
- phonon for the phonon calculations
All input file are availabe in the following tgz file: si.elph.tgz
SCF
Go in the SCF folder and run the self-consistent calculation with the command: pw.x -inp si.scf.in > output_scf
Notice that:
a) If you are working with 2D systems, not our case, we have to add the flag assume_isolated="2D" in such a way correct 2D phonons.
b) If the cell is an FCC, set manually the cell parameters by using the flag ibrav=0 in your scf input file. This allows to generate correctly the uniform q grid over which phonons and electron-phonon databases are calculated, for example for Silicon you can use:
&system ...... ibrav= 0, celldm(1) =5.132 ..... / ..... CELL_PARAMETERS alat 0.0 1.0 1.0 1.0 0.0 1.0 1.0 1.0 0.0
NSCF
Go into the nscf folder, and then copy the ${PREFIX}.save folder from scf to nscf, in the present example just do cp -r ../scf/si.save ./.
In the nscf input you have to choose the number of k-points and bands you will use for the electron-phonon coupling and Yambo calculations, in our case we will use a 4x4x4 grid and 12 bands.
Run the nscf calculation to get the Kohn-Sham band structure: pw.x -inp si.nscf.in > output_nscf
Phonons
Plug into phonon directory. You have to copy the self-consistent calculation in this folder with the command cp -r ../scf/si.save ./ . Then run phonons on the same grid of the nscf calculation, in this case the 4x4x4.
&inputph
verbosity = 'high',
tr2_ph = 1e-12,
prefix = 'si',
fildvscf = 'si-dvscf',
fildyn = 'si.dyn',
electron_phonon = 'dvscf',
epsil =.true.,
ldisp=.true., recover=.true.,
nq1=4, nq2=4, nq3=4 /
you can run phonons with the command: ph.x -inp si.phoonon.in > output_ph .
Create Lumen SAVE directory
This is just the standard Yambo initialization: run
p2y
and then
yambo
in the nscf save folder and then move the newly generated SAVE directory to a convenient place.
Read DVSCF with LetzElPhC
We have finished the heavy simulations. Now it's time for the postprocessing. The first order of business is the reconstruction of the electron-phonon coupling matrix elements from the dvscf results and the electronic wavefunctions.
In order to do this, we will run the lelphc executable of the LetzElPhC code. We will run via command line using yambopy, although it will be instructive to have look at the lelphc input files later.
We run in the same directory where the Yambo SAVE is (remember than you can also virtually move it with a symbolic link).
Type:
yambopy l2y
to see the help for the calculation. Have a look at the various flags and their description. For example, if we want to do a serial run of LetzElPhC for bands from to , we should type:
yambopy l2y -ph phonons.input -b n_i n_f
Here and are integers representing the initial and final band indices. Please note: in this case, the band index starts from 1 and the the interval of bands read by the code is including the extrema of the interval.
These should coincide with the bands used in the nscf calculations. In addition, we want to explicitly specify the path of the lelphc executable and avoid automatically deleting the LetzElPhC data. So we type:
yambopy l2y -ph ../../phonons/si.phonon.in -b 1 12 -lelphc path/to/lelphc_exe --no_lelphc_dbs
This calculation can be parallelized adding the flag -par nkpool nqpool if necessary, in this example the calculation is fast so we will run it in serial.
At the end, check your directory: you should find the lelphc.in input file that was run, let's inspect it:
# LetzElPhC input for yambo generated by yambopy nqpool = 1 nkpool = 1 start_bnd = 1 end_bnd = 12 save_dir = ./SAVE kernel = dfpt ph_save_dir = dvscf/ph_save convention = yambo
You will also find a ndb.elph database that contains the computed electron-phonon matrix elements, in the output format of LetzElPhC.
In addition, if you check the SAVE folder:
ls SAVE/ndb.elph_gkkp*
you will see that yambopy has created the Yambo-compatible electron-phonon databases.
Since in this tutorial we don't need the ndb.elph databases we added the option --no_lelphc_dbs to yambopy.
THIS TUTORIAL IS NOT COMPLETE and NOT WORKING YET --- PLEASE USE THE OLD ONE