Skip to content

Commit e01054e

Browse files
authored
Merge pull request #32 from JuliaMolSim/co/fwd-ver
Versions Cleanup
2 parents f43c4a7 + 23c7606 commit e01054e

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
version:
2222
- '1.9'
2323
- '1.10'
24+
- '1.11'
25+
- '1.12'
2426
- '1'
2527
os:
2628
- ubuntu-latest

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "EmpiricalPotentials"
22
uuid = "38527215-9240-4c91-a638-d4250620c9e2"
3-
version = "0.2.4"
3+
version = "0.2.5"
44

55
[deps]
66
AtomsBase = "a963bdd2-2df7-4f54-a1ee-49d51e6be12a"
@@ -18,7 +18,7 @@ AtomsBase = "0.5"
1818
AtomsCalculators = "0.2"
1919
AtomsCalculatorsUtilities = "0.1.7"
2020
Bumper = "0.6, 0.7"
21-
ForwardDiff = "0.10"
21+
ForwardDiff = "0.10, 1"
2222
LinearAlgebra = "1"
2323
NeighbourLists = "0.5.6"
2424
StaticArrays = "1.7.0"

test/test_sw.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
# using Pkg; Pkg.activate(@__DIR__() * "/..")
3+
# using TestEnv; TestEnv.activate()
34

45
##
56

@@ -8,7 +9,7 @@ using AtomsCalculators, EmpiricalPotentials, AtomsCalculatorsUtilities,
89
AtomsBuilder
910

1011
using AtomsBase: AbstractSystem
11-
using LinearAlgebra: dot, norm, I
12+
using LinearAlgebra: dot, norm, I, Symmetric
1213
using AtomsCalculators: potential_energy, forces
1314
using EmpiricalPotentials: cutoff_radius, StillingerWeber
1415
ACT = AtomsCalculatorsUtilities.Testing
@@ -24,7 +25,7 @@ D = JSON.parsefile(joinpath(@__DIR__(), "data", "test_sw.json"))
2425
tests = D["tests"]
2526

2627
# the argument t should be a tests[i]
27-
function read_test(t::Dict)
28+
function read_test(t::AbstractDict)
2829
Rs = SVector{3, Float64}.(t["Rs"])
2930
Zs = Int.(t["Zs"])
3031
z0 = Int(t["z0"])
@@ -118,7 +119,7 @@ for t in tests
118119
P = convert_blockmat(Pblock)
119120
@test P' ≈ P
120121
# compute spectrum and check it is what we expect
121-
λ = eigvals(P)
122+
λ = real.(eigvals(Symmetric(P)))
122123
# rotation-invariance should give three zero eigenvalues
123124
# but with innerstab = 0.1 those become 0.1. The tests show that
124125
# this is not true which must mean that the precon is not
@@ -127,4 +128,3 @@ for t in tests
127128
# but at least all evals must be >= 0.1 enforced by construction
128129
@test all(λ .>= 0.1 - sqrt(eps(Float64)))
129130
end
130-

0 commit comments

Comments
 (0)