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://drive.g

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 ................................

WiFi randomly disconnected on Ubuntu 18.04 LTS

  I was having the same issue with bionic. First, I thought it was related to Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter, but even after updating it the signal continued to fluctuate. It appears to be related to the gnome's network manager. After switching to WICD, the wi-fi hasn't been unstable anymore (that was almost 4 months ago). [EDIT: Still no issues as of today 05/28/2019] Here are a few steps to apply this fix: Open up a Terminal and execute the following commands: First, install WICD: sudo apt install wicd-gtk Next, we uninstall NetworkManager: sudo apt remove network-manager-gnome network-manager After everything is confirmed to be working (best to check this after rebooting), you can remove config files for NetworkManager: sudo dpkg --purge network-manager-gnome network-manager (source  https://help.ubuntu.com/community/WICD  ) https://askubuntu.com/questions/1030653/wifi-randomly-disconnected-on-ubuntu-18-04-lts