The l a method for an atom or molecule is transformed into an all-electron pseudopotential formalism. The equations of the l a method are exactly transformed into pseudo-orbital equations and the resulting pseudopotentials are replaced by simple density-dependent potentials derived from Thomas-Fermi model. It is shown that the new formalism satisfies the virial theorem. As the first application it is shown that the model explains the shell-structure of atoms by the property that the pseudo-orbitals for the (MS), (»p) , (rid) etc. electrons are, in a very good approximation, the solutions of the same equation and have their maxima at the same point thereby creating the peaks in the radial density characterizing the shell structure.