Skip to content

Commit

Permalink
Integrate <I₀> to unity (#15)
Browse files Browse the repository at this point in the history
* Integrate <I₀> to unity

* Bump version
  • Loading branch information
jagot authored Oct 11, 2022
1 parent b160168 commit 1271f9f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AngularMomentumAlgebra"
uuid = "0bb1b1ac-0216-11e9-361b-bb110c659ce1"
authors = ["Stefanos Carlström <[email protected]>"]
version = "0.2.0"
version = "0.2.1"

[deps]
AtomicLevels = "10933b4c-d60f-11e8-1fc6-bd9035a249a1"
Expand Down
2 changes: 2 additions & 0 deletions src/energy_expressions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ coordinates (see [`multipole_expand`](@ref)).
integrate_spinor(me::OrbitalMatrixElement{2,<:Any,<:CoulombInteraction,<:Any}) =
multipole_expand(me)

integrate_spinor(me::OrbitalMatrixElement{0, <:Any, IdentityOperator{0}, <:Any}) =
one(NBodyMatrixElement)

"""
integrate_spinor(integral::NBodyTermFactor)
Expand Down
12 changes: 12 additions & 0 deletions test/energy_expressions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
end
end
end

@testset "Zero-body identity operator" begin
I₀ = IdentityOperator{0}()

me = ome([], I₀, [])
@test isone(integrate_spinor(me))

cfgs = [sc"1s₀α kp₀α"]
oo = ov(so"kp₀α", so"kp₀α")
E = Matrix(I₀, cfgs, [oo])
@test E == NBodyMatrixElement[nbt(oo)][:,:]
end
end

@testset "Multi-configurational" begin
Expand Down

2 comments on commit 1271f9f

@jagot
Copy link
Member Author

@jagot jagot commented on 1271f9f Oct 14, 2022

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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/70180

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 v0.2.1 -m "<description of version>" 1271f9f5f570760bc22113d10cf50bcac98e4bec
git push origin v0.2.1

Please sign in to comment.