pythtb.Lattice.nn_bonds#

Lattice.nn_bonds(n_shell, report=False)[source]#

Enumerate nearest-neighbor shells of the lattice.

The lattice’s orbitals are treated as points in real space (Cartesian coordinates). We form all displacement vectors connecting each orbital to every other orbital translated by integer lattice vectors and group them into n_shell distinct radial shells.

Parameters:
n_shellint

Number of shells to return (starting from the shortest non-zero displacement).

reportbool, optional

If True, print a human-readable table of the shells and their degeneracies. Default is False.

Returns:
list of dict

List of length n_shell. Each entry is a dictionary with keys:

radius

Shell radius in Cartesian units (float).

coordination_number

Dict mapping each orbital index to the number of neighbors it has in this shell (int). For a single-orbital model this is simply {0: Z} where Z is the coordination number (e.g. {0: 6} for the NN shell of a simple cubic lattice). For multi-orbital models each entry gives the per-site count independently, which may differ between inequivalent sites.

bonds

List of bonds in this shell. Each bond is a dictionary with:

  • i (int): index of the orbital in the home unit cell.

  • j (int): index of the neighboring orbital.

  • lattice_vector (tuple of int): lattice translation R such that the neighbor sits at orbital j in unit cell R. Pass directly to set_hop().

  • displacement (list of float): Cartesian vector \(\Delta\mathbf{r}\) from orbital i to orbital j + R.

Only one of each conjugate pair (i, j, R) / (j, i, -R) is included; set_hop() adds the conjugate automatically.

Raises:
ValueError

If n_shell is not a positive integer, or if the lattice has no orbitals or zero real-space dimension.