  The computation of the ground states of spin-$F$ Bose-Einstein condensates
(BECs) can be formulated as an energy minimization problem with two quadratic
constraints. We discretize the energy functional and constraints using the
Fourier pseudospectral schemes and view the discretized problem as an
optimization problem on manifold. Three different types of retractions to the
manifold are designed. They enable us to apply various optimization methods on
manifold to solve the problem. Specifically, an adaptive regularized Newton
method is used together with a cascadic multigrid technique to accelerate the
convergence. According to our limited knowledege, our method is the first
applicable algorithm for BECs with an arbitrary integer spin, including the
complicated spin-3 BECs. Extensive numerical results on ground states of
spin-1, spin-2 and spin-3 BECs with diverse interaction and optical lattice
potential in one/two/three dimensions are reported to show the efficiency of
our method and to demonstrate some interesting physical phenomena.
