From aa8c631c2781de8e197104a5341d425898cbc79e Mon Sep 17 00:00:00 2001 From: Jonathan Karp Date: Thu, 28 May 2020 16:58:36 -0400 Subject: [PATCH] made fermi_energy an attribute of the converter --- python/converters/wannier90_converter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/converters/wannier90_converter.py b/python/converters/wannier90_converter.py index 842085fd..f7f60960 100644 --- a/python/converters/wannier90_converter.py +++ b/python/converters/wannier90_converter.py @@ -143,9 +143,9 @@ class Wannier90Converter(ConverterTools): corr_shells = [{name: int(val) for name, val in zip( corr_shell_entries, R)} for icrsh in range(n_corr_shells)] try: - fermi_energy = R.next() + self.fermi_energy = R.next() except: - fermi_energy = 0. + self.fermi_energy = 0. except StopIteration: # a more explicit error if the file is corrupted. mpi.report(self._name + ": reading input file %s failed!" % self.inp_file) @@ -448,7 +448,7 @@ class Wannier90Converter(ConverterTools): # fill h_of_r with the matrix elements of the Hamiltonian if not numpy.any(rcurr) and ii == jj: - h_of_r[ir][ii, jj] = complex(float(cline[5]) - fermi_energy, float(cline[6])) + h_of_r[ir][ii, jj] = complex(float(cline[5]) - self.fermi_energy, float(cline[6])) else: h_of_r[ir][ii, jj] = complex(float(cline[5]), float(cline[6]))