Variational density matrix functional calculations for the corrected Hartree and corrected Hartree–Fock functionals