Nuclear single-particle states: dynamical shell model and energy density functional methods