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_shelldistinct 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:radiusShell radius in Cartesian units (float).
coordination_numberDict 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}whereZis 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.bondsList 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 translationRsuch that the neighbor sits at orbitaljin unit cellR. Pass directly toset_hop().displacement(list of float): Cartesian vector \(\Delta\mathbf{r}\) from orbitalito orbitalj + 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_shellis not a positive integer, or if the lattice has no orbitals or zero real-space dimension.