  We provide a priori error estimates for the spectral and pseudospectral
Fourier (also called planewave) discretizations of the periodic
Thomas-Fermi-von Weizs\"{a}cker (TFW) model and for the spectral discretization
of the Kohn-Sham model, within the local density approximation (LDA). These
models allow to compute approximations of the ground state energy and density
of molecular systems in the condensed phase. The TFW model is stricly convex
with respect to the electronic density, and allows for a comprehensive
analysis. This is not the case for the Kohn-Sham LDA model, for which the
uniqueness of the ground state electronic density is not guaranteed. Under a
coercivity assumption on the second order optimality condition, we prove that
for large enough energy cut-offs, the discretized Kohn-Sham LDA problem has a
minimizer in the vicinity of any Kohn-Sham ground state, and that this
minimizer is unique up to unitary transform. We then derive optimal a priori
error estimates for the spectral discretization method.
