Abstract.In this article, we provide a priori error estimates for the spectral and pseudospectral Fourier (also called planewave) discretizations of the periodic Thomas-Fermi-von Weizsäcker (TFW) model and for the spectral discretization of the periodic Kohn-Sham model, within the local density approximation (LDA). These models allow to compute approximations of the electronic ground state energy and density of molecular systems in the condensed phase. The TFW model is strictly 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. We prove that, for any local minimizer Φ 0 of the Kohn-Sham LDA model, and under a coercivity assumption ensuring the local uniqueness of this minimizer up to unitary transform, the discretized Kohn-Sham LDA problem has a minimizer in the vicinity of Φ 0 for large enough energy cut-offs, and that this minimizer is unique up to unitary transform. We then derive optimal a priori error estimates for the spectral discretization method.Mathematics Subject Classification. 65N25, 65N35, 65T99, 35P30, 35Q40, 81Q05.