Skip to content

Commit

Permalink
move qual score to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Sep 29, 2020
1 parent d9938ea commit 8c8a95a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions emmet-builders/emmet/builders/settings.py
Expand Up @@ -20,6 +20,11 @@ class EmmetBuilderSettings(EmmetSettings):
["LDAUU", "LDAUJ", "LDAUL"], description="LDAU fields to validate for tasks"
)

vasp_qual_scores: Dict[RunType, int] = Field(
{"SCAN": 3, "GGA+U": 2, "GGA": 1},
description="Dictionary Mapping VASP calculation run types to rung level for VASP materials builders",
)

@validator("default_input_sets", pre=True)
def load_input_sets(cls, values):
input_sets = {}
Expand Down
2 changes: 1 addition & 1 deletion emmet-builders/emmet/builders/vasp/materials.py
Expand Up @@ -335,7 +335,7 @@ def _structure_eval(task: Dict):
- Special Tags
- Energy
"""
qual_score = {"SCAN": 3, "GGA+U": 2, "GGA": 1}
qual_score = SETTINGS.vasp_qual_scores

ispin = task.get("output", {}).get("parameters", {}).get("ISPIN", 1)
energy = task.get("output", {}).get("energy_per_atom", 0.0)
Expand Down

0 comments on commit 8c8a95a

Please sign in to comment.