Skip to content

Commit

Permalink
Fix MorsePotential #3
Browse files Browse the repository at this point in the history
  • Loading branch information
ohno committed Dec 14, 2023
1 parent 11f9faf commit 95d9daa
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Antique"
uuid = "be6e5d0e-34a5-4c8f-af83-e1b5389203d8"
authors = ["Shuhei Ohno"]
version = "0.1.0"
version = "0.1.1"

[deps]
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Expand Down
23 changes: 14 additions & 9 deletions docs/src/MorsePotential.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,28 @@ Examples:

!!! warning

`MO = antique(:MorsePotential)` does not work if [SpecialFunctions.jl](https://specialfunctions.juliamath.org/stable/) is not installed. Install [SpecialFunctions.jl](https://specialfunctions.juliamath.org/stable/) and use `antique(:MorsePotential)` to generate 2 modules with different parameters.
Run `using Pkg; Pkg.add("SpecialFunctions")` if the following returns an error.

```julia
# Parameters for H₂⁺
# https://doi.org/10.1002/slct.202102509
# https://doi.org/10.5281/zenodo.5047817
# https://physics.nist.gov/cgi-bin/cuu/Value?mpsme
rₑ = 1.997193319969992120068298141276
Vₑ = -0.602634619106539878727562156289
Dₑ = - 0.5 - Vₑ
k = 2*((-1.1026342144949464615+1/2.00) - Vₑ) / (2.00 - rₑ)^2
µ = 1/(1/1836.15267343 + 1/1836.15267343)
= 1.0

using Antique
MP = Antique.MorsePotential
MP.rₑ = 1.997193319969992120068298141276 # https://doi.org/10.1002/slct.202102509
MP.Vₑ = -0.602634619106539878727562156289 # https://doi.org/10.1002/slct.202102509
MP.Dₑ = - 0.5 - Vₑ
MP.k = 2*((-1.1026342144949464615+1/2.00) - Vₑ) / (2.00 - rₑ)^2 # https://doi.org/10.1002/slct.202102509
MP.µ = 1/(1/1836.15267343 + 1/1836.15267343) # https://physics.nist.gov/cgi-bin/cuu/Value?mpsme
MP.= 1.0
MP = antique(:MorsePotential, rₑ=rₑ, Vₑ=Vₑ, Dₑ=Dₑ, k=k, µ =µ, ℏ =ℏ)
```




Parameters (for H₂⁺):
Parameters:

```julia
julia> MP.rₑ
Expand Down
23 changes: 14 additions & 9 deletions docs/src/jmd/MorsePotential.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,25 @@ Examples:

!!! warning

`MO = antique(:MorsePotential)` does not work if [SpecialFunctions.jl](https://specialfunctions.juliamath.org/stable/) is not installed. Install [SpecialFunctions.jl](https://specialfunctions.juliamath.org/stable/) and use `antique(:MorsePotential)` to generate 2 modules with different parameters.
Run `using Pkg; Pkg.add("SpecialFunctions")` if the following returns an error.

```julia; cache = :all; results = "hidden"
# Parameters for H₂⁺
# https://doi.org/10.1002/slct.202102509
# https://doi.org/10.5281/zenodo.5047817
# https://physics.nist.gov/cgi-bin/cuu/Value?mpsme
rₑ = 1.997193319969992120068298141276
Vₑ = -0.602634619106539878727562156289
Dₑ = - 0.5 - Vₑ
k = 2*((-1.1026342144949464615+1/2.00) - Vₑ) / (2.00 - rₑ)^2
µ = 1/(1/1836.15267343 + 1/1836.15267343)
ℏ = 1.0

using Antique
MP = Antique.MorsePotential
MP.rₑ = 1.997193319969992120068298141276 # https://doi.org/10.1002/slct.202102509
MP.Vₑ = -0.602634619106539878727562156289 # https://doi.org/10.1002/slct.202102509
MP.Dₑ = - 0.5 - Vₑ
MP.k = 2*((-1.1026342144949464615+1/2.00) - Vₑ) / (2.00 - rₑ)^2 # https://doi.org/10.1002/slct.202102509
MP.µ = 1/(1/1836.15267343 + 1/1836.15267343) # https://physics.nist.gov/cgi-bin/cuu/Value?mpsme
MP.ℏ = 1.0
MP = antique(:MorsePotential, rₑ=rₑ, Vₑ=Vₑ, Dₑ=Dₑ, k=k, µ =µ, ℏ =ℏ)
```

Parameters (for H₂⁺):
Parameters:

```julia; term = true
MP.rₑ
Expand Down
2 changes: 1 addition & 1 deletion src/Antique.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module Antique
# println("$(parameter[1]) = $(parameter[2])")
end
# modules
return Meta.eval(Meta.parse(source))
return Base.include_string(Antique, source) # Meta.eval(Meta.parse(source))
end

end
Expand Down

2 comments on commit 95d9daa

@ohno
Copy link
Owner Author

@ohno ohno commented on 95d9daa Dec 17, 2023

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@ohno
Copy link
Owner Author

@ohno ohno commented on 95d9daa Dec 24, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.