RESUMEN
In this paper we establish a connection between density functional theory (DFT) for lattice models and common real-space DFT. We consider the lattice DFT description of a two-level model subject to generic interactions in Mermin's DFT formulation in the grand canonical ensemble at finite temperature. The case of only density-density and Hund's rule interaction studied in earlier work is shown to be equivalent to an exact-exchange description of DFT in the real-space picture. In addition, we also include the so-called pair-hopping interaction which can be treated analytically and, crucially, leads to non-integer occupations of the Kohn-Sham (KS) levels even in the limit of zero temperature. Treating the hydrogen molecule in a minimal basis is shown to be equivalent to our two-level lattice DFT model. By means of the fractional occupations of the KS orbitals (which, in this case, are identical to the many-body ones) we reproduce the results of full configuration interaction, even in the dissociation limit and without breaking the spin symmetry. Beyond the minimal basis, we embed our HOMO-LUMO model into a standard DFT calculation and, again, obtain results in overall good agreement with exact ones without the need of breaking the spin symmetry.