pythtb.WFArray.position_hwf#
- WFArray.position_hwf(pos_dir, mesh_idx, state_idx=None, hwf_evec=False, basis='wavefunction')[source]#
Eigenvalues and eigenvectors of the position operator in a given basis.
- Parameters:
- mesh_idx: array-like of int
Set of integers specifying the index of interest in the mesh.
- pos_dir: int
Direction along which to compute the position operator.
Changed in version 2.0.0: Renamed from
dirtopos_dirto avoid conflict with built-in Python function dir().- state_idx: array-like, optional
List of states to be included. If not specified, all states are included.
Changed in version 2.0.0: Renamed from
occ. The band indices are not required to be occupied bands only. The default behavior is to include all bands, and the"all"option has been removed.- hwf_evec: bool, optional
Default is False. If True, return the eigenvectors along with eigenvalues of the position operator.
- basis: {“orbital”, “wavefunction”, “bloch”}, optional
The basis in which to compute the position operator.
- Returns:
- hwfcnp.ndarray
Eigenvalues of the position operator matrix \(X\) (also called hybrid Wannier function centers). Length of this vector equals number of bands given in evec input array. Hybrid Wannier function centers are ordered in ascending order. Note that in general n-th hwfc does not correspond to n-th electronic state evec.
- hwfnp.ndarray, optional
Eigenvectors of the position operator matrix \(X\). (also called hybrid Wannier functions). These are returned only if parameter
hwf_evec=True.The shape of this array is
[h,x]or[h,x,s]depending on value ofbasisandspinful.If
basis = "bloch"thenxrefers to indices of Bloch states evec.If
basis = "orbital"thenx(orxands) correspond to orbital index (or orbital and spin index ifspinful=True).
See also
- Hybrid Wannier centers in the Haldane model
For an example.
position_matrixFor the definition of the matrix \(X\).
position_expectationFor the position expectation value.
pythtb.TBModel.position_hwf()
Notes
Similar to
pythtb.TBModel.position_hwf(), except thatin addition to specifying
pos_dir, one also has to specifymesh_idx(mesh-point of interest) andstate_idx(list of states to be included).For backwards compatibility the default value of basis here is different from that in
pythtb.TBModel.position_hwf().