Note that the reciprocal space sum in parenthesis is just the Coulomb self energy of the pair density of states n ′ k and nk + q, and the above is equal to the exchange energy in Hartree-Fock theory, except for the second occupation factor term in brackets above. That term contributes only when both states are partially occupied, because the lower eigenvalue contributes (1 -f ) while the higher eigenvalue contributes f . We have implemented this RPA variant of the exchange energy in JDFTx, sharing implementation with the standard exchange energy for hybrid functionals, with just the occupation factors modified as above.