Welcome to StraWBerryPy!

 On this page

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, including periodic heterostructures, it is also possible to calculate the local Chern marker within periodic boundary conditions [Baù-Marrazzo](a), and the local spin-Chern and local \(\mathbb{Z}_{2}\) markers [Baù-Marrazzo](b). 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], the localization marker [Marrazzo-Resta] , and the local spin-Chern and \(\mathbb{Z}_{2}\) markers [Baù-Marrazzo](b).

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. StraWBerryPy is also parallelized using MPI and ScaLAPACK, enabling efficient and large-scale distributed computations on high-performance computing (HPC) clusters across multiple nodes.

🚀 Getting Started

Learn how to install StraWBerryPy, open-source dependencies, and MPI configurations.

Installation
📚 Tutorials

Step-by-step guides on defining models, adding disorder, and computing invariants.

Tutorial and examples
💻 API Reference

Comprehensive documentation of StraWBerryPy’s classes, methods, and functions.

StraWBerryPy API
🛠️ Developer Guide

Information on contributing, running tests, and source code.

Developer manual

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 = Model(
      model = pbc_model, spinful = False
   ).make_supercell(Lx = 30, Ly = 30)

# Add on-site Anderson disorder
model.add_disorder_uniform(w = 4, seed = 0)

# Evaluate the single-point Chern number
sp_inv = model.single_point_chern()
print(f"Single-point invariant: {sp_inv}")

# Evaluate the PBC local Chern marker
pbclcm = model.pbc_local_chern_marker(
      macroscopic_average = True, cutoff = 2
   )
PBC local Chern marker and single-point Chern number

Feedbacks#

We welcome feedbacks and contributions to the code! If you spot some bugs or have suggestions for improvement, please open an issue on the GitHub repository to reach us.