Skip to content

Commit

Permalink
pre-commit auto-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 17, 2024
1 parent 4ede5ed commit 1dc5cad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pymatgen/analysis/phase_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -1665,18 +1665,18 @@ def __contains__(self, item: frozenset[Element]) -> bool:

def as_dict(self) -> dict[str, Any]:
"""Write the entries and elements used to construct the PatchedPhaseDiagram
to a dictionary.
to a dictionary.
NOTE unlike PhaseDiagram the computation involved in constructing the
NOTE unlike PhaseDiagram the computation involved in constructing the
PatchedPhaseDiagram is not saved on serialisation. This is done because
hierachically calling the `PhaseDiagram.as_dict()` method would break the
link in memory between entries in overlapping patches leading to a
ballooning of the amount of memory used.
NOTE For memory efficiency the best way to store patched phase diagrams is
via pickling. As this allows all the entries in overlapping patches to share
the same id in memory when unpickling.
Returns:
dict[str, Any]: MSONable dictionary representation of PatchedPhaseDiagram.
"""
Expand All @@ -1691,11 +1691,11 @@ def as_dict(self) -> dict[str, Any]:
def from_dict(cls, dct: dict) -> Self:
"""Reconstruct PatchedPhaseDiagram from dictionary serialisation.
NOTE unlike PhaseDiagram the computation involved in constructing the
NOTE unlike PhaseDiagram the computation involved in constructing the
PatchedPhaseDiagram is not saved on serialisation. This is done because
hierachically calling the `PhaseDiagram.as_dict()` method would break the
link in memory between entries in overlapping patches leading to a
ballooning of the amount of memory used.
ballooning of the amount of memory used.
NOTE For memory efficiency the best way to store patched phase diagrams is
via pickling. As this allows all the entries in overlapping patches to share
Expand Down

0 comments on commit 1dc5cad

Please sign in to comment.