Quantum ESPRESSO Guide
Hi there,
If you have successfully installed Quantum ESPRESSO, let's run your first unit cell. There are many ways to run QE, such as direct installation or manual installation. To RUN the simulation, you can use a script or manual RUN.
SCF Run
Here is one of the SCF input files to run and get the BandGap (the gap between the conduction band and valence band):
&CONTROL calculation = "scf" outdir = "/home/nanolab/nanoMat/sigap/unitcell/GaP/work/" prefix = "GaP" pseudo_dir = "/home/nanolab/nanoMat/pseudo" restart_mode = "from_scratch" verbosity = 'high' / &SYSTEM ibrav = 4 a = 3.84 c = 20 nat = 2 ntyp = 2 input_dft = 'PBE' ecutwfc = 30 ecutrho = 120 occupations = 'smearing' smearing = 'm-p' degauss = 0.005 vdw_corr = 'DFT-D' / &ELECTRONS conv_thr = 1.00000e-8 mixing_beta = 0.7 / ATOMIC_SPECIES Ga 69.723 Ga.pbe-mt_fhi.UPF P 30.973761d0 P.pbe-mt_fhi.UPF ATOMIC_POSITIONS (angstrom) Ga 0.000000000 0.000000000 0.000000000 P 0.000000000 2.217025034 0.400000000 K_POINTS {automatic} 10 10 1 0 0 0
Run this in the terminal using:
mpirun -np 2 /home/nanolab/nanoMat/qe-6.6/bin/pw.x -i /home/nanolab/nanoMat/sigap/unitcell/GaP.scf.in > /home/nanolab/nanoMat/sigap/unitcell/GaP.scf.out
The output file will be GaP.scf.out
. Check this file to confirm the structure is stable by verifying that the energy level is negative.
NSCF Run
The NSCF input file looks like:
&CONTROL calculation = "bands" outdir = "/home/nanolab/nanoMat/sigap/unitcell/GaP/work/" prefix = "GaP" pseudo_dir = "/home/nanolab/nanoMat/pseudo" restart_mode = "from_scratch" verbosity = "high" / &SYSTEM ibrav = 4 a = 3.84 c = 20 nat = 2 ntyp = 2 input_dft = 'PBE' ecutwfc = 30 ecutrho = 120 occupations = 'smearing' smearing = 'm-p' degauss = 0.005 vdw_corr = 'DFT-D' / &ELECTRONS conv_thr = 1.00000e-8 mixing_beta = 0.7 / ATOMIC_SPECIES Ga 69.723 Ga.pbe-mt_fhi.UPF P 30.973761d0 P.pbe-mt_fhi.UPF ATOMIC_POSITIONS (angstrom) Ga 0.000000000 0.000000000 0.000000000 P 0.000000000 2.217025034 0.400000000 K_POINTS crystal_b 4 gG 20 K 20 M 20 gG 20
Run this in the terminal using:
mpirun -np $NP $D_QE/pw.x -i $D_IN/$F_PREFIX.band_nscf.in > $D_OUT/$F_PREFIX.band_nscf.out
The output will help identify the K points where the valence and conduction bands are closest. You can calculate the bandgap from this energy difference.
BAND Run
The BAND input file looks like:
&BANDS outdir = "/home/nanolab/nanoMat/sigap/unitcell/GaP/work/", prefix = "GaP", filband = "/home/nanolab/nanoMat/sigap/unitcell/GaP/OUT/GaP.band", lsym = .true. /
After the BAND simulation, you will get:
- GaP.band: Contains the band data.
- GaP.band.gnu: For plotting in GNUPLOT.
Plotting the Band Structure
Install GNUPLOT using:
sudo apt install gnuplot -y
Then execute the GNUPLOT script using:
before run the script, giive the permission by >>sudo chmod +x plot_band.script then run the script file to plot: ./plot_band.script
GNUPLOT script example:
#!/usr/bin/gnuplot -persist reset set term pngcairo font 'Times-Bold,20' set output "GaP_BANDS.png" set label 'Band Gap = 2.05 eV' at 0.85,0.3 set xtics ("{/Symbol G}" 0.0000,"K" 0.6667,"M" 1.0000,"{/Symbol G}" 1.5774) set arrow from 0.0000,graph(0,0) to 0.0000,graph(1,1) nohead lc 0 lw 2 set arrow from 0.6667,graph(0,0) to 0.6667,graph(1,1) nohead lc 0 lw 2 set arrow from 1.0000,graph(0,0) to 1.0000,graph(1,1) nohead lc 0 lw 2 set arrow from 0,0 to 1.5774,0 nohead dt "-" lc 0 lw 2 set yrange [-3 : 3] set ylabel 'Energy E-E_F (eV)' offset 0,0.5 set xlabel 'K Points' offset 0,0 FE=-3.1921 plot "GaP.band.gnu" using 1:($2-FE) w l lc 'brown' lw 4 title "h-GaP"
The output PNG file will display the bandgap graphically.
The K Points are as below, for the exact structure as ibrav=4
M Points
Real form of k-point coordinates (kx, ky, kz, label):
- 0.5000000000, 0.0000000000, 0.0000000000, K.1
- 0.5000000000, -0.5000000000, 0.0000000000, K.2
- 0.0000000000, -0.5000000000, 0.0000000000, K.3
- -0.5000000000, 0.0000000000, 0.0000000000, K.4
- -0.5000000000, 0.5000000000, 0.0000000000, K.5
- 0.0000000000, 0.5000000000, 0.0000000000, K.6
- 0.5000000000, 0.0000000000, 0.0000000000, K.7
K Points
Real form of k-point coordinates (kx, ky, kz, label):
- 0.3333333333, 0.3333333333, 0.0000000000, K.1
- 0.6666666667, -0.3333333333, 0.0000000000, K.2
- 0.3333333333, -0.6666666667, 0.0000000000, K.3
- -0.3333333333, -0.3333333333, 0.0000000000, K.4
- -0.6666666667, 0.3333333333, 0.0000000000, K.5
- -0.3333333333, 0.6666666667, 0.0000000000, K.6
- 0.3333333333, 0.3333333333, 0.0000000000, K.7
G Points
Real form of k-point coordinates (kx, ky, kz, label):
- 0.0000000000, 0.0000000000, 0.0000000000, K.1
- 0.0000000000, 0.0000000000, 0.0000000000, K.3
Comments
Post a Comment