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

remove another util function which is already somewhere else

parent 6c06354b
No related branches found
No related tags found
1 merge request!4Interface refactoring
......@@ -200,24 +200,3 @@ def generate_vectors(cutoff, dim):
List of hopping vectors.
"""
return [*product(*([[*range(-cutoff, cutoff + 1)]] * dim))]
def calc_gap(vals, fermi_energy):
"""
Compute gap.
Parameters:
-----------
vals : nd-array
Eigenvalues on a k-point grid.
fermi_energy : float
Fermi energy.
Returns:
--------
gap : float
Indirect gap.
"""
emax = np.max(vals[vals <= fermi_energy])
emin = np.min(vals[vals > fermi_energy])
return np.abs(emin - emax)
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