When one learns the Aufbau principle to “predict” electronic configurations, and the $(n + \ell)$ ordering rule (or Madelung rule), one also learns of the exceptions to the rules… some of which (Cr, Cu, Mo, Ag, Au) can be half-explained by adding another “rule”, some of which (Nb, Ru, Rh, …) cannot. We have on this site our fair share of electronic-configuration questions dealing with these: Nb, Pt, Pd, Cu, Th, etc.
My question here is not about rules or theories to rationalize and understand these complicated electronic configurations, but rather about computational tools to predict them. What computational methods (and software) would one use to compute the different energies of several electronic configurations of an atom?
For example, take niobium. How would I answer, with computational quantum chemistry methods, the following question:
what is the energy difference between the 5s1 4d4 and 5s2 4d3 electronic configurations of niobium?
And would that method also give some interpretation in terms of what these energy differences arise from?