pythtb.WFArray.overlap_matrix#

WFArray.overlap_matrix(use_k_metric=False)[source]#

Compute the overlap matrix of the cell periodic eigenstates on nearest neighbor k-shell.

Overlap matrix is of the form

\[M_{m,n}^{\mathbf{b}}(\mathbf{k}, \lambda) = \langle u_{m, \mathbf{k}, \lambda} | u_{n, \mathbf{k+b}, \lambda} \rangle\]

where \(\mathbf{b}\) is a displacement vector connecting nearest neighbor k-points.

Note

This method is inteded for use with WFArray objects defined on a uniform grid of k-points (i.e., Mesh with regular spacing along k-axes).

Added in version 2.0.0.

Parameters:
use_k_metricbool, optional

Whether to use the k-metric for neighbor lookup. If True, the function computes nearest neighbor k-points in the mesh considering the metric in Cartesian space. This means that \(\mathbf{b}\) is not necessarily a unit vector in reduced coordinates, but rather the vector that connects the closest k-points in Cartesian space. If False, the function computes nearest neighbor k-points by shifting the k-points by one step along each k-axis in the mesh. This means that \(\mathbf{b}\) is a unit vector in reduced coordinates along each k-axis. Default is False.

Returns:
Mnp.ndarray

Overlap matrix with shape (*mesh_shape, num_nnbrs, n_states, n_states)

Notes

  • The overlap matrix is computed between cell-periodic parts of the Bloch states.

  • When use_k_metric is True, the leading neighbor index runs over the Cartesian metric-derived k-shell (if any) followed by the \(\pm \mu\) unit steps along each \(\lambda\)-axis.

  • When use_k_metric is False, every \(k\)- and \(\lambda\)-axis contributes both the \(+\mu\) and \(-\mu\) neighbors in reduced coordinates, so the third dimension length is 2 * mesh.naxes. The ordering is \((+\kappa_0, -\kappa_0, \cdots, +\lambda_0, -\lambda_0, \cdots )`\).

  • The overlap matrix is only defined where neighbors exist.

  • Boundary behavior follows the Mesh axis type:

    • Periodic (no endpoint)

      The final point wraps to the first (looped). All entries are meaningful.

    • Periodic with endpoint included

      The endpoint is explicitly included in the mesh. No wrap is applied; the final forward link is undefined and is filled with NaN. Discard the final slice along that axis.

    • Nonperiodic (open directions)`

      No physical neighbor exists at the boundary. Forward links there are filled with NaN and should be dropped.

    These conventions match those used internally by wilson_loop(), berry_phase(), and related routines, which automatically trim invalid points.