From 622f2e3035b9bcf66bccc653af03618a0d7d84b9 Mon Sep 17 00:00:00 2001 From: Tyler Mathis <35553152+tsmathis@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:45:23 -0800 Subject: [PATCH] expand run type check to include r2SCAN entries --- emmet-core/emmet/core/vasp/material.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/emmet-core/emmet/core/vasp/material.py b/emmet-core/emmet/core/vasp/material.py index 104696279e..2077941b6b 100644 --- a/emmet-core/emmet/core/vasp/material.py +++ b/emmet-core/emmet/core/vasp/material.py @@ -211,9 +211,12 @@ def _entry_eval(task: TaskDoc): entry.parameters["hubbards"] = best_task_doc.input.hubbards entries[rt] = entry - if RunType.GGA not in entries and RunType.GGA_U not in entries: + if not any( + run_type in entries + for run_type in (RunType.GGA, RunType.GGA_U, RunType.r2SCAN) + ): raise ValueError( - "Individual material entry must contain at least one GGA or GGA+U calculation" + "Individual material entry must contain at least one GGA, GGA+U, or r2SCAN calculation" ) # Builder meta and license