Welcome to StraWBerryPy!#
StraWBerryPy (Single-poinT and local invaRiAnts for Wannier Berriologies in Python) is a Python package to calculate topological invariants and quantum-geometrical quantities in non-crystalline topological insulators.
StraWBerryPy can work with periodic and finite systems in tight-binding. In periodic boundary conditions (PBCs), the code implements the single-point formulas for the Chern number [Ceresoli-Resta] and the single-point spin Chern number [Favata-Marrazzo] in the supercell framework. In PBCs, it is also possible to calculate the local Chern marker within periodic boundary conditions [Baù-Marrazzo]. In addition, StraWBerryPy can handle finite systems (such as bounded samples and heterostructures) in open boundary conditions (OBCs) and can compute the local Chern marker [Bianco-Resta] and the localization marker [Marrazzo-Resta] .
The code provides dedicated interfaces to the tight-binding engines PythTB and TBmodels. Latest version of StraWBerryPy implements the calculation of single-point topological invariants with ab initio Wannier Hamiltonians, which are read in the format produced by Wannier90 through WannierBerri.
Installation#
To install StraWBerry you can clone this Github repository and run the following instructions:
git clone https://github.com/strawberrypy-developers/strawberrypy.git
cd strawberrypy
pip install .
Quick start#
Here, a quick example for calculating the single-point and the local topological invariant in the supercell framework for the Haldane model in presence of Anderson disorder. We can define the periodic model with either TBmodels or PythTB, which is then passed to the Supercell class (when defining the supercell, we also need to specify its dimensions). Then, we can add on-site random disorder and finally call the methods to compute the quantities of interest.
import numpy as np
from strawberrypy import *
# Define the PBC model
pbc_model = example_models.haldane_tbmodels(delta = 0.3, t = 1, t2 = 0.15, phi = np.pi / 2)
# Build the supercell of the model
model = Supercell(tbmodel = pbc_model, Lx = 30, Ly = 30, spinful = False)
# Add on-site Anderson disorder
model.add_onsite_disorder(w = 1.5)
# Evaluate the single-point Chern number
sp_inv = model.single_point_chern()
print("Single-point invariant: {}".format(sp_inv))
# Evaluate the PBC local Chern marker
pbclcm = model.pbc_local_chern_marker(macroscopic_average = True, cutoff = 2)