Skip to content

Commit

Permalink
doc: cleaned documentation for the eigenvalues
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Sep 26, 2019
1 parent 4e501b0 commit 01a5bf1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sisl/io/siesta/eig.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,30 @@ def read_data(self):
Returns
-------
numpy.ndarray : all eigenvalues, shifted to :math:`E_F = 0`, shape ``(ns, nk, no)``
numpy.ndarray : all eigenvalues, shifted to :math:`E_F = 0`, shape ``(ns, nk, nb)``
where ``ns`` number of spin-components, ``nk`` number of k-points and
``no`` number of orbitals.
``nb`` number of bands.
"""
Ef = self.read_fermi_level()

# Read the total length of the path
no, ns, nk = map(int, self.readline().split())
nb, ns, nk = map(int, self.readline().split())
if ns > 2:
# This is simply a NC/SOC calculation which is irrelevant in
# regards of the eigenvalues.
ns = 1

# Allocate
eigs = np.empty([ns, nk, no], np.float64)
eigs = np.empty([ns, nk, nb], np.float64)

readline = self.readline
for ik in range(nk):
# The first line is special
E_list = list(map(float, readline().split()[1:]))
for _ in range(ns):
while len(E_list) < ns*no:
while len(E_list) < ns * nb:
E_list.extend(list(map(float, readline().split())))
eigs[:, ik, :] = np.asarray(E_list, np.float64).reshape(ns, no)
eigs[:, ik, :] = np.asarray(E_list, np.float64).reshape(ns, nb)

return eigs - Ef

Expand Down

0 comments on commit 01a5bf1

Please sign in to comment.