A new method for the electronic structure of metals