In Kohn–Sham density functional theory, the total energy of a system is expressed as a functional of the charge density as E [ ρ ρ ] = T s [ ρ ρ ] + ∫ ∫ d r v ext ( r ) ρ ρ ( r ) + E H [ ρ ρ ] + E xc [ ρ ρ ] ,