From 26be1b91e2a5c0acb9eec1690c4e763fd06ec48f Mon Sep 17 00:00:00 2001 From: Tyler Mathis <35553152+tsmathis@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:02:57 -0700 Subject: [PATCH] update "R2SCAN" to "r2SCAN" to match enum convention --- emmet-core/emmet/core/thermo.py | 2 +- emmet-core/emmet/core/vasp/material.py | 4 ++-- emmet-core/tests/vasp/test_vasp.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/emmet-core/emmet/core/thermo.py b/emmet-core/emmet/core/thermo.py index 2a47a5678d..d9b5c4ddbd 100644 --- a/emmet-core/emmet/core/thermo.py +++ b/emmet-core/emmet/core/thermo.py @@ -151,7 +151,7 @@ def from_entries( for e in entries: entries_by_mpid[e.data["material_id"]].append(e) - entry_quality_scores = {"GGA": 1, "GGA+U": 2, "SCAN": 3, "R2SCAN": 4} + entry_quality_scores = {"GGA": 1, "GGA+U": 2, "SCAN": 3, "r2SCAN": 4} def _energy_eval(entry: Union[ComputedStructureEntry, ComputedEntry]): """ diff --git a/emmet-core/emmet/core/vasp/material.py b/emmet-core/emmet/core/vasp/material.py index 30c0c0ef3e..104696279e 100644 --- a/emmet-core/emmet/core/vasp/material.py +++ b/emmet-core/emmet/core/vasp/material.py @@ -21,9 +21,9 @@ class BlessedCalcs(BaseModel): GGA: Optional[ComputedStructureEntry] = None GGA_U: Optional[ComputedStructureEntry] = Field(None, alias="GGA+U") - PBESol: Optional[ComputedStructureEntry] = None + PBESol: Optional[ComputedStructureEntry] = Field(None, alias="PBEsol") SCAN: Optional[ComputedStructureEntry] = None - R2SCAN: Optional[ComputedStructureEntry] = None + R2SCAN: Optional[ComputedStructureEntry] = Field(None, alias="r2SCAN") HSE: Optional[ComputedStructureEntry] = None diff --git a/emmet-core/tests/vasp/test_vasp.py b/emmet-core/tests/vasp/test_vasp.py index 64f6fea69d..3918883d21 100644 --- a/emmet-core/tests/vasp/test_vasp.py +++ b/emmet-core/tests/vasp/test_vasp.py @@ -3,8 +3,8 @@ import pytest from monty.io import zopen -from emmet.core.vasp.calc_types import RunType, TaskType, run_type, task_type from emmet.core.tasks import TaskDoc +from emmet.core.vasp.calc_types import RunType, TaskType, run_type, task_type from emmet.core.vasp.task_valid import TaskDocument from emmet.core.vasp.validation import ValidationDoc, _potcar_stats_check @@ -32,8 +32,8 @@ def test_run_type(): ("GGA+U", {"GGA": "--", "LDAU": True}), ("SCAN", {"METAGGA": "Scan"}), ("SCAN+U", {"METAGGA": "Scan", "LDAU": True}), - ("R2SCAN", {"METAGGA": "R2SCAN"}), - ("R2SCAN+U", {"METAGGA": "R2SCAN", "LDAU": True}), + ("r2SCAN", {"METAGGA": "R2SCAN"}), + ("r2SCAN+U", {"METAGGA": "R2SCAN", "LDAU": True}), ("HFCus", {"LHFCALC": True}), ]