Skip to main content

Step-by-Step Guide to Running Your First Quantum ESPRESSO Simulation

Quantum ESPRESSO Guide

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

Popular posts from this blog

Tutorials Download Link | Software Download Link

  ====================================================== BooKs ====================================================== Ebooks Collection : Click Here ====================================================== Tutorials ======================================================   All Useful Google Drive Links 300 TB Link – https://drive.google.com/drive/folders/1oCMgJeBc55NuEasPcgwjx2FuPdQd8neu Heaven 50TB – https://drive.google.com/drive/folders/1hxe7Des-ooQpamAtjyR7CX-k_hyqlQ7Q Plenty Of Udemy Courses – https://drive.google.com/drive/u/0/folders/1RDGY0Q3WBO_OE1gyImUn1W2ybFuFo6AQ 1.25 TB Course Collection – https://drive.google.com/drive/u/0/folders/1ASdn3H_kF_HsNswsQc4F3rh_PHmGNjKK DK English Books – https://drive.google.com/drive/u/1/folders/13NgYNawnbS3YqExM9Zi3y2YYSqyVr7Xd SAT Books & Past Exams – https://drive.google.com/drive/u/0/folders/14P77CHMXbErX19AUc5A05lEb_UcEAT8E Mixed Folder – https://drive.google.com/drive/folders/1DsvR68wjyT1WbNZb6tgzFep_3-hzecXm TKT Books – https:...

Government Job Opportunities for EEE, ECE & ETE Graduates in Bangladesh

🚀 Government Job Opportunities for EEE, ECE & ETE Graduates in Bangladesh If you are a graduate in Electrical and Electronic Engineering (EEE) , Electronics and Communication Engineering (ECE)  or Electronics and Telecommunication Engineering (ETE) , you have a vast field of career possibilities within the government sector of Bangladesh. Whether it's power, energy, telecom, infrastructure, or scientific research, your academic background aligns directly with the technical needs of numerous public organizations. Many of these entities publish regular job circulars , making them a prime target for stable and prestigious employment. Here's a comprehensive list of government organizations and entities where you can build a solid and impactful career: ⚡ Power Division: This is one of the most active fields for EEE graduates, offering roles in electricity distribution, transmission, generation , and policy & planning . 1. Distribution Companies: BPDB (Bangladesh ...

Configure QUANTUM ESPRESSO Parallel execution Setup/Installation procedure

To install QE with Parallel:  extract QE download from [www.quantum-espresso.org] & Extract. goto inside qe-6.6 or Download From Here ................. Open a Terminal ..................... >> sudo apt-get update >> sudo apt-get upgrade >> sudo apt-get install gfortran >> ./configure >> sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev [you must have to install libopenmpi-dev or intel mpi  so that the mpi can communicate with processor otherwise it will be serial] >> ./configure  >> make all ...................... If after configuration if it shows ( ./configure ) Parallel environment detected successfully.\ Configured for compilation of parallel executables. For more info, read the ESPRESSO User's Guide (Doc/users-guide.tex). -------------------------------------------------------------------- configure: success Then ................................. Done ................................