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:
- dict
Dictionary with the following keys:
shellsList of length
n_shell. Each entry is a dictionary with the keysshell(1-based shell index),radius(float),distance_sq(float),degeneracy_total(int), andorbitals(list of per-orbital neighbour data). Each orbital entry contains the indices of the bonded orbital, the lattice translation and the multiplicity.displacementsList of
n_shellentries. Each entry contains, for every orbital in the home cell, an array of Cartesian displacement vectors \(\Delta\mathbf{r}\) pointing to the neighbours in that shell.indicesSame structure as
displacementsbut holding integer metadata of the form[i, j, R_1, ..., R_{dim_r}]whereiandjare orb indices andRis the lattice translation.radiiOne-dimensional
numpy.ndarrayof shell radii in Cartesian units.
- Raises:
- ValueError
If
n_shellis not a positive integer, or if the lattice has no orbitals or zero real-space dimension.