Skip to content

Commit 7daab33

Browse files
Updated Antique function calls to 0.15
updated Antique function calls to 0.15
2 parents 6226478 + 943d50d commit 7daab33

9 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎Project.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1414
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1515

1616
[compat]
17-
Antique = "0.12.0"
17+
Antique = "0.15"
1818
Aqua = "0.8.13"
1919
ExplicitImports = "1.15.0"
2020
FewBodyHamiltonians = "0.0.2"

‎docs/Project.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
99
FewBodyECG = {path = ".."}
1010

1111
[compat]
12-
Antique = "0.12.0"
12+
Antique = "0.15"
1313
Documenter = "1"
1414
DocumenterCitations = "1"
1515
Plots = "1.39.0"

‎docs/src/examples.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ps = Antique.CoulombTwoBody(
1515
z₁ = 1, z₂ = -1, m₁ = 1.0, m₂ = 1.0, mₑ = 1.0, a₀ = 1.0, Eₕ = 1.0, ħ = 1.0
1616
)
1717
18-
exact = Antique.E(ps, n = 1)
18+
exact = Antique.energy(ps, n = 1)
1919
sol = solve(H, SVM(basis = 25, candidates = 20, scale = 1.4))
2020
2121
plot(sol, exact)

‎docs/src/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ H += "Kinetic"
2424
H += "Coulomb"
2525
2626
sol = solve(H, DynamicGVM(basis = 10, candidates = 20, scale = 1.0))
27-
exact = Antique.E(Antique.HydrogenAtom(Z = 1), n = 1)
27+
exact = Antique.energy(Antique.HydrogenAtom(Z = 1), n = 1)
2828
println("E0 = ", sol.E₀, " Ha (Antique ", exact, ", Δ = ", sol.E₀ - exact, ")")
2929
sol
3030
```

‎examples/benchmark_SVM.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ops = Operators([1.0e15, 1.0], [+1.0, -1.0])
77
ops += "Kinetic"
88
ops += "Coulomb"
99

10-
exact = Antique.E(Antique.HydrogenAtom(Z = 1), n = 1)
10+
exact = Antique.energy(Antique.HydrogenAtom(Z = 1), n = 1)
1111

1212
function run_method(label, alg, ops, exact)
1313
sol = solve(ops, alg)

‎examples/benchmark_gradient.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ops = Operators([1.0e15, 1.0], [+1.0, -1.0])
77
ops += "Kinetic"
88
ops += "Coulomb"
99

10-
exact = Antique.E(Antique.HydrogenAtom(Z = 1), n = 1)
10+
exact = Antique.energy(Antique.HydrogenAtom(Z = 1), n = 1)
1111

1212
function run_method(label, alg)
1313
sol = solve(ops, alg)

‎examples/hydrogen.jl‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ ops += "Kinetic"
1414
ops += "Coulomb"
1515

1616
H = Antique.HydrogenAtom(Z = 1)
17-
exact₁ = Antique.E(H, n = 1)
18-
exact₂ = Antique.E(H, n = 2)
19-
exact₃ = Antique.E(H, n = 3)
17+
exact₁ = Antique.energy(H, n = 1)
18+
exact₂ = Antique.energy(H, n = 2)
19+
exact₃ = Antique.energy(H, n = 3)
2020

2121
sol = solve(ops, DynamicGVM(basis = 10, candidates = 20, scale = 1.0))
2222
println("1s energy: ", sol.E₀, " Ha (Antique ", exact₁, ", Δ = ", sol.E₀ - exact₁, ")")
@@ -65,7 +65,7 @@ states = (("1s", 1, 0), ("2s", 2, 0), ("2p", 2, 1), ("3d", 3, 2))
6565
rs = range(0.0, 12.0, length = 400)
6666

6767
function antique_density(n, l)
68-
density = [r^2 * abs2(Antique.ψ(H, r, 0.0, 0.0; n = n, l = l, m = 0)) for r in rs]
68+
density = [r^2 * abs2(Antique.wavefunction(H, r, 0.0, 0.0; n = n, l = l, m = 0)) for r in rs]
6969
area = sum((density[i] + density[i + 1]) * (rs[i + 1] - rs[i]) / 2 for i in 1:(length(rs) - 1))
7070
return density ./ area
7171
end

‎examples/positronium.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sol
1212
ps = Antique.CoulombTwoBody(
1313
z₁ = 1, z₂ = -1, m₁ = 1.0, m₂ = 1.0, mₑ = 1.0, a₀ = 1.0, Eₕ = 1.0, ħ = 1.0
1414
)
15-
exact = Antique.E(ps, n = 1)
15+
exact = Antique.energy(ps, n = 1)
1616
println("E0 = ", sol.E₀, " Ha (Antique ", exact, ", Δ = ", sol.E₀ - exact, ")")
1717
plot(sol, exact)
1818

@@ -22,7 +22,7 @@ rs = range(1.0e-3, 15.0, length = 400)
2222
p = plot(ψ; coord = 1, rmax = 15.0)
2323
plot!(
2424
p, rs,
25-
[r^2 * abs2(μ^(-3 / 4) * Antique.ψ(ps, r / sqrt(μ), 0.0, 0.0; n = 1, l = 0, m = 0)) for r in rs];
25+
[r^2 * abs2(μ^(-3 / 4) * Antique.wavefunction(ps, r / sqrt(μ), 0.0, 0.0; n = 1, l = 0, m = 0)) for r in rs];
2626
linestyle = :dash,
2727
label = "Antique.jl",
2828
)

‎test/test_harmonic_oscillator.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ using FewBodyECG: build_hamiltonian_matrix, build_overlap_matrix, solve_generali
2424
ecg_energies, coeffs = solve_generalized_eigenproblem(H, S)
2525

2626
HO = Antique.HarmonicOscillator(k = 1.0, m = 1.0, ℏ = 1.0)
27-
@test ecg_energies[1:3] ≈ [Antique.E(HO; n = n) for n in (1, 3, 5)] atol = 1.0e-5
27+
@test ecg_energies[1:3] ≈ [Antique.energy(HO; n = n) for n in (1, 3, 5)] atol = 1.0e-5
2828

2929
radius = range(1.0e-4, 6, length = 800)
3030
ψ = Wavefunction(basis, coeffs[:, 1])
3131
ecg_wavefunction = [ψ([r]) for r in radius]
3232
u_ecg = sqrt(4π) .* radius .* ecg_wavefunction
33-
u_ref = sqrt(2) .* [Antique.ψ(HO, r; n = 1) for r in radius]
33+
u_ref = sqrt(2) .* [Antique.wavefunction(HO, r; n = 1) for r in radius]
3434
u_ecg .*= sign(dot(u_ecg, u_ref))
3535
@test maximum(abs.(u_ecg - u_ref)) < 1.0e-3
3636
end

0 commit comments

Comments
 (0)