Skip to content

Latest commit

 

History

History
115 lines (80 loc) · 3.33 KB

README.md

File metadata and controls

115 lines (80 loc) · 3.33 KB

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.11

Then install the build-time dependencies first:

conda install -c conda-forge compilers git pip cmake scikit-build spglib=2.1.0 pybind11=2.11.1

Install directly from git via pip:

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

Development Installation with Anaconda

After creating the same environment, nstall conda-build:

conda install conda-build

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

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

The last step is necessary so that the C++ extension is found in the module directory.

First steps

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.

hetbuilder build graphene.xyz MoS2.cif

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

Known Issues

  1. error: '::timespec_get' has not been declared see here. In this case, the solution seems to be to run conda upgrade -c conda-forge --all.
  2. Installation troubles, e.g., with spglib:
    • Try to update your conda forge packages:
    • conda config --add channels conda-forge
    • conda config --set channel_priority strict
    • conda update --all
    • conda install -c conda-forge spglig