From b6d5fe146fe97a10763bccbbdbe21736d2640db0 Mon Sep 17 00:00:00 2001 From: Wei-Tse Hsu Date: Thu, 12 Sep 2024 00:54:50 +0800 Subject: [PATCH] Fixed the unit test for compute_angle --- ensemble_md/tests/test_coordinate_swap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ensemble_md/tests/test_coordinate_swap.py b/ensemble_md/tests/test_coordinate_swap.py index 2bd7540..aa6d677 100644 --- a/ensemble_md/tests/test_coordinate_swap.py +++ b/ensemble_md/tests/test_coordinate_swap.py @@ -50,6 +50,6 @@ def test_compute_angle(): coords_2 = coords_1[-1::-1] coords_3 = [coords_1[1], coords_1[0], coords_1[2]] - assert np.isclose(coordinate_swap.compute_angle(coords_1), np.sqrt(2) / 2) - assert np.isclose(coordinate_swap.compute_angle(coords_2), np.sqrt(2) / 2) - assert np.isclose(coordinate_swap.compute_angle(coords_3), 0) + assert np.isclose(coordinate_swap.compute_angle(coords_1), np.pi / 4) + assert np.isclose(coordinate_swap.compute_angle(coords_2), np.pi / 4) + assert np.isclose(coordinate_swap.compute_angle(coords_3), np.pi / 2)