Skip to content

Commit

Permalink
make pourbaix compatible w/ latest pmg
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Jan 25, 2025
1 parent c51ea91 commit 858ac96
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crystal_toolkit/components/pourbaix.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
from dash.dependencies import Component, Input, Output, State
from dash.exceptions import PreventUpdate
from frozendict import frozendict
from pymatgen.analysis.pourbaix_diagram import ELEMENTS_HO, PREFAC, PourbaixDiagram
from pymatgen.core import Composition
from pymatgen.analysis.pourbaix_diagram import PREFAC, PourbaixDiagram
from pymatgen.core import Composition, Element
from pymatgen.util.string import unicodeify
from shapely.geometry import Polygon

import crystal_toolkit.helpers.layouts as ctl
from crystal_toolkit.core.mpcomponent import MPComponent

try:
from pymatgen.analysis.pourbaix_diagram import ELEMENTS_HO
except ImportError:
ELEMENTS_HO = {Element("H"), Element("O")}

__author__ = "Joseph Montoya"
__email__ = "[email protected]"

Expand Down

0 comments on commit 858ac96

Please sign in to comment.