diff --git a/emmet-builders/emmet/builders/vasp/thermo.py b/emmet-builders/emmet/builders/vasp/thermo.py index 72de58ff24..ee0dccd2cc 100644 --- a/emmet-builders/emmet/builders/vasp/thermo.py +++ b/emmet-builders/emmet/builders/vasp/thermo.py @@ -3,6 +3,7 @@ from itertools import chain from typing import Dict, Iterator, List, Optional, Set, Tuple +from icecream import ic from maggma.core import Builder, Store from monty.json import MontyDecoder from pymatgen import Structure @@ -99,7 +100,7 @@ def get_items(self) -> Iterator[List[Dict]]: # Yield the chemical systems in order of increasing size # Will build them in a similar manner to fast Pourbaix for chemsys in sorted(to_process_chemsys, key=lambda x: len(x.split("-"))): - entries = self.get_entries(chemsys, include_structure=True) + entries = self.get_entries(chemsys) yield entries # # build sandbox sets: ["a"] , ["a","b"], ["core","a","b"] # sandbox_sets = set( @@ -196,7 +197,7 @@ def update_targets(self, items): else: self.logger.info("No items to update") - def get_entries(self, chemsys: str, include_structure: bool = False) -> List[Dict]: + def get_entries(self, chemsys: str) -> List[Dict]: """ Gets a entries from the tasks collection for the corresponding chemical systems Args: @@ -240,8 +241,6 @@ def get_entries(self, chemsys: str, include_structure: bool = False) -> List[Dic for doc in materials_docs: for r_type, entry_dict in doc.get("entries", {}).items(): entry_dict["data"]["run_type"] = r_type - if include_structure: - entry_dict["structure"] = doc["structure"] elsyms = sorted(set([el for el in entry_dict["composition"]])) self._entries_cache["-".join(elsyms)].append(entry_dict) all_entries.append(entry_dict) diff --git a/emmet-core/emmet/core/thermo.py b/emmet-core/emmet/core/thermo.py index 1ebb4d239d..10505666e9 100644 --- a/emmet-core/emmet/core/thermo.py +++ b/emmet-core/emmet/core/thermo.py @@ -3,6 +3,7 @@ from enum import Enum from typing import ClassVar, Dict, List, Union +from icecream import ic from pydantic import BaseModel, Field from pymatgen.analysis.phase_diagram import PhaseDiagram, PhaseDiagramError from pymatgen.core import Composition @@ -139,6 +140,6 @@ def from_entries(cls, entries: List[Union[ComputedEntry, ComputedStructureEntry] elif k in e.data: d[k] = e.data[k] - docs.append(ThermoDoc.from_composition(composition=e.composition, **d)) + docs.append(ThermoDoc.from_structure(structure=e.structure, **d)) return docs