latticeTB code

class latticeTB.latticeTB(tags, ri, nor, ang)[source]

Bases: object

Build up a lattice.

get_lattice(nx, ny)[source]

Get the lattice positions

Parameters:
  • nx – Number of unit cells along x.
  • ny – Number of unit cells along y.
remove_sites(ind)[source]

Remove sites define their indices

Parameters:ind – Array of site indices to be removed.
remove_dangling(nor_bond)[source]

Remove dangling sites (sites connected with just another site).

Parameters:nor_bond – Norm of the bonds to be checked.
plt_lattice(colors=[], ms=30, fs=20, plt_index=False, figsize=None)[source]

Plot lattice.

Parameters:
  • colors – Sublattice colors.
  • ms – Default value 30. Markersize.
  • lw – Default value 5. Linewidth of the hoppings.
  • plt_index – Default value False. Plot site indices.
  • figsize – Default value None. Figsize.
Returns:

  • fig – Figure.