Skip to content

Commit

Permalink
only consider valid tags
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Apr 20, 2021
1 parent b67fb41 commit 7f8225f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions emmet-core/emmet/core/vasp/material.py
Expand Up @@ -72,12 +72,13 @@ def from_tasks(
task_types = {task.task_id: task.task_type for task in task_group}
calc_types = {task.task_id: task.calc_type for task in task_group}

valid_tasks = [task for task in task_group if task.is_valid]
structure_optimizations = [
task
for task in task_group
for task in valid_tasks
if task.task_type == TaskType.Structure_Optimization # type: ignore
]
statics = [task for task in task_group if task.task_type == TaskType.Static] # type: ignore
statics = [task for task in valid_tasks if task.task_type == TaskType.Static] # type: ignore
structure_calcs = (
structure_optimizations + statics
if use_statics
Expand All @@ -95,10 +96,7 @@ def _structure_eval(task: TaskDocument):

task_run_type = task.run_type

is_valid = task.task_id in deprecated_tasks

return (
-1 * is_valid,
-1 * quality_scores.get(task_run_type.value, 0),
-1 * task.input.parameters.get("ISPIN", 1),
-1 * task.input.parameters.get("LASPH", False),
Expand Down

0 comments on commit 7f8225f

Please sign in to comment.