JuliaAtoms / AtomicLevels.jl

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

Don't call the intermediate term multiplicity counter "seniority" #51

Closed mortenpi closed 4 years ago

mortenpi commented 5 years ago

Rather, let's just have an arbitrary index and let the user decide how it should be interpreted. This approach would make everything valid for arbitrary \ell and w.

mortenpi commented 4 years ago

It's probably good to support the seniority special case too -- I can see how it can be handy to know the value, have methods to check if a seniority number of valid etc. So, here's a more specific idea to make it possible to support both in AtomicLevels, building on #64: have IntermediateTerm's second field to have two possible types

  1. ::Int: in this case it's totally generic. Only requirement is that it is in 1:degeneracy(subshell).
  2. Provide a struct Seniority type for the case where you want intermediate terms indexed by the seniority number. Constructors etc. would then specialize on this and throw errors when e.g. when you start hitting the ambiguous cases.

So, you'd have IntermediateTerm{Term,Int} be the generic intermediate term, and IntermediateTerm{Term,Seniority} the one you can use if you actually want seniority numbers.

I guess, there would also be functions to convert between those two (from generic to seniority only in the case when there is no ambiguity). So we'd be defining a convention for a mapping between 1:degeneracy(subshell) <-> Seniority .