Calculated the density matrix from projectors (DM = P Pdagger) to check that it is correct and specifically that it matches DFT.