The total energy of a solid consists of the kinetic energy of all the electrons, the kinetic energy of all the nuclei, couloumb repulsion of the electrons with each other and of the nuclei with each other, coulomb attraction between the electrons and nuclei and exchange/correlation effects between the electrons. On top of this, other ‘special’ interactions such as magnetic interactions or electron-phonon coupling can occur