PythTB

Python library for tight-binding models and topological band theory computations

What it is

PythTB is an open source Python library designed for constructing and analyzing tight-binding models with a focus on modern topological band theory applications. The library provides a streamlined workflow from model specification to physical interpretation making it suitable for both learning electronic structure concepts and conducting research level studies. Users can define lattice geometries, specify on-site and hopping terms, incorporate spin structure, and build parameter dependent model components using an intuitive API.

Core functionality includes model construction with TBModel class, state sampling through structured k-space and parameter meshes, and storage of eigenstates in WFArray objects for downstream analysis. The library excels at computing topological invariants and quantum geometric quantities such as Berry connection, Berry curvature, quantum metric, Wilson loops, Chern numbers, local Chern markers, hybrid Wannier centers, and Chern-Simons axion-angle pumping. Integration with Wannier90 allows import of tight-binding Hamiltonians for post-processing and detailed analysis of topological properties.

Wannier workflows support projection, disentanglement, and construction of maximally localized Wannier functions within a tight-binding framework. Built-in visualization utilities enable plotting of band structures, density of states, lattice geometries, hopping graphs, and interactive 3D models. The documentation includes comprehensive tutorials as Jupyter notebooks demonstrating key features from basic graphene models to advanced topological analyses.

Researchers in condensed matter physics, computational materials scientists, and graduate students benefit from PythTB's ability to bridge theoretical formalism with practical computation. The library is installed via PyPI with minimal dependencies and the source code is hosted on GitHub with active issue tracking and discussions. Version 2.0.0 introduced significant enhancements expanding topological and quantum geometry capabilities.

This description was generated by AI from the site's public content and may contain errors.

What you can do there

  • Build tight-binding Hamiltonians with custom lattice geometries
  • Compute topological invariants and quantum geometric quantities
  • Import and analyze Wannier90 Hamiltonians
  • Visualize band structures and lattice models
  • Follow Jupyter notebook tutorials for learning

Who it's for

Condensed matter physicists, computational materials scientists, graduate students in physics

Frequently asked questions about pythtb.readthedocs.io

›What is PythTB used for?

PythTB is used for constructing tight-binding models and computing topological invariants, quantum geometric quantities, and electronic properties for condensed matter physics research and education.

›How do I install PythTB?

Install PythTB via pip from PyPI with the command pip install pythtb. The library has minimal dependencies and works with standard Python scientific stack.

›Can PythTB import Wannier90 Hamiltonians?

Yes, PythTB provides W90 integration to import Wannier90 tight-binding Hamiltonians for post-processing, band structure evaluation, and topological analysis.

›What topological quantities can PythTB compute?

PythTB computes Berry connection, Berry curvature, quantum metric, Wilson loops, Chern numbers, local Chern markers, hybrid Wannier centers, and Chern-Simons axion-angle pumping.

›Are there tutorials for learning PythTB?

Yes, the documentation includes Jupyter notebook tutorials demonstrating key features from basic model construction to advanced topological analyses.

›Is PythTB open source?

Yes, PythTB is open source with source code hosted on GitHub and distributed under a permissive license for academic and commercial use.