Example of finding the bandgap#

The bandgap of a calculation can be found by:

General Format#
pyprocar.bandgap(procar="PROCAR", outcar="OUTCAR", code="vasp")

NOTE: The bandgap calculation should be done for non-self consistent (band structure) calculations.

Downloading example#
 data_dir = pyprocar.download_example(save_dir='',
                             material='Fe',
                             code='vasp',
                             spin_calc_type='non-spin-polarized',
                             calc_type='bands')
# sphinx_gallery_thumbnail_number = 1

importing pyprocar and specifying local data_dir

import os
import numpy as np
import pyprocar

data_dir = f"{pyprocar.utils.ROOT}{os.sep}data{os.sep}examples{os.sep}Fe{os.sep}vasp{os.sep}non-spin-polarized{os.sep}bands"

band_gap = pyprocar.bandgap(dirname=data_dir, code="vasp")
Band Gap = 0 eV

Total running time of the script: (0 minutes 0.125 seconds)

Gallery generated by Sphinx-Gallery