Builds 2D heterostructure interfaces via coincidence lattice theory.
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.
Create a clean conda environment:
conda env create -n hetbuilder python=3.11Then install the build-time dependencies first:
conda install -c conda-forge compilers git pip cmake scikit-build spglib=2.1.0 pybind11=2.11.1Install directly from git via pip:
pip install git+https://github.com/romankempt/hetbuilder.gitAfter creating the same environment, nstall conda-build:
conda install conda-buildDownload 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.
The installation exposes a multi-level typer CLI utility called hetbuilder:
hetbuilder --helpThe 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.cifThis should open a matplotlib interface looking like this:
Documentation is available at Read the Docs.
Tests can be run in the project directory with
pytest -v testsIf you use this tool, please cite 10.5281/zenodo.4721346.
error: '::timespec_get' has not been declaredsee here. In this case, the solution seems to be to runconda upgrade -c conda-forge --all.- Installation troubles, e.g., with spglib:
- Try to update your conda forge packages:
conda config --add channels conda-forgeconda config --set channel_priority strictconda update --allconda install -c conda-forge spglig
