JuliaAtoms / AtomicLevels.jl

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

Printing of cores not reliable #23

Open jagot opened 5 years ago

jagot commented 5 years ago

If constructing the configuration for radon with open 6s2 6p6 subshells, the core is incorrectly printed as [Kr]:

julia> c"[Xe] 4f14c 5d10c 6s2 6p6"
[Kr]ᶜ 4d¹⁰ᶜ 4f¹⁴ᶜ 5s²ᶜ 5p⁶ᶜ 5d¹⁰ᶜ 6s² 6p⁶

This is because the 4f14c subshell appears before the 5s2c 5p6c subshells that belong to the [Xe] core, and the printing routine does not consider this.

mortenpi commented 3 years ago

Going to unsorted configurations (#33) would also fix this I believe, since we'd no longer move the subshells around?

jagot commented 9 months ago

Yet another example:

julia> s = rc"[Xe]"
[Xe]ᶜ

julia> s.states[end] = :open
:open

julia> s
[Kr]ᶜ 4d⁶ᶜ 5s²ᶜ 5p⁴ᶜ 4d-⁴ᶜ 5p-² # This is OK

julia> s = only(spin_configurations(rc"[Xe]"))
[Xe]ᶜ

julia> s.states[end] = :open
:open

julia> s
[Xe]ᶜ 5p-(1/2) # This is wrong, should be printed with a [Kr] core, and closed 4d, 5s, 5p subshells and closed 5p-(1/2) orbital