"Torch Autodiff Libcint Interface"
Project description
PyTorch-based Libcint Interface
Compatibility: | |
Availability: | |
Status: |
Content
This package contains a PyTorch-based interface to the libcint high-performance integral library. The interface facilitates automatic differentiation with custom backward functions that call libcint's C backend for derivative calculation.
It is based on PySCF's lib directory. Modifications include
- removal of unnecessary code
- minor adaptation of build instructions (CMakeLists.txt)
The project was heavily inspired by diffqc/dqc and diffqc/dqclibs.
This interface was mainly written for the calculation of integrals within grimme-lab/dxtb.
Installation
pip
The tad-libcint
package can be obtained from pip.
pip install tad-libcint
Build from source
You can also build the Python wheels from source.
- Get the repository (including libcint submodule).
git clone --recursive git@github.com:grimme-lab/tad-libcint.git
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
- Create an environment (
conda
) for building the wheels. The example here uses Python 3.10, but we support 3.8-3.11.
mamba create -n wheel-310 --yes python=3.10 auditwheel c-compiler cxx-compiler fortran-compiler cffi cmake git make meson ninja numpy patchelf pkgconfig pip python-build unzip wheel
mamba activate wheel-310
- Build the wheel on your system.
python -m build --wheel
- Repair the wheels for cross-distribution packaging.
auditwheel repair -w wheels --plat manylinux_2_12_x86_64 dist/*-cp310-cp310-linux_x86_64.whl
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for tad_libcint-0.0.1-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a8e5fd472e1b14967ba79ff8ea47a27a66b1a8d5c9f023fbcd70214e8eb621a |
|
MD5 | ca3d3dc653857287c90adb69dfecca36 |
|
BLAKE2b-256 | 2b933ecdbfcae41cece3904e16fdb9560faebd32367bbf8384033ed59a443a3c |
Hashes for tad_libcint-0.0.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d47f9aeeea99980696b97c954ef48c157deb8043baf11af042c1bc9bb6569e8 |
|
MD5 | 9561b802dfed4ca14d9a36a76fd6de8e |
|
BLAKE2b-256 | a3b68d22daf2a49055065ba4b44edb5f6ff4461db7a0d73f9e963d10e337a82b |
Hashes for tad_libcint-0.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7963c3996c805726c9a0397403b90647cf31e2d3bff21025186725bcb1d7e9ae |
|
MD5 | d0294188a2a0d8a09c2338ca984cb5e6 |
|
BLAKE2b-256 | 2a0463cf6d2514af3ca8aab0a33176139ed10139cd5f94a94a9e17773e4f6f26 |
Hashes for tad_libcint-0.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fdc7fc9de9769afb852a26774981068a60299dbc0720bbdcd0e15ad6f2eb3d5 |
|
MD5 | 10fcd3622082871ea7ca655a34f6e7eb |
|
BLAKE2b-256 | 6e6bfd30725653aa3201b988e2e81ea9e4629e2480c89ffec69a7b26f3b05fac |