  We study the nonlinear Schr\"odinger equation for systems of $N$ orthonormal
functions. We prove the existence of ground states for all $N$ when the
exponent $p$ of the non linearity is not too large, and for an infinite
sequence $N_j$ tending to infinity in the whole range of possible $p$'s, in
dimensions $d\geq1$. This allows us to prove that translational symmetry is
broken for a quantum crystal in the Kohn-Sham model with a large Dirac exchange
constant.
