Skip to content

Commit 30faca7

Browse files
precommit
1 parent 1b85dd4 commit 30faca7

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

src/atomate2/ase/schemas.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,11 @@ def from_ase_task_doc(
248248
"""
249249
task_document_kwargs.update(
250250
{k: getattr(ase_task_doc, k) for k in _task_doc_translation_keys},
251-
structure = ase_task_doc.mol_or_struct,
251+
structure=ase_task_doc.mol_or_struct,
252+
)
253+
return cls.from_structure(
254+
meta_structure=ase_task_doc.mol_or_struct, **task_document_kwargs
252255
)
253-
return cls.from_structure(meta_structure = ase_task_doc.mol_or_struct, **task_document_kwargs)
254256

255257

256258
class AseMoleculeTaskDoc(MoleculeMetadata):

src/atomate2/forcefields/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class MLFF(Enum): # TODO inherit from StrEnum when 3.11+
1313
"""Names of ML force fields."""
1414

15-
MACE = "MACE" # This is MACE-MP-0-medium
15+
MACE = "MACE" # This is MACE-MP-0-medium
1616
MACE_MPA_0 = "MACE_MPA_0"
1717
GAP = "GAP"
1818
M3GNet = "M3GNet"

src/atomate2/forcefields/jobs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
MLFF.NEP: {"model_filename": "nep.txt"},
3636
MLFF.GAP: {"args_str": "IP GAP", "param_filename": "gap.xml"},
3737
MLFF.MACE: {"model": "medium"},
38-
MLFF.MACE_MPA_0 : {"model": "medium-mpa-0",},
38+
MLFF.MACE_MPA_0: {"model": "medium-mpa-0"},
3939
}
4040

4141

src/atomate2/forcefields/utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def ase_calculator(calculator_meta: str | dict, **kwargs: Any) -> Calculator | N
4343
calculator = None
4444

4545
if isinstance(calculator_meta, str | MLFF) and calculator_meta in map(str, MLFF):
46-
4746
calculator_name = MLFF[calculator_meta.split("MLFF.")[-1]]
4847

4948
if calculator_name == MLFF.CHGNet:

tests/forcefields/test_jobs.py

+2
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def test_mace_relax_maker(
318318
assert output1.output.energy == approx(-0.06772976, rel=1e-4)
319319
assert output1.output.n_steps == 7
320320

321+
321322
def test_mace_mpa_0_relax_maker(
322323
si_structure: Structure,
323324
):
@@ -338,6 +339,7 @@ def test_mace_mpa_0_relax_maker(
338339
assert len(output.output.ionic_steps) == 4
339340
assert output.structure.volume == output.output.structure.volume
340341

342+
341343
def test_gap_static_maker(si_structure: Structure, test_dir):
342344
importorskip("quippy")
343345

0 commit comments

Comments
 (0)