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 in a given nearest-neighbor shell. Shells are numbered by increasing distance: shell 1 = nearest neighbors, shell 2 = next-nearest neighbors, etc. All hoppings within the same shell are assigned the same amplitude.

Shell topology and distances are determined from the orbital positions \(\boldsymbol{\tau}_i\) in the lattice. Each key in shell_hops labels a shell index, and the associated amplitude is applied uniformly to every bond belonging to 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 be

  • scalar 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; use set_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)