  We introduce a scheme for constructing partly occupied, maximally localized
Wannier functions (WFs) for both molecular and periodic systems. Compared to
the traditional occupied WFs the partly occupied WFs posses improved symmetry
and localization properties achieved through a bonding-antibonding closing
procedure. We demonstrate the equivalence between bonding-antibonding closure
and the minimization of the average spread of the WFs in the case of a benzene
molecule and a linear chain of Pt atoms. The general applicability of the
method is demonstrated through the calculation of WFs for a metallic system
with an impurity: a Pt wire with a hydrogen molecular bridge.
