Skip to content

Builds 2D heterostructures via coincidence lattice theory.

License

Notifications You must be signed in to change notification settings

hongyi-zhao/hetbuilder

 
 

Repository files navigation

Hetbuilder - builds heterostructure interfaces

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 pyenv, venv, or virtualenv etc.

$ sudo apt update && sudo apt install -y build-essential git pip cmake python3-dev python3-tk pybind11-dev libsymspg-dev
$ git clone https://github.com/hongyi-zhao/hetbuilder.git && cd hetbuilder
$ pyenv shell 3.11.1
$ pyenv virtualenv hetbuilder
$ pyenv shell hetbuilder
$ pip install -r requirements.txt
$ pip install .  

Development Installation with pyenv, venv, or virtualenv etc.

Download or clone the github repository. Then, cd to the repository and

$ pip install -r requirements.txt
$ mkdir build
$ cd build
$ cmake .. && make
$ cp hetbuilder_backend.*.so ../hetbuilder/
$ cd .. && pip install -e .

Usage via CLI

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

$ hetbuilder --help

The build utility is fully implemented. 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.

$ cd tests
$ hetbuilder build -t0.15 graphene.xyz MoS2_2H_1L.xyz

This should open a matplotlib interface looking like this:

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

About

Builds 2D heterostructures via coincidence lattice theory.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.8%
  • C++ 39.3%
  • CMake 2.8%
  • Svelte 2.5%
  • JavaScript 1.6%
  • CSS 0.6%
  • Other 0.4%