Skip to content

Commit

Permalink
build material per sandbox set
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Sep 28, 2020
1 parent 215437e commit d63b2cd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion emmet-builders/emmet/builders/vasp/materials.py
Expand Up @@ -259,7 +259,18 @@ def filter_and_group_tasks(self, tasks: List[Dict]) -> Iterator[List[Dict]]:
)

for group in grouped_structures:
yield [filtered_tasks[struc.index] for struc in group]
grouped_tasks = [filtered_tasks[struc.index] for struc in group]
sandboxes = [
task["sandboxes"] for task in grouped_tasks if "sandboxes" in task
]

for sbx_set in maximal_spanning_non_intersecting_subsets(sandboxes):
yield [
task
for task in grouped_tasks
if len(set(task.get("sandboxes", ["core"])).intersection(sbx_set))
> 0
]

def make_mat(self, task_group: List[Dict]) -> Dict:
"""
Expand Down

0 comments on commit d63b2cd

Please sign in to comment.