Self-consistent nuclear single-particle Hamiltonian