hopping_generator(name, energy)

Introduce a new hopping family (with a new hop_id) via a list of index pairs

This can be used to create new hoppings independent of the main Lattice definition. It’s especially useful for creating additional local hoppings, e.g. to model defects.


name : string

Friendly identifier for the new hopping family.

energy : Union[float, complex]

Base hopping energy value.


The function parameters must be a combination of any number of the following:

x, y, z : np.ndarray
Lattice site position.
sub_id : np.ndarray
Sublattice identifier: can be checked for equality with sublattice names specified in Lattice.

The function must return:

Tuple[np.ndarray, np.ndarray]
Arrays of index pairs which form the new hoppings.