mirror of
https://github.com/triqs/dft_tools
synced 2024-12-23 04:43:42 +01:00
efermi is now read from LOCPROJ if DOSCAR does not contain it yet (e.g., for csc calculations)
This commit is contained in:
parent
ce6ff62af4
commit
4b8a284a98
@ -88,8 +88,12 @@ class VaspData:
|
||||
self.doscar.from_file(vasp_dir)
|
||||
except (IOError, StopIteration):
|
||||
if efermi_required:
|
||||
raise Exception("Efermi cannot be read from DOSCAR")
|
||||
pass
|
||||
print "!!! WARNING !!!: Error reading from Efermi from DOSCAR, trying LOCPROJ"
|
||||
try:
|
||||
self.plocar.efermi
|
||||
self.doscar.efermi = self.plocar.efermi
|
||||
except NameError:
|
||||
raise Exception("Efermi cannot be read from DOSCAR or LOCPROJ")
|
||||
else:
|
||||
# TODO: This a hack. Find out a way to determine ncdij without DOSCAR
|
||||
print "!!! WARNING !!!: Error reading from DOSCAR, taking Efermi from config"
|
||||
@ -240,6 +244,11 @@ class Plocar:
|
||||
self.nspin = 1 if self.ncdij == 1 else 2
|
||||
self.nspin_band = 2 if self.ncdij == 2 else 1
|
||||
|
||||
try:
|
||||
self.efermi = float(sline[4])
|
||||
except:
|
||||
print "!!! WARNING !!!: Error reading E-Fermi from LOCPROJ, trying DOSCAR"
|
||||
|
||||
plo = np.zeros((nproj, self.nspin, nk, self.nband), dtype=np.complex128)
|
||||
proj_params = [{} for i in xrange(nproj)]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user