Skip to content

Commit

Permalink
fixed #827 where the energy was not updated
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <nickpapior@gmail.com>
  • Loading branch information
zerothi committed Sep 13, 2024
1 parent 3a4f50e commit 37f90f4
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/sisl/io/siesta/binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2158,17 +2158,6 @@ class _gfSileSiesta(SileBinSiesta):
"""

def _setup(self, *args, **kwargs):
"""Simple setup that needs to be overwritten"""
super()._setup(*args, **kwargs)

# The unit convention used for energy-points
# This is necessary until Siesta uses CODATA values
if kwargs.get("version", "old").lower() in ("old", "4.1"):
self._E_Ry2eV = 13.60580
else:
self._E_Ry2eV = _Ry2eV

def _open_gf(self, mode, rewind=False):
self._fortran_open(mode, rewind=rewind)

Expand Down Expand Up @@ -2407,7 +2396,7 @@ def read_header(self):
self._no_u = no_u * 2
else:
self._no_u = no_u
self._E = E * self._E_Ry2eV
self._E = E * _Ry2eV
self._k = k.T

return nspin, no_u, self._k, self._E
Expand Down Expand Up @@ -2626,7 +2615,7 @@ def write_header(self, bz, E, mu: float = 0.0, obj=None):
mu * _eV2Ry,
_toF(k.T, np.float64),
w,
self._E / self._E_Ry2eV,
self._E / _Ry2eV,
**sizes,
)
self._fortran_check("write_header", "could not write header information.")
Expand All @@ -2649,7 +2638,7 @@ def write_hamiltonian(self, H, S=None):
_siesta.write_gf_hs(
self._iu,
self._ik,
self._E[self._iE] / self._E_Ry2eV,
self._E[self._iE] / _Ry2eV,
_toF(H, np.complex128, _eV2Ry),
_toF(S, np.complex128),
no_u=no,
Expand Down Expand Up @@ -2677,7 +2666,7 @@ def write_self_energy(self, SE):
self._iu,
self._ik,
self._iE,
self._E[self._iE] / self._E_Ry2eV,
self._E[self._iE] / _Ry2eV,
_toF(SE, np.complex128, _eV2Ry),
no_u=no,
)
Expand Down

0 comments on commit 37f90f4

Please sign in to comment.