Recent advances in the theory of polarization and the development of linear
-scaling methods have revitalized interest in the use of Wannier functions
for obtaining a localized orbital picture within a periodic supercell. To e
xamine complex chemical systems it is imperative for the localization proce
dure to be efficient; on the other hand, the method should also be simple a
nd general. Motivated to meet these requirements we derive in this paper a
spread functional to be minimized as a starting point for obtaining maximal
ly localized Wannier functions through a unitary transformation. The functi
onal turn out to be equivalent to others discussed in the literature with t
he difference of being valid in simulation supercells of arbitrary symmetry
in the Gamma-point approximation. To minimize the spread an iterative sche
me is developed and very efficient optimization methods, such as conjugate
gradient, direct inversion in the iterative subspace, and preconditioning a
re applied to accelerate the convergence. The iterative scheme is quite gen
eral and is shown to work also for methods first developed for finite syste
ms (e.g., Pipek-Mezey, Boys-Foster). The applications discussed range from
crystal structures such as Si to isolated complex molecules and are compare
d to previous investigations on this subject.