JuliaAtoms / AtomicLevels.jl

https://juliaatoms.org/AtomicLevels.jl
Other
12 stars 3 forks source link

Wrong parity when coupling terms #1

Closed jagot closed 8 years ago

jagot commented 8 years ago

There is an error in how the parity is calculated when coupling terms. This is due to the parity being calculated for the whole configuration first, and then set in all subterms, which are then coupled to a total term, with wrong parity.

Example:

julia> couple_terms(terms(c"1s"), terms(c"2p")) # Yields correct result
2-element Array{Term,1}:
 ¹P⁻
 ³P⁻
julia> terms(c"1s 2p") # Yields incorrect result
2-element Array{Term,1}:
 ¹P
 ³P
jagot commented 8 years ago

Fixed by 104000bd6a4c3bc76095466afd9901c4bbf8aad3.