Skip to content

Commit 81e81cc

Browse files
committed
Use reference bands to count num valence
1 parent 0778644 commit 81e81cc

File tree

1 file changed

+6
-1
lines changed
  • src/aiida_wannier90_workflows/workflows

1 file changed

+6
-1
lines changed

Diff for: src/aiida_wannier90_workflows/workflows/split.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,12 @@ def inspect_valcond(self): # pylint: disable=inconsistent-return-statements
396396
fermi_energy = get_workchain_fermi_energy(workchain)
397397
self.ctx.fermi_energy = fermi_energy
398398

399-
bands: orm.BandsData = workchain.outputs.band_structure
399+
# Prioritize reference bands, since Wannier-interpolated bands might have
400+
# interpolation error
401+
if self.ctx.ref_bands is None:
402+
bands: orm.BandsData = workchain.outputs.band_structure
403+
else:
404+
bands: orm.BandsData = self.ctx.ref_bands
400405
bands_arr = bands.get_bands()
401406
try:
402407
homo, lumo = get_homo_lumo(bands_arr, fermi_energy)

0 commit comments

Comments
 (0)