Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomsBaseTesting cell vectors check for infinite systems #132

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/AtomsBaseTesting/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
10 changes: 7 additions & 3 deletions lib/AtomsBaseTesting/src/AtomsBaseTesting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading