Skip to content
Snippets Groups Projects
Commit 91f98550 authored by Christoph Groth's avatar Christoph Groth
Browse files

raise exception when ldos is called without check_hermiticity

parent febe845c
No related branches found
No related tags found
No related merge requests found
......@@ -459,11 +459,15 @@ class SparseSolver(object):
ldos : a NumPy array
Local density of states at each orbital of the system.
"""
if not check_hermiticity:
raise NotImplementedError("ldos for non-Hermitian Hamiltonians "
"is not implemented yet.")
for lead in sys.leads:
if not hasattr(lead, 'modes'):
# TODO: fix this
raise NotImplementedError("ldos for leads with only "
"self-energy is not implemented yet")
"self-energy is not implemented yet.")
linsys, lead_info = \
self._make_linear_sys(sys, xrange(len(sys.leads)), energy, args,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment