From 4736811012dc7e803abf72b56cd82b3c7618bb42 Mon Sep 17 00:00:00 2001 From: Chengqian Zhang <2000011006@stu.pku.edu.cn> Date: Fri, 15 Aug 2025 07:41:57 +0000 Subject: [PATCH 1/2] Init branch --- source/tests/pt/test_padding_atoms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tests/pt/test_padding_atoms.py b/source/tests/pt/test_padding_atoms.py index cad81f107d..7cb584180b 100644 --- a/source/tests/pt/test_padding_atoms.py +++ b/source/tests/pt/test_padding_atoms.py @@ -49,7 +49,7 @@ def setUp(self) -> None: self.sel = [16, 8] self.rcut = 2.2 self.rcut_smth = 0.4 - self.atol = 1e-8 + self.atol = 1e-5 class TestPaddingAtoms(unittest.TestCase, TestCaseSingleFrameWithoutNlist): From ac445651449ee1c3aecd582fd59480405acdb957 Mon Sep 17 00:00:00 2001 From: Chengqian Zhang <2000011006@stu.pku.edu.cn> Date: Fri, 15 Aug 2025 07:50:30 +0000 Subject: [PATCH 2/2] Change atol and rtol --- source/tests/pt/test_padding_atoms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/tests/pt/test_padding_atoms.py b/source/tests/pt/test_padding_atoms.py index 7cb584180b..8fb417c6a4 100644 --- a/source/tests/pt/test_padding_atoms.py +++ b/source/tests/pt/test_padding_atoms.py @@ -49,7 +49,8 @@ def setUp(self) -> None: self.sel = [16, 8] self.rcut = 2.2 self.rcut_smth = 0.4 - self.atol = 1e-5 + self.atol = 1e-6 + self.rtol = 1e-5 class TestPaddingAtoms(unittest.TestCase, TestCaseSingleFrameWithoutNlist): @@ -79,6 +80,7 @@ def test_padding_atoms_consistency(self): to_numpy_array(result[var_name].cpu().detach()), np.mean(to_numpy_array(result[f"atom_{var_name}"].cpu().detach()), axis=1), atol=self.atol, + rtol=self.rtol, ) # test padding atoms padding_atoms_list = [1, 5, 10] @@ -105,6 +107,7 @@ def test_padding_atoms_consistency(self): to_numpy_array(result[var_name].cpu().detach()), to_numpy_array(result_padding[var_name].cpu().detach()), atol=self.atol, + rtol=self.rtol, )