From f4a17849a57c433590f24630ac82cbaab2e2264c Mon Sep 17 00:00:00 2001 From: Johanna <johanna@zijderveld.de> Date: Mon, 15 Apr 2024 15:01:39 +0200 Subject: [PATCH] Tiny rename in compute-gap function --- codes/tb/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/codes/tb/utils.py b/codes/tb/utils.py index 041d372..13920cc 100644 --- a/codes/tb/utils.py +++ b/codes/tb/utils.py @@ -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) -- GitLab