Skip to content

Builds 2D heterostructures via coincidence lattice theory.

License

Notifications You must be signed in to change notification settings

ShengLin1001/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.0%
  • C++ 39.9%
  • CMake 2.9%
  • Svelte 2.6%
  • JavaScript 1.6%
  • CSS 0.6%
  • Other 0.4%