The radial charge distribution and the shell structure of atoms and ions