pythtb.TBModel.position_hwf#
- TBModel.position_hwf(evecs, pos_dir, hwf_evec=False, basis='orbital')[source]#
Eigenvalues and eigenvectors of the position operator
Returns eigenvalues and optionally eigenvectors of the position operator matrix \(X\) in basis of the orbitals or, optionally, of the input wave functions (typically Bloch functions). The returned eigenvectors can be interpreted as linear combinations of the input states
evecthat have minimal extent (or spread \(\Omega\) in the sense of maximally localized Wannier functions) along directiondir. The eigenvalues are average positions of these localized states.- Parameters:
- evecsnp.ndarray
Eigenvectors for which we are computing matrix elements of the position operator. The shape of this array is
evecs[band, orbital]ifspinful=Trueandevecs[band, orbital, spin]ifspinful=False.Changed in version 2.0.0: Parameter
evecrenamed toevecsto clarify that multiple eigenvectors can be passed at once.- pos_dirint
Direction along which we are computing matrix elements. This integer must not be one of the periodic directions since position operator matrix element in that case is not well defined.
Changed in version 2.0.0: Parameter
dirrenamed topos_dirto avoid conflict with built-in functiondir().- hwf_evecbool, optional
Default is
False. If set toTruethis function will return not only eigenvalues but also eigenvectors of \(X\).- basis{“orbital”, “wavefunction”, “bloch”}, optional
Default is “orbital”. If
basis="wavefunction"orbasis="bloch", the hybrid Wannier function hwf is returned in the basis of the input wave functions. That is, the elements ofhwf[i, j]give the amplitudes of the i-th hybrid Wannier function on the j-th input state. Ifbasis="orbital", the elements ofhwf[i, orb](orhwf[i, orb, spin]ifspinful=True) give the amplitudes of the i-th hybrid Wannier function on the specified basis function.
- 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
evecsinput array. Hybrid Wannier function centers are ordered in ascending order. Note that in general n-th hwfc does not correspond to n-th state inevecs.- hwfnp.ndarray
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
basisis “bloch” thenxrefers to indices of Bloch states.If
basisis “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.
Notes
Note that these eigenvectors are not maximally localized Wannier functions in the usual sense because they are localized only along one direction. They are also not the average positions of the Bloch states
evecs, which are instead computed byposition_expectation().See Fig. 3 in [1] for a discussion of the hybrid Wannier function centers in the context of a Chern insulator.
References
[1]S. Coh, D. Vanderbilt, Phys. Rev. Lett. 102, 107603 (2009).
Examples
Diagonalizes Hamiltonian at some k-points
>>> evals, evecs = my_model.solve_ham(k_vec, return_eigvecs=True)
Computes hybrid Wannier centers (and functions) for 3-rd kpoint and bottom five bands along first coordinate
>>> hwfc, hwf = my_model.position_hwf(evecs[2, :5], 0, hwf_evec=True, basis="orbital")