@@ -1690,21 +1690,21 @@ def test_non_square_box(self):
1690
1690
mol = Molecule (os .path .join (datadir , "3ptb_dodecahedron.pdb" ))
1691
1691
mol .read (os .path .join (datadir , "output.xtc" ))
1692
1692
1693
- assert np .all (mol .boxangles [0 , :] == 120 )
1694
- assert np .all (mol .boxangles [1 , :] == 120 )
1695
- assert np .all (mol .boxangles [2 , :] == 90 )
1693
+ assert np .allclose (mol .boxangles [0 , :], 120 , atol = 1e-2 )
1694
+ assert np .allclose (mol .boxangles [1 , :], 120 , atol = 1e-2 )
1695
+ assert np .allclose (mol .boxangles [2 , :], 90 , atol = 1e-2 )
1696
1696
refbox = np .array (
1697
1697
[[71.419 , 69.688385 ], [71.419 , 69.688385 ], [71.419 , 69.688385 ]],
1698
1698
dtype = np .float32 ,
1699
1699
)
1700
- assert np .array_equal (mol .box [:, :2 ], refbox )
1700
+ assert np .allclose (mol .box [:, :2 ], refbox , atol = 1e-2 )
1701
1701
1702
1702
with tempfile .TemporaryDirectory () as tmpdir :
1703
1703
mol .write (os .path .join (tmpdir , "3ptb_dodecahedron.xtc" ))
1704
1704
mol2 = Molecule (os .path .join (tmpdir , "3ptb_dodecahedron.xtc" ))
1705
1705
1706
- assert np .allclose (mol .box , mol2 .box , atol = 1e-5 )
1707
- assert np .allclose (mol .boxangles , mol2 .boxangles , atol = 1e-5 )
1706
+ assert np .allclose (mol .box , mol2 .box , atol = 1e-2 )
1707
+ assert np .allclose (mol .boxangles , mol2 .boxangles , atol = 1e-2 )
1708
1708
1709
1709
1710
1710
if __name__ == "__main__" :
0 commit comments