From 6dff2eaae9b63755d3414c665a9b1e4fa2cb53d6 Mon Sep 17 00:00:00 2001 From: Joe Greener Date: Thu, 21 Nov 2024 15:28:27 +0000 Subject: [PATCH 1/2] Fix cell vectors check for infinite systems --- lib/AtomsBaseTesting/src/AtomsBaseTesting.jl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/AtomsBaseTesting/src/AtomsBaseTesting.jl b/lib/AtomsBaseTesting/src/AtomsBaseTesting.jl index 3ac25c1..9df6429 100644 --- a/lib/AtomsBaseTesting/src/AtomsBaseTesting.jl +++ b/lib/AtomsBaseTesting/src/AtomsBaseTesting.jl @@ -72,11 +72,15 @@ function test_approx_eq(s::AbstractSystem, t::AbstractSystem; end # Test some things on cell objects - if cell(s) isa PeriodicCell - @test maximum(map(rnorm, cell_vectors(cell(s)), cell_vectors(cell(t)))) < rtol - end @test periodicity(cell(s)) == periodicity(cell(t)) @test n_dimensions(cell(s)) == n_dimensions(cell(t)) + if cell(s) isa PeriodicCell + for (dim, periodic) in enumerate(periodicity(cell(s))) + if periodic + @test rnorm(cell_vectors(cell(s))[dim], cell_vectors(cell(t))[dim]) < rtol + end + end + end # test properties of systems if common_only From d6145d091d115a325bbeb721edf3a9e9412cee75 Mon Sep 17 00:00:00 2001 From: Joe Greener Date: Thu, 21 Nov 2024 15:36:06 +0000 Subject: [PATCH 2/2] AtomsBaseTesting bump version --- lib/AtomsBaseTesting/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AtomsBaseTesting/Project.toml b/lib/AtomsBaseTesting/Project.toml index c5c493e..78fc5fd 100644 --- a/lib/AtomsBaseTesting/Project.toml +++ b/lib/AtomsBaseTesting/Project.toml @@ -1,7 +1,7 @@ name = "AtomsBaseTesting" uuid = "ed7c10db-df7e-4efa-a7be-4f4190f7f227" authors = ["JuliaMolSim community"] -version = "0.4.0" +version = "0.4.1" [deps] AtomsBase = "a963bdd2-2df7-4f54-a1ee-49d51e6be12a"