pythtb.Wannier#

class Wannier(bloch_states)[source]#

Construct Wannier functions through the projection method.

This class implements projection, disentanglement [2], and maximal-localization [1] workflows using Bloch states represented in a finite tight-binding orbital basis. The high-level workflow is:

  1. Single-shot SVD projection to trial functions (project()).

  2. Optional disentanglement in an outer/frozen window (disentangle()).

  3. Unitary gauge optimization for maximal localization (maxloc()).

Parameters:
bloch_statesWFArray

Bloch-like states to Wannierize. The mesh must be a torus in k-space (no endpoint duplication), and states must already be populated.

Notes

  • Wannier performs a re-Wannierization relative to typical Wannier90 workflows:

    • Wannier90 commonly starts from first-principles Bloch states and projects onto trial orbitals, typically taking the form of localized atomic orbitals.

    • Wannier works directly with WFArray states and trial functions expressed in the same tight-binding orbital/spin basis.

  • Wannier functions are obtained from Bloch-like states \(\tilde{\psi}_{n\mathbf{k}}\) via inverse FFT over k-axes:

    \[w_{n\mathbf{R}} = \frac{1}{\sqrt{N_k}} \sum_{\mathbf{k}} e^{i\mathbf{k}\cdot\mathbf{R}} \tilde{\psi}_{n\mathbf{k}}.\]

References

[1]

Marzari, N., & Vanderbilt, D. Phys. Rev. B 56, 12847 (1997).

[2]

Souza, I., Marzari, N., & Vanderbilt, D. Phys. Rev. B 65, 035109 (2001).

Methods#

pythtb.Wannier.disentangle

Disentanglement of a subspace that minimizes gauge-independent spread.

pythtb.Wannier.get_centers

Return Wannier centers in Cartesian or fractional coordinates.

pythtb.Wannier.get_trial_wfs

Build normalized trial-wavefunction array from tuple specifications.

pythtb.Wannier.info

Print a formatted report of Wannier centers and spreads.

pythtb.Wannier.interp_bands

Wannier interpolate the band structure along a k-path.

pythtb.Wannier.maxloc

Unitary transformation to minimize the gauge-dependent spread.

pythtb.Wannier.min_spread

Run disentanglement + projection + maximal-localization workflow.

pythtb.Wannier.plot_centers

Plot the Wannier function centers in the supercell.

pythtb.Wannier.plot_decay

Plot the Wannier function density as a function of distance from center.

pythtb.Wannier.plot_density

Plot the Wannier function density on the lattice in 2D.

pythtb.Wannier.project

Initialize or update Bloch-like states by projection onto trial functions.

pythtb.Wannier.set_tilde_states

Set the Bloch-like states for the Wannier functions.

pythtb.Wannier.set_trial_wfs

Set trial wavefunctions for Wannierization.

Attributes#

pythtb.Wannier.Amn

Overlap matrix between reference states and trial wavefunctions.

pythtb.Wannier.Omega_D

Diagonal gauge-dependent spread \(\Omega_{\mathrm{D}}\).

pythtb.Wannier.Omega_I

Gauge-invariant spread \(\Omega_I\).

pythtb.Wannier.Omega_OD

Off-diagonal gauge-dependent spread \(\Omega_{\mathrm{OD}}\).

pythtb.Wannier.bloch_states

Input Bloch states to be Wannierized.

pythtb.Wannier.centers

Wannier centers in Cartesian coordinates.

pythtb.Wannier.lattice

Lattice associated with this Wannier workflow.

pythtb.Wannier.mesh

Mesh associated with this Wannier workflow.

pythtb.Wannier.nks

Number of k points along each k-axis.

pythtb.Wannier.num_twfs

Number of trial wavefunctions.

pythtb.Wannier.spread

Quadratic spread \(\Omega_n\) for each Wannier function.

pythtb.Wannier.tilde_states

Bloch-like states \(\tilde{\psi}_{n\mathbf{k}}\).

pythtb.Wannier.trial_wfs

Trial wavefunctions used for projection.

pythtb.Wannier.wannier

Wannier functions in the supercell implied by the k-grid.