pythtb.Wannier.get_centers#

Wannier.get_centers(cartesian=False)[source]#

Return Wannier centers in Cartesian or fractional coordinates.

The center of Wannier function \(n\) is computed from the phases of diagonal overlap matrices as

\[\mathbf{r}_n = -\frac{1}{N_k} \sum_{\mathbf{k},\mathbf{b}} w_b\,\mathbf{b}\, \operatorname{Im}\!\left[\ln M_{nn}^{(\mathbf{b})}(\mathbf{k})\right],\]

where \(M_{mn}^{(\mathbf{b})}(\mathbf{k})\) are nearest-neighbor overlap matrices of cell-periodic states, \(w_b\) are shell weights, and \(N_k\) is the number of k points.

Parameters:
cartesianbool, optional

If True, return Cartesian coordinates. If False, return fractional coordinates in the lattice basis.

Returns:
np.ndarray

Wannier centers with shape (n_wannier, dim_r).

Notes

If cartesian=False, the returned coordinates are fractional components in the lattice basis.