diff --git a/emmet-core/emmet/core/vasp/material.py b/emmet-core/emmet/core/vasp/material.py index 68313f0bf9..d3b5fcc2f6 100644 --- a/emmet-core/emmet/core/vasp/material.py +++ b/emmet-core/emmet/core/vasp/material.py @@ -90,6 +90,10 @@ def from_tasks( else structure_optimizations ) + validity_check = [doc for doc in structure_calcs if doc.is_valid] + if not validity_check: + raise ValueError("Group must contain at least one valid task") + # Material ID possible_mat_ids = [task.task_id for task in structure_optimizations]