Skip to content

Commit

Permalink
make sure hubbards fields get added to entries for mats doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmathis committed Aug 9, 2024
1 parent 8b23a06 commit d8477d4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions emmet-core/emmet/core/vasp/material.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
""" Core definition of a Materials Document """

from typing import Dict, List, Mapping, Optional
from emmet.core.base import EmmetMeta

from pydantic import Field, BaseModel
from pydantic import BaseModel, Field
from pymatgen.analysis.structure_analyzer import SpacegroupAnalyzer
from pymatgen.analysis.structure_matcher import StructureMatcher
from pymatgen.entries.computed_entries import ComputedStructureEntry

from emmet.core.base import EmmetMeta
from emmet.core.material import MaterialsDoc as CoreMaterialsDoc
from emmet.core.material import PropertyOrigin
from emmet.core.settings import EmmetSettings
from emmet.core.structure import StructureMetadata
from emmet.core.vasp.calc_types import CalcType, RunType, TaskType
from emmet.core.tasks import TaskDoc
from emmet.core.vasp.calc_types import CalcType, RunType, TaskType

SETTINGS = EmmetSettings()

Expand Down Expand Up @@ -206,6 +207,8 @@ def _entry_eval(task: TaskDoc):
entry.data["task_id"] = entry.entry_id
entry.data["material_id"] = material_id
entry.entry_id = "{}-{}".format(material_id, rt.value)
entry.parameters["is_hubbard"] = best_task_doc.input.is_hubbard
entry.parameters["hubbards"] = best_task_doc.input.hubbards
entries[rt] = entry

if RunType.GGA not in entries and RunType.GGA_U not in entries:
Expand Down

0 comments on commit d8477d4

Please sign in to comment.