pythtb.Wannier.set_tilde_states#
- Wannier.set_tilde_states(states, is_cell_periodic=True, is_spin_axis_flat=False)[source]#
Set the Bloch-like states for the Wannier functions.
These states are Fourier transformed to form the Wannier functions. They are related to the original energy eigenstates via the (semi-) unitary transformation
\[|\tilde{\psi} \rangle = \sum_{m=1}^{N} U_{mn}^{(\mathbf{k})} |\psi_{m\mathbf{k}} \rangle\]- Parameters:
- statesnp.ndarray
The states to set as Bloch-like states. Must have the shape
(nk1, ..., nstates, n_orbs[, n_spins]).- cell_periodicbool, optional
Whether to treat the
statesas cell-periodic, by default False.- spin_flattenedbool, optional
Whether the spin dimension is flattened into the orbital dimension. If True,
statesmust have shape(nk1, ..., nstates, n_orbs*n_spins). If False,statesmust have shape(nk1, ..., nstates, n_orbs, n_spins). By default False.
- Raises:
- ValueError
If the input states are not a numpy array or have an invalid shape.
Notes
If
cell_periodicis True, the states are treated as cell-periodic parts of Bloch functions \(u_{n\mathbf{k}}\), otherwise as full Bloch functions \(\psi_{n\mathbf{k}}\).If
spin_flattenedis False and the wavefunctions have spin, the states are reshaped to flatten the spin dimension into the orbital dimension.The Wannier functions, spreads, and centers are computed upon setting the Bloch-like states.