Tr-D crystal, TE polarization.[]{data-label="fig:cg_results_im"}](im){width="0.95\columnwidth"}

The complicated structure of the Wannier functions at large distances, which is expressed by several local minima of their SMs and the associated difficulties in the construction of maximally localized Wannier functions, motivates the search for a simpler criterion for the locality of Wannier functions. Here, we introduce a new criterion, the integrated modulus square (IM), defined as $$\mathcal{I}_{n}(\{\phi_{n{\mathbf{k}}}\})=\int_{\text{UC}}d^{2}r{\mathbf{W}_{n \mathbf{R}}}^{*}({\mathbf{r}})X({\mathbf{r}}){\mathbf{W}_{n \mathbf{R}}}({\mathbf{r}}),\label{eq:def_IM}$$ where the integration region is the first unit cell (UC) around the Wannier center (UC). We choose the function $X({\mathbf{r}})$ in such a way, that the IM is equal to unity for a Wannier function which is completely confined within such a unit cell. i.e., $$X({\mathbf{r}})=\left\{ \begin{array}{ll}
\epsilon({\mathbf{r}}) & \quad\mbox{for TM}\\
1 & \quad\mbox{for TE}\end{array}\right. \ . 
\label{eq:IMnormalization}$$ A well localized Wannier function corresponds to a large IM, and one needs to maximize the IM in order to obtain the maximally localized Wannier functions. The IM is a very sharp criterion, since it does not depend on the structure of the Wannier functions outside of the integration region at all.

We examined the IM locality measure as a localization criterion for the same four different physical systems and both polarizations as it was done in 