Example#
An example of use is given in ./examples/spinWannier_use_example.ipynb
. It uses input files of a CrSeTe monolayer given in ./examples/CrSeTe/
.
1. Load the model from wannier90
files#
from spinWannier.WannierTBmodel import WannierTBmodel
model = WannierTBmodel(sc_dir='./sc', nsc_dir='./nsc', wann_dir='./wann', bands_dir='./bands')
2. Interpolate bands and spin along a high-symmetry path#
kpoint_matrix=[[(0.33,0.33,0.00), (0.00,0.00,0.00)],
[(0.00,0.00,0.00), (0.50,0.00,0.00)],
[(0.50,0.00,0.00), (0.33,0.33,0.00)]]
model.interpolate_bands_and_spin(kpoint_matrix, kpath_ticks=['K','G','M','K'], kmesh_2D=False)
model.plot1D_bands(yaxis_lim=[-6.6, 7.5], savefig=True, showfig=True)
3. Interpolate bands and spin on a 2D Brillouin zone#
model.interpolate_bands_and_spin(kpoint_matrix, kmesh_2D=True)
model.plot2D_spin_texture()
(In-plane spin projection as arrows, out-of-plane spin color-coded.)
4. Calculate the error of Wannier interpolation#
model.wannier_quality(yaxis_lim=[-6.5, 7.5], savefig=True, showfig=True)
(The same information is also plotted as a function of energy, _integrated over k-space.)
(Spin magnitudes, _integrated over k-space.)
(Their histogram, with most values close to 1, as expected.)