From ee1447fbf87ca756b4d1db51746dffdefc175807 Mon Sep 17 00:00:00 2001 From: Leandro Martinez Date: Tue, 11 Apr 2023 10:49:32 -0300 Subject: [PATCH] make test deterministic --- src/neighborlists.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/neighborlists.jl b/src/neighborlists.jl index 0941fce5..fc9993a4 100644 --- a/src/neighborlists.jl +++ b/src/neighborlists.jl @@ -668,12 +668,13 @@ end using CellListMap using Unitful using StaticArrays - positions = rand(SVector{3,Float64}, 50)u"nm" + + positions = [SVector(0.1, 0.0, 0.0), SVector(0.11, 0.01, 0.01) ]u"nm" cutoff = 0.1u"nm" nb = neighborlist(positions, cutoff) @test unit(nb[1][3]) == u"nm" - # and boundary coordinates + # and with boundary coordinates (to test the fix for upper boundary shifts) l = [SVector(0.0, 0.0)u"nm", SVector(-1, 0.0)u"nm"] unitcell = [14.01, 14.02]u"nm" nl = neighborlist(l, 7.0u"nm")