Derive the total Kohn–Sham energy functional and avoid double-counting electrostatic and XC terms.
Analytic resultDerived in closed form from exact mathematical definitions without numerical approximation.
Etot=i∑fiεi−EH[n]+Exc[n]−∫n(r)vxc(r)dr
1. Physical Motivation & Context
Summing the occupied Kohn–Sham eigenvalues Sum_i f_i epsilon_i does NOT equal the total electronic energy. Because v_H[n] = int n(r')/|r-r'| dr' counts each electron–electron pair twice in Sum_i f_i <psi_i|v_H|psi_i> = 2 E_H[n], and v_xc is a functional derivative rather than an energy density, exact double-counting corrections are mandatory.
2. Mathematical Formulation & Derivations
Expressing T_s via Eigenvalues
Taking the expectation value of the Kohn–Sham Hamiltonian over each occupied orbital and summing with occupations f_i:
Harris–Foulkes Functional: When evaluated at input/output densities, the double-counting term cancels first-order density errors, accelerating energy convergence quadratically relative to linear density error.
Self-Interaction Error (SIE): For a 1-electron system, exact E_H + E_xc = 0, but approximate functionals leave a spurious residual self-Hartree energy.
4. Numerical Implementation & Quantum ESPRESSO Practice
In pw.x output, the final "! total energy" prints the sum of one-electron, Hartree, XC, Ewald (ion-ion), and smearing (-TS) contributions in Rydberg (1 Ry = 13.605693 eV).
In the 1D Kohn–Sham solver, E_kin is recovered from sum(f_i eps_i) - E_ext - int n v_H_in - int n v_xc, and verified against E_tot = T_s + E_ext + E_H + E_xc.
References
W. Kohn and L. J. Sham, Phys. Rev. 140, A1133 (1965).