Skip to content

Commit

Permalink
expand run type check to include r2SCAN entries
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmathis committed Nov 21, 2024
1 parent 4a4b214 commit 622f2e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions emmet-core/emmet/core/vasp/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 622f2e3

Please sign in to comment.