  Density fitting is used throughout quantum chemistry to simplify the
electron-electron interaction energy (EE). A fundamental property of quantum
chemistry, and DFT in particular, is that a variational principle connects the
EE to a potential. Density fitting generally does not preserve this connection.
Herein, we describe the construction of a robust EE that is variationally
connected to fitted potentials in all electronic structure methods. For DFT,
this results in new fitting equations which are satisfied at an energy saddle
point in multidimensional fitting space.
