Skip to content

Commit

Permalink
Fix compatibility with new pymatgen (#206)
Browse files Browse the repository at this point in the history
* Update utils.py

* work on pyproject reqs

* rm strict extra

---------

Co-authored-by: Patrick Huck <phuck@lbl.gov>
  • Loading branch information
kavanase and tschaume authored Oct 22, 2024
1 parent 8094e20 commit 18dcfb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pymatgen/analysis/defects/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from monty.dev import deprecated
from monty.json import MSONable
from numpy.linalg import norm
from pymatgen.analysis.local_env import cn_opt_params
from pymatgen.analysis.local_env import CN_OPT_PARAMS
from pymatgen.analysis.structure_matcher import StructureMatcher
from pymatgen.core import Structure
from pymatgen.core.periodic_table import Element, get_el_sp
Expand Down Expand Up @@ -60,7 +60,7 @@
kumagai_to_V = 1.809512739e2 # = Electron charge * 1e10 / VacuumPermittivity Constant

motif_cn_op = {}
for cn, di in cn_opt_params.items():
for cn, di in CN_OPT_PARAMS.items():
for motif, li in di.items():
motif_cn_op[motif] = {"cn": int(cn), "optype": li[0]}
motif_cn_op[motif]["params"] = deepcopy(li[1]) if len(li) > 1 else None
Expand Down
12 changes: 2 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
"Topic :: Scientific/Engineering",
]
dependencies = [
"pymatgen>=2024.5.1",
"pymatgen>=2024.10.22",
"scikit-image>=0.19.3",
"numpy<2",
"mp-pyrho>=0.4.4",
Expand All @@ -36,15 +36,7 @@ docs = [
"jupyter-book>=0.13.1",
]
optional = ["pydefect", "dscribe>=2.0.0", "numba"]

strict = [
"pymatgen==2024.5.1",
"dscribe==2.1.1",
"mp-pyrho==0.4.4",
"pydefect==0.9.4",
]

tests = ["pytest==8.2.1", "pytest-cov==5.0.0", "nbmake==1.5.3"]
tests = ["pytest>=8.2.1", "pytest-cov>=5.0.0", "nbmake>=1.5.3"]

[tool.setuptools.dynamic]
readme = { file = ["README.md"] }
Expand Down

0 comments on commit 18dcfb6

Please sign in to comment.