Skip to content

Commit

Permalink
Fix the unit of V in HydrogenAtom
Browse files Browse the repository at this point in the history
  • Loading branch information
ohno committed Apr 20, 2024
1 parent df8a4d5 commit 4c96f24
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/HydrogenAtom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function V(model::HydrogenAtom, r)
# end
Z = model.Z
a₀ = model.a₀
return -Z/abs(r/a₀)
Eₕ = model.Eₕ
return Eₕ*-1*Z/abs(r/a₀)
end

function E(model::HydrogenAtom; n=1)
Expand All @@ -27,8 +28,6 @@ function ψ(model::HydrogenAtom, r, θ, φ; n=1, l=0, m=0)
# if r<0
# throw(DomainError(r, "r=$r is out of the domain (0≦r)"))
# end
Z = model.Z
a₀ = model.a₀
return R(model, r, n=n, l=l) * Y(model, θ, φ, l=l, m=m)
end

Expand Down

0 comments on commit 4c96f24

Please sign in to comment.