Hetbuilder - builds heterostructure interfaces

DOI Documentation Status PyPI version

Builds 2D heterostructure interfaces via coincidence lattice theory.

Installation

Build-time dependencies

Requires a C++17 compiler and cmake.

It is also recommended to preinstall spglib and pybind11. Otherwise, these will be built during the installation from the submodules.

Installing with Anaconda

Create a clean conda environment:

conda env create -n hetbuilder python=3.9

Then install the build-time dependencies first:

conda install -c conda-forge cxx-compiler git pip cmake spglib pybind11

Then, you can install the project from pip:

pip install hetbuilder

If that does not work, try directly installing from git:

pip install git+https://github.com/romankempt/hetbuilder.git

Installing with pip

PyPI does not provide the library files of spglib. These will be built from the submodules at installation time, which might be time-consuming.

On Unix, you can install a cxx-compiler with:

sudo apt install build-essential

First steps

The installation exposes a multi-level typer CLI utility called hetbuilder:

hetbuilder --help

The build utility exposes the results interactively via a matplotlib GUI. You can use any ASE-readable structure format to specify the lower and upper layer. They should be recognizable as two-dimensional, e.g., by having a zero vector in the z-direction.

hetbuilder build graphene.xyz MoS2.cif

This should open a matplotlib interface looking like this:

pictures/interface.png

Documentation

Documentation is available at Read the Docs.

Testing

Tests can be run in the project directory with

pytest -v tests

Citing

If you use this tool, please cite 10.5281/zenodo.4721346.

Requirements