Visualizing 3D tight-binding models#
This example demonstrates how to visualize a 3D tight-binding model using the TBModel.visualize_3d function.
Note
This feature requires the plotly library to be installed.
You can install it via pip:
pip install plotly
or via conda:
conda install plotly
from pythtb.models import fu_kane_mele
# Reference Model
t = 1 # spin-independent first-neighbor hop
soc = 1 # spin-dependent second-neighbor hop
dt = [2, 0, 0, 0] # hopping modulation along (111) direction
fkm_model = fu_kane_mele(t, soc, dt=dt)
fig = fkm_model.visualize_3d(draw_hoppings=True)
fig