PybindingΒΆ

Pybinding is a Python package for numerical tight-binding calculations in solid state physics. If you’re just browsing, the Basic Tutorial section is a good place to start. It gives a good overview of the most important features with lots of code examples.

As a very quick example, the following code creates a triangular quantum dot of bilayer graphene and then applies a custom asymmetric strain function:

import pybinding as pb
from pybinding.repository import graphene

def asymmetric_strain(c):
    @pb.site_position_modifier
    def displacement(x, y, z):
        ux = -c/2 * x**2 + c/3 * x + 0.1
        uy = -c*2 * x**2 + c/4 * x
        return x + ux, y + uy, z
    return displacement

model = pb.Model(
    graphene.bilayer(),
    pb.regular_polygon(num_sides=3, radius=1.1),
    asymmetric_strain(c=0.42)
)
model.plot()
Asymmetrically strained bilayer graphene quantum dot

Within the Pybinding framework, tight-binding models are assembled from logical parts which can be mixed and matched in various ways. The package comes with a few predefined components: crystal lattices, shapes, symmetries, defects, fields and more (like the graphene.bilayer() lattice and the regular_polygon() shape shown above). Users can also define new components (just like the asymmetric strain above). This modular approach enables the construction of arbitrary tight-binding models with clear, easy-to-use code. Various solvers, computation routines and visualization tools are also part of the package. See the Basic Tutorial for a walkthrough of the features.

The source code repository is located on Github where you can also post any questions, comments or issues that you might have.