Header Ads Widget

Ab initio Calculations Using Vasp Code

Last Posts

10/recent/ticker-posts

How to plot the Band Structure using Pymatgen interface and SUMO tool

 To plot the Band Structure there are many ways. We will use 2 of them:

1- Using pymatgen interface

2- Using sumo tool,


We need the input files


POSCAR

fcc Si:
3.9
0.5 0.5 0.0
0.0 0.5 0.5
0.5 0.0 0.5
1
cartesian
0 0 0

     

INCAR

System = fcc Si
ISTART = 0 ; ICHARG = 2
ENCUT = 240
ISMEAR = 0; SIGMA = 0.1

   

KPOINTS

k-points
0
Monkhorst Pack
11 11 11
0 0 0

 

POTCAR

Download the pseudopotential file from this link POTCAR

NB: you can download the input files from fccSi.tgz

 

SCF calculation

First we need to do a scf calculation to get the  CHGCAR file


/Si_band> vasp_std

 

BAND calculation

To do the band calculation we need to modify the INCAR and KPOINTS  files as follows:

INCAR

general:
System = fcc Si
ICHARG=11 #charge read file
ENCUT = 240
ISMEAR = 0; SIGMA = 0.1;
LORBIT=11


  KPOINTS

Line_mode KPOINTS file
40
Line_mode
Reciprocal
0.0 0.0 0.0 ! \Gamma
0.5 0.0 0.5 ! X

0.5 0.0 0.5 ! X
0.5 0.25 0.75 ! W

0.5 0.25 0.75 ! W
0.375 0.375 0.75 ! K

0.375 0.375 0.75 ! K
0.0 0.0 0.0 ! \Gamma

0.0 0.0 0.0 ! \Gamma
0.5 0.5 0.5 ! L

0.5 0.5 0.5 ! L
0.625 0.25 0.625 ! U

0.625 0.25 0.625 ! U
0.5 0.25 0.75 ! W

0.5 0.25 0.75 ! W
0.5 0.5 0.5 ! L

0.5 0.5 0.5 ! L
0.375 0.375 0.75 ! K

0.625 0.25 0.625 ! U
0.5 0.0 0.5 ! X

 

(pytmatgen) Si.band> vasp_std

 

Plotting

Using pymatgen interface

We need to install the pymatgen interface ( you can install it from here )

We need also the following script

plotband.py

from pymatgen.io.vasp.outputs import Vasprun
from pymatgen.electronic_structure.plotter import BSPlotter

vaspout = Vasprun("./vasprun.xml")
bandstr = vaspout.get_band_structure(line_mode=True)
plt = BSPlotter(bandstr).get_plot(ylim=[-12,10])
plt.savefig("band-mat.pdf")

 

(pymatgen)....> chmod +x plotband.py
(pymatgen) ...> python plotband.py 

 



 
 

Using sumo tool

The sumo tool works also using the pymatgen interface but it gives a better picture. To install it we need to stay with the pytmatgen environment and doing the following:

 

(pymatgen) ...> pip install --user sumo
(pymatgen) ...> sumo-bandplot --width 4 --ymin -10 --ymax 10 --band-edges

 

 


To get the KPOINTS file for band structure calculation we can use the following script

make_line_kpoints.py

from pymatgen.io.vasp.inputs import Kpoints
from pymatgen.core import Structure
from pymatgen.symmetry.bandstructure import HighSymmKpath

struct = Structure.from_file("POSCAR")
kpath = HighSymmKpath(struct)
kpts = Kpoints.automatic_linemode(divisions=40,ibz=kpath)
kpts.write_file("KPOINTS_nsc")


(pymatgen)....> chmod +x make_line_kpoints.py
(pymatgen) ...> python make_line_kpoints.py

Post a Comment

0 Comments