Skip to content

Commit 85786c3

Browse files
committed
fix ModuleNotFoundError: No module named 'pymatgen.transformations.defect_transformations'
by adding pymatgen-analysis-defects to setup.py install_requires this is necessary following pymatgen release v2022719 https://github.com/materialsproject/pymatgen/blob/master/CHANGES.rst#v2022719
1 parent bb03200 commit 85786c3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

atomate/vasp/powerups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def add_trackers(original_wf, tracked_files=None, nlines=25):
214214
trackers = [Tracker(f, nlines=nlines, allow_zipped=True) for f in tracked_files]
215215

216216
idx_list = get_fws_and_tasks(original_wf, task_name_constraint="RunVasp")
217-
for idx_fw, idx_t in idx_list:
217+
for idx_fw, _ in idx_list:
218218
if "_trackers" in original_wf.fws[idx_fw].spec:
219219
original_wf.fws[idx_fw].spec["_trackers"].extend(trackers)
220220
else:

atomate/vasp/workflows/tests/test_adsorbate_workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def setUp(self):
5151
db_file=os.path.join(db_dir, "db.json"),
5252
)
5353

54-
@unittest.skip("The expected behaviour of these functions has changed.")
54+
@unittest.skip("The expected behavior of these functions has changed.")
5555
def test_wf_functions(self):
5656
# Test slab trans params generator
5757
for slab in self.slabs:
@@ -135,7 +135,7 @@ def _simulate_vasprun(self, wf):
135135

136136
def _check_run(self, d, mode):
137137
if mode not in ["H1-Ir_(1, 0, 0) adsorbate optimization 1", "oriented_ucell"]:
138-
raise ValueError("Invalid mode!")
138+
raise ValueError(f"Invalid {mode=}!")
139139

140140
if "adsorbate" in mode:
141141
self.assertEqual(d["formula_reduced_abc"], "H1 Ir16")

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"pydash>=4.1.0",
3535
"pymatgen-analysis-diffusion",
3636
"pymatgen",
37+
"pymatgen-analysis-defects",
3738
"pymongo",
3839
"pyyaml>=5.1.2",
3940
"ruamel.yaml",

0 commit comments

Comments
 (0)