We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff6bc64 commit 0ec494eCopy full SHA for 0ec494e
tests/test_phonons.py
@@ -40,6 +40,20 @@ def test_calc_phonons():
40
assert "phonon" in phonons.results
41
42
43
+def test_force_consts_to_hdf5_deprecation():
44
+ """Test calculating phonons from ASE atoms object."""
45
+ struct = read(DATA_PATH / "NaCl.cif")
46
+ struct.calc = choose_calculator(arch="mace_mp", model=MODEL_PATH)
47
+ with pytest.warns(FutureWarning, match="--force_consts_to_hdf5 is deprecated."):
48
+ phonons = Phonons(
49
+ struct=struct,
50
+ force_consts_to_hdf5=True,
51
+ )
52
+
53
+ phonons.calc_force_constants(write_force_consts=True)
54
+ assert "phonon" in phonons.results
55
56
57
def test_optimize(tmp_path):
58
"""Test optimizing structure before calculation."""
59
log_file = tmp_path / "phonons.log"
0 commit comments