Skip to content

Commit

Permalink
fix test_calculate_chgnet() for next chgnet release
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Aug 10, 2023
1 parent 96f7084 commit 580b760
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/core/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ def test_calculate_chgnet(self):
calculator = struct.calculate(calculator="chgnet")
assert isinstance(calculator, Calculator)
preds = calculator.results
assert {*preds} == {"stress", "energy", "free_energy", "magmoms", "forces"}
assert {*preds} >= {"stress", "energy", "free_energy", "magmoms", "forces"}
assert preds["energy"] == approx(-10.7400808334, abs=1e-5)
assert preds["magmoms"] == approx([0.00262399, 0.00262396], abs=1e-5)
assert np.linalg.norm(preds["forces"]) == approx(1.998941843e-5, abs=1e-3)
Expand Down

0 comments on commit 580b760

Please sign in to comment.