Note
Go to the end to download the full example code.
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")
C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
warnings.warn(
Band Gap = 0 eV
Total running time of the script: (0 minutes 0.132 seconds)