Skip to content
Snippets Groups Projects
Commit f4a17849 authored by Johanna Zijderveld's avatar Johanna Zijderveld
Browse files

Tiny rename in compute-gap function

parent af9963b2
No related branches found
No related tags found
1 merge request!4Interface refactoring
......@@ -53,13 +53,13 @@ def generate_vectors(cutoff, dim):
return [*product(*([[*range(-cutoff, cutoff + 1)]] * dim))]
def compute_gap(h, fermi_energy=0, n=100):
def compute_gap(tb, fermi_energy=0, nk=100):
"""
Compute gap.
Parameters:
-----------
h : dict
tb : dict
Tight-binding model for which to compute the gap.
fermi_energy : float
Fermi energy.
......@@ -71,9 +71,9 @@ def compute_gap(h, fermi_energy=0, n=100):
gap : float
Indirect gap.
"""
ndim = len(list(h)[0])
hkfunc = tb_to_kfunc(h)
k_array = np.linspace(0, 2 * np.pi, n)
ndim = len(list(tb)[0])
hkfunc = tb_to_kfunc(tb)
k_array = np.linspace(0, 2 * np.pi, nk)
kgrid = list(it.product(*[k_array for i in range(ndim)]))
kham = np.array([hkfunc(k) for k in kgrid])
vals = np.linalg.eigvalsh(kham)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment