Skip to content

Commit

Permalink
[vaspwfc.py] add _efermi
Browse files Browse the repository at this point in the history
  • Loading branch information
QijingZheng committed Jul 4, 2024
1 parent 823fb47 commit 8975f6c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions vaspwfc.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,16 @@ def readWFHeader(self):
self._WFPrec = self.setWFPrec()
# the second record
self._wfc.seek(self._recl)
dump = np.fromfile(self._wfc, dtype=np.float64, count=12)
# From VASP 5.x on, Fermi energy is also written in this line, hence
# change 12 to 13
dump = np.fromfile(self._wfc, dtype=np.float64, count=13)

self._nkpts = int(dump[0]) # No. of k-points
self._nbands = int(dump[1]) # No. of bands
self._encut = dump[2] # Energy cutoff
# Valid from VASP 5.x on
self._efermi = float(dump[12])

self._nkpts = int(dump[0]) # No. of k-points
self._nbands = int(dump[1]) # No. of bands
self._encut = dump[2] # Energy cutoff
# real space supercell basis
self._Acell = dump[3:].reshape((3, 3))
# real space supercell volume
Expand Down

0 comments on commit 8975f6c

Please sign in to comment.