several bands of the Sq-D (TM polarization) and Sq-A (TE polarization) structures, respectively. In both cases the IM criterion was used along with the CG method. The optimized Wannier functions demonstrate good locality which degrades slowly with increasing band indices, since the envelope functions become more and more oscillatory, reflecting the not-plane-wave like nature of Bloch modes. It is worth noting, that the Wannier functions optimized with respect to the IM and SM criteria are in general not equal, even if the global minimum of the SM or the global maximum of the IM has been reached. For example for the system of dielectric rods in air (TM polarization) the SM- and IM-optimized Wannier functions coincide for the 1st and the 2nd band (not shown), but not for the third band (top right Wannier function in figures \[fig:ga\_sm\] and \[fig:ga\_im\]).

![Modulus square of the maximally localized Wannier functions (with respect to the IM) for the Sq-D structure (TM polarization). The Wannier center was chosen as ’on-site’ for the 1st and 5th band and as ’between’ for the 2nd and 4th band.[]{data-label="fig:MLWF_dielRods_tm"}](mlwf_dielRods_tm){width="0.9\columnwidth"}

![ Modulus square of the maximally localized Wannier functions (with respect to the IM) for Sq-A structure (TE polarization). 