From 48a4fe2da5802dc69dd50c9c934bc6314ce5af04 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Thu, 10 Oct 2024 15:13:57 -0700 Subject: [PATCH] add fix to TaskDoc.task_type --- emmet-core/emmet/core/vasp/calc_types/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emmet-core/emmet/core/vasp/calc_types/utils.py b/emmet-core/emmet/core/vasp/calc_types/utils.py index 25308cc35e..e26e67dd99 100644 --- a/emmet-core/emmet/core/vasp/calc_types/utils.py +++ b/emmet-core/emmet/core/vasp/calc_types/utils.py @@ -78,7 +78,11 @@ def task_type( except Exception as e: raise Exception("Couldn't identify total number of kpt labels") from e - if num_kpt_labels > 0: + if num_kpt_labels > 0 or kpts.get("nkpoints", 0) > 0: + # calcs_reversed kpoints are read from vasprun.xml, which + # removes k-points labels --> check that nkpoints > 0 + # orig_inputs are read from KPOINTS and retain + # user-input labels --> check num_kpt_labels > 0 calc_type.append("NSCF Line") else: calc_type.append("NSCF Uniform")