pythtb.TBModel.set_shell_hops#
- TBModel.set_shell_hops(shell_hops, mode='set')[source]#
Set hopping amplitudes for entire nearest-neighbor shells.
This assigns \(H_{ij}(\mathbf{R})\) for all orbital pairs whose spatial separation lies within a specified nearest-neighbor shell.
Shells are ordered by increasing distance: shell 1 corresponds to nearest neighbors, shell 2 to next-nearest neighbors, and so on. Every hopping in a given shell is assigned the same amplitude.
The shell classification is determined from the orbital positions \(\boldsymbol{\tau}_i\) together with the lattice geometry. Each key in
shell_hopsspecifies a shell index, and the corresponding value is assigned uniformly to every hopping in that shell.Added in version 2.0.0.
- Parameters:
- shell_hopsdict[int, scalar | array_like | (2,2) ndarray | str | callable]
Mapping
shell->amplitude. Keys are positive integers labeling neighbor shells. Values specify hopping strength. For spinful models, amplitudes may bescalar
a→ \(a I_2\)4-vector
[a,b,c,d]→ \(a I + b\sigma_x + c\sigma_y + d\sigma_z\)2×2 Hermitian ndarray
Symbolic strings or callables can also be supplied; in that case, parameter names are registered automatically and later passed as keyword arguments to
hamiltonian(),solve_ham(), etc.- mode{‘set’, ‘add’}, default=’set’
Operation mode:
'set': replace existing hopping values'add': add to existing values
Notes
All hopping terms in the same shell receive exactly the same amplitude.
Shell identification is based purely on distance; degeneracies or direction are not distinguished.
Parameterized (symbolic/callable) shell amplitudes follow the same rules as in
set_hop(). Callables receive parameters exclusively as keyword arguments.Parameter values supplied to
hamiltonian()(etc.) are not permanently stored in the model; useset_parameters()to persist them.
Examples
Nearest- and next-nearest-neighbor hopping:
>>> tb.set_shell_hops({1: 1.0, 2: 0.5})
Only nearest‐neighbor hopping:
>>> tb.set_shell_hops({1: 1.0})
Spinful shell assignment via 4-vector:
>>> tb.set_shell_hops({1: [1.0, 0.1, 0.0, -0.1]})
Symbolic parameterized NN hopping:
>>> tb.set_shell_hops({1: "t"})
Callable hopping:
>>> tb.set_shell_hops({1: lambda t: 0.2 * np.cos(t)})
Evaluate later:
>>> evals = tb.solve_ham(k_pts, t=0.3)