Make l_max a read-only property.
Ensure consistency by making l_max and projectors_l_max a property that is computed on the fly, depending on qn values for states and projectors.
I think it is a bit unsafe to separatedly set l_max
and actually then read states or projectors depending on these values that may or may not be consistent with the actual values in the qn of these objects.
Do you think there could be a case where we need to store a l_max
, without storing the associated states or projectors ? In that case, it makes sense to have it as a member of the pspdata structure otherwise, it's safer to compute it on the fly.