Coverage for tbkit/__init__.py: 100%
41 statements
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-21 11:05 +0000
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-21 11:05 +0000
1# Copyright 2014 Charles Poli.
2#
3# This file is part of TBKIT. It is subject to the license terms in the
4# LICENSE file found in the top-level directory of this distribution and at
5# https://github.com/cpoli/tbkit.
7"""tbkit: build and solve Tight-Binding models."""
9__version__ = "0.9.0"
11__all__ = [
12 "Lattice", "System", "Plot", "Propagation", "Save", "KSpace",
13 "reciprocal_vectors", "OrbitalSystem", "Transport", "FloquetKSpace",
14 "DrivenKSpace", "StepDrive", "step_drive",
15 "MeanFieldResult", "hubbard_mean_field", "ExceptionalPoints", "Encircling",
16 "find_exceptional_points", "error_handling",
17]
19# NOTE: these are explicit imports, not `from tbkit.<module> import *`.
20# A wildcard import here would rebind the `tbkit.<module>` submodule
21# attributes to the classes they define (since e.g. tbkit/lattice.py both
22# *is* the submodule `tbkit.lattice` and defines a `lattice` alias of the
23# same name), breaking `import tbkit.lattice as lattice`-style imports.
24from tbkit.lattice import Lattice
25from tbkit.system import System
26from tbkit.plot import Plot
27from tbkit.propagation import Propagation
28from tbkit.save import Save
29from tbkit.kspace import KSpace, reciprocal_vectors
30from tbkit.orbital import OrbitalSystem
31from tbkit.transport import Transport
32from tbkit.floquet import FloquetKSpace, DrivenKSpace, StepDrive, step_drive
33from tbkit.meanfield import MeanFieldResult, hubbard_mean_field
34from tbkit.exceptional import ExceptionalPoints, Encircling, find_exceptional_points
35import tbkit.error_handling
36# Model I/O (tbkit.io): appended here to keep the list above untouched.
37from tbkit.io import save_model, load_model, read_wannier90
38__all__ += ["save_model", "load_model", "read_wannier90"]
39# Wannier90 output and _tb.dat input; tbkit.interop (ASE, PythTB, TBmodels,
40# Z2Pack, qsymm, pybinding, Kwant) imports those packages only when called
41from tbkit.io import write_wannier90, read_wannier90_tb
42__all__ += ["write_wannier90", "read_wannier90_tb"]
44# Higher-order topology, moire supercells, self-consistent interactions
45from tbkit.higher_order import CornerCharges, quadrupole_moment, corner_charges
46__all__ += ["CornerCharges", "quadrupole_moment", "corner_charges"]
47from tbkit.moire import SupercellKSpace, MoireKSpace, supercell, twisted_bilayer
48__all__ += ["SupercellKSpace", "MoireKSpace", "supercell", "twisted_bilayer"]
49from tbkit.meanfield import NonCollinearResult, hubbard_mean_field_noncollinear
50from tbkit.bdg import GapResult, s_wave_gap
51__all__ += ["NonCollinearResult", "hubbard_mean_field_noncollinear", "GapResult", "s_wave_gap"]
52from tbkit.transport import RecursiveTransport
53__all__ += ["RecursiveTransport"]
54# Real-space and 3D topological diagnostics
55from tbkit.topology import WeylPoints, find_weyl_points, bott_index
56__all__ += ["WeylPoints", "find_weyl_points", "bott_index"]
57# Analysis and plotting: standard k-paths
58from tbkit.kspace import high_symmetry_path, cubic_path
59__all__ += ["high_symmetry_path", "cubic_path"]
60# Continuum (k.p) models discretized on a grid; sympy is imported on first use
61from tbkit.continuum import discretize, discretize_symbolic
62__all__ += ["discretize", "discretize_symbolic"]
63# Wannier functions: projection and maximal localization
64from tbkit.wannier import WannierFunctions, wannierize
65__all__ += ["WannierFunctions", "wannierize"]
66# Localization lengths of disordered strips by the transfer matrix
67from tbkit.localization import Lyapunov, lyapunov_exponents
68__all__ += ["Lyapunov", "lyapunov_exponents"]
69# Exact diagonalization of small interacting clusters
70from tbkit.manybody import FockSector, ExactResult, exact_diagonalization, project_interaction
71__all__ += ["FockSector", "ExactResult", "exact_diagonalization", "project_interaction"]
72# Crystal symmetry: space-group operations, irreps, indicators, symmetrization
73from tbkit.symmetry import (Operation, Irreps, find_symmetries, irreps, rotation_indicator,
74 inversion_indicators, corner_charge, symmetrize)
75__all__ += ["Operation", "Irreps", "find_symmetries", "irreps", "rotation_indicator",
76 "inversion_indicators", "corner_charge", "symmetrize"]