Installation#

pip#

PyPI

The tad-libcint package can be obtained from pip.

pip install tad-libcint

Build from source#

This project is hosted on GitHub at tad-mctc/tad-libcint.

git clone --recursive https://github.com/tad-mctc/tad-libcint
cd tad-libcint
  1. Get the repository (including libcint submodule).

git clone --recursive https://github.com/tad-mctc/tad-libcint
cd tad-libcint

The libcint fork contains some additional integrals required for dxtb. Therefore, downloading from our fork is recommended.

If you already have the repository, you can update the submodule with

git submodule update --remote
  1. Create an environment for building the wheels.

We recommend using a conda environment to install the package. You can setup the environment manager using a mambaforge installer. Install the required dependencies from the conda-forge channel. The example here uses Python 3.10, but we support 3.8-3.11.

mamba env create -f env-310.yaml
mamba activate wheel-310
  1. Build the wheel.

python -m build --wheel
  1. Repair the wheels for cross-distribution packaging.

auditwheel repair -w wheels --plat manylinux_2_12_x86_64 dist/*-cp310-cp310-linux_x86_64.whl
  1. Or only install this project with pip in the environment.

pip install .

Development#

For development, additionally install the following tools in your environment.

mamba install black covdefaults coverage mypy pre-commit pylint tox

With pip, add the option -e for installing in development mode, and add [dev] for the development dependencies

pip install -e .[dev]

The pre-commit hooks are initialized by running the following command in the root of the repository.

pre-commit install

For testing all Python environments, simply run tox.

tox

Note that this randomizes the order of tests but skips “large” tests. To modify this behavior, tox has to skip the optional posargs.

tox -- test