Coverage for tbkit/__init__.py: 100%

33 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-15 06:13 +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. 

6 

7"""tbkit: build and solve Tight-Binding models.""" 

8 

9__version__ = "0.6.1" 

10 

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] 

18 

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 

40# Higher-order topology, moire supercells, self-consistent interactions 

41from tbkit.higher_order import CornerCharges, quadrupole_moment, corner_charges 

42__all__ += ["CornerCharges", "quadrupole_moment", "corner_charges"] 

43from tbkit.moire import SupercellKSpace, MoireKSpace, supercell, twisted_bilayer 

44__all__ += ["SupercellKSpace", "MoireKSpace", "supercell", "twisted_bilayer"] 

45from tbkit.meanfield import NonCollinearResult, hubbard_mean_field_noncollinear 

46from tbkit.bdg import GapResult, s_wave_gap 

47__all__ += ["NonCollinearResult", "hubbard_mean_field_noncollinear", "GapResult", "s_wave_gap"] 

48from tbkit.transport import RecursiveTransport 

49__all__ += ["RecursiveTransport"] 

50# Real-space and 3D topological diagnostics 

51from tbkit.topology import WeylPoints, find_weyl_points, bott_index 

52__all__ += ["WeylPoints", "find_weyl_points", "bott_index"] 

53# Analysis and plotting: standard k-paths 

54from tbkit.kspace import high_symmetry_path, cubic_path 

55__all__ += ["high_symmetry_path", "cubic_path"] 

56# Continuum (k.p) models discretized on a grid; sympy is imported on first use 

57from tbkit.continuum import discretize, discretize_symbolic 

58__all__ += ["discretize", "discretize_symbolic"] 

59# Wannier functions: projection and maximal localization 

60from tbkit.wannier import WannierFunctions, wannierize 

61__all__ += ["WannierFunctions", "wannierize"]