Skip to content

Commit

Permalink
Fix handling deformation tasks in materials builder (#453)
Browse files Browse the repository at this point in the history
* Properly set potcar dir in validation

* Fix deformation task handling in materials builder

* Better error message
  • Loading branch information
munrojm authored Jul 12, 2022
1 parent fcdd230 commit 2dde9c6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions emmet-builders/emmet/builders/vasp/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,15 @@ def filter_and_group_tasks(
zip(filtered_tasks, filtered_transmuters)
):
if task.task_type == TaskType.Deformation:
if transmuter is None:
raise RuntimeError("Cannot find transmuter for deformation task")
if (
transmuter is None
): # Do not include deformed tasks without transmuter information
self.logger.warn(
"Cannot find transmuter for deformation task {}. Excluding task.".format(
task.task_id
)
)
continue
else:
s = undeform_structure(task.input.structure, transmuter)
else:
Expand Down

0 comments on commit 2dde9c6

Please sign in to comment.