Skip to main content

"Torch Autodiff Libcint Interface"

Project description

PyTorch-based Libcint Interface

Compatibility: Python Versions PyTorch Versions Operating Systems
Availability: Release PyPI Apache-2.0
Status: Tests Ubuntu Build Status Documentation Status pre-commit.ci Status Coverage

Content

This package contains a PyTorch-based interface to the libcint high-performance integral library (check version here). 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 PyPI Version PyPI Downloads

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.

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

The libcint fork contains additional integrals required for dxtb and removes unneccessary ones. 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 (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
  1. Build the wheel on your system.
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 .

Compatibility Linux only

PyTorch \ Python 3.8 3.9 3.10 3.11 3.12
1.11.0 :white_check_mark: :white_check_mark: :x: :x: :x:
1.12.1 :white_check_mark: :white_check_mark: :white_check_mark: :x: :x:
1.13.1 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x:
2.0.1 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x:
2.1.2 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x:
2.2.2 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
2.3.1 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
2.4.1 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
2.5.1 :x: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
2.6.0 :x: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

Note that only the latest bug fix version is listed, but all preceding bug fix minor versions are supported. For example, although only version 2.2.2 is listed, version 2.2.0 and 2.2.1 are also supported.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tad_libcint-0.2.0.tar.gz (50.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tad_libcint-0.2.0-cp312-cp312-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.12+ x86-64

tad_libcint-0.2.0-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.12+ x86-64

tad_libcint-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.12+ x86-64

tad_libcint-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

tad_libcint-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

File details

Details for the file tad_libcint-0.2.0.tar.gz.

File metadata

  • Download URL: tad_libcint-0.2.0.tar.gz
  • Upload date:
  • Size: 50.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for tad_libcint-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cb546f7689f71449f091fa8c011e29bfd4a4f960aa8489c33fd2d886deb87b62
MD5 d0d510612463ce96b9940a58ca08d123
BLAKE2b-256 49d3ccc1d9694c9139d0681b9fe6725a050d4e6b4593b67720fe2bb5e3558cf7

See more details on using hashes here.

File details

Details for the file tad_libcint-0.2.0-cp312-cp312-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tad_libcint-0.2.0-cp312-cp312-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 53cc36124fd5e122ea59c287bae821067b465de9cbbe091dae781963e89bb9ff
MD5 1d564674b9d33577ae054638eb92f348
BLAKE2b-256 1591e00b998105002de89b8ca1ca18969b84d80e84446803404c4d7112ce385d

See more details on using hashes here.

File details

Details for the file tad_libcint-0.2.0-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tad_libcint-0.2.0-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b6e1fe2029d699fccfb027c339689da78ed1226fafb48fc507c82a48aa9937c7
MD5 735b64419a352829635ef04376e96310
BLAKE2b-256 ebf59c47afc52235f360adda7e357c8fb3ba6893fe080f671fac762cf8e69bd8

See more details on using hashes here.

File details

Details for the file tad_libcint-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tad_libcint-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 101c4eed8325e2083902a03f8a0a6d3ac3746ad5ab841b1e2cd0f07776577dd2
MD5 4d4effc6fac12a1551c90cdf5bea7e1c
BLAKE2b-256 d93b0d2bc657b021e662bb4728b955328125d6ed690dd5d1e2be4e15a9373ce8

See more details on using hashes here.

File details

Details for the file tad_libcint-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tad_libcint-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 106ca86a12545a70a19a9112423e0b211e92e1f2e4be1fdcca63a9d54c2fb33e
MD5 315989808a55ffa4dbfecca2db3aff92
BLAKE2b-256 fbe30f7162fc963af783ea25007973271c5cd651ae79eb04b8361924825dfe38

See more details on using hashes here.

File details

Details for the file tad_libcint-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tad_libcint-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 eaa59a878e17929191560e17621225e2772237156123ac621d48dfcb15cb6ad4
MD5 2e1b14ef39bf7cd693b44fde6ad3a2ae
BLAKE2b-256 31dbcd35dd3ab8c12754e9b7c7adafcee31457b5d72e5b89fb0c31af8136082d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page