Skip to content

Commit

Permalink
AtomsBaseTesting cell vectors check for infinite systems (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 authored Nov 21, 2024
1 parent 042cde2 commit b0f2f81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

2 comments on commit b0f2f81

@mfherbst
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=lib/AtomsBaseTesting

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/119905

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a AtomsBaseTesting-v0.4.1 -m "<description of version>" b0f2f81673d55387efcbdd12181343d541a74d4b
git push origin AtomsBaseTesting-v0.4.1

Also, note the warning: Version 0.4.1 skips over 0.4.0
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.