Skip to content

Commit

Permalink
[pygap] bugfix for version 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
QijingZheng committed Dec 1, 2022
1 parent d3f9bea commit ec35dc0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pygap
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@ def get_bandinfo_from_outcar(inf='OUTCAR'):

# for ispin = 2, there are two extra lines "spin component..."
N = (nband + 2) * nkpts * ispin + (ispin - 1) * 2

# in VASP 6.2, there is extra lines containing "Fermi energy: xxxx"
if 'Fermi energy:' in outcar[LineEfermi]:
N += ispin

bands = []
# vkpts = []
for line in outcar[LineEfermi:LineEfermi + N]:
if 'spin component' in line or 'band No.' in line:
continue
if 'Fermi energy:' in line:
continue
if 'k-point' in line:
# vkpts += [line.split()[3:]]
continue
Expand Down

0 comments on commit ec35dc0

Please sign in to comment.