diff --git a/tests/core/common/test_optimizable.py b/tests/core/common/test_optimizable.py index 3ba03ca6d..7024d9128 100644 --- a/tests/core/common/test_optimizable.py +++ b/tests/core/common/test_optimizable.py @@ -91,6 +91,7 @@ def test_ase_cell_relaxation(atoms_list, batch, calculator, optimizer_cls): # optimize atoms one-by-one for atoms in atoms_list: + print(atoms.cell.array) atoms.calc = calculator opt = optimizer_cls(UnitCellFilter(atoms, cell_factor=cell_factor)) opt.run(0.01, 20) @@ -100,13 +101,10 @@ def test_ase_cell_relaxation(atoms_list, batch, calculator, optimizer_cls): assert a1.get_potential_energy() / len(a1) == pytest.approx( a2.get_potential_energy() / len(a2), abs=0.05 ) - diff = min_diff(a1.positions, a2.positions, a1.get_cell(), pbc=a1.pbc) - npt.assert_allclose(diff, 0, atol=0.01) + npt.assert_allclose(diff, 0, atol=0.05, rtol=0.05) cnorm1 = np.linalg.norm(a1.cell.array, axis=1) cnorm2 = np.linalg.norm(a2.cell.array, axis=1) - npt.assert_allclose(cnorm1, cnorm2, atol=0.01) - npt.assert_allclose( - a1.cell.array.T / cnorm1, a2.cell.array.T / cnorm2, rtol=0.01 - ) + npt.assert_allclose(cnorm1, cnorm2, atol=0.01, rtol=0.01) + npt.assert_allclose(a1.cell.array.T, a2.cell.array.T, rtol=0.01, atol=0.01)