diff --git a/.github/workflows/macos-arm.yaml b/.github/workflows/macos-arm.yaml index d9aa810..920b72a 100644 --- a/.github/workflows/macos-arm.yaml +++ b/.github/workflows/macos-arm.yaml @@ -41,32 +41,24 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14] + os: [macos-14, macos-15] # Python 3.8/3.9 is not on macos-latest (macos-14-arm64) # https://github.com/actions/setup-python/issues/696 - python-version: ["3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] # only test oldest and newest version of torch - torch-version: ["1.11.0", "2.4.1"] + torch-version: ["1.11.0", "2.5.1"] exclude: # Check latest versions here: https://download.pytorch.org/whl/torch/ # - # PyTorch issues: - # 3.11: https://github.com/pytorch/pytorch/issues/86566 - # 3.12: https://github.com/pytorch/pytorch/issues/110436 - # 3.13: https://github.com/pytorch/pytorch/issues/1302496 + # PyTorch now fully supports Python=<3.11 + # see: https://github.com/pytorch/pytorch/issues/86566 # - # PyTorch<2.2 does only support Python<3.12 (all platforms) + # PyTorch does now support Python 3.12 (macOS only 2.2) + # see: https://github.com/pytorch/pytorch/issues/110436 - python-version: "3.12" torch-version: "1.11.0" - - python-version: "3.12" - torch-version: "1.12.1" - - python-version: "3.12" - torch-version: "1.13.1" - - python-version: "3.12" - torch-version: "2.0.1" - - python-version: "3.12" - torch-version: "2.1.2" - # PyTorch<2.0 does only support Python<3.11 (macOS and Windows) + # PyTorch<1.13.0 does only support Python=<3.10 + # On macOS and Windows, 1.13.x is also not supported for Python>=3.10 - python-version: "3.11" torch-version: "1.11.0" - python-version: "3.11" diff --git a/.github/workflows/macos-x86.yaml b/.github/workflows/macos-x86.yaml index 7cb4015..f38dd86 100644 --- a/.github/workflows/macos-x86.yaml +++ b/.github/workflows/macos-x86.yaml @@ -41,8 +41,8 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-12, macos-13] - python-version: ["3.8", "3.9", "3.10", "3.11"] + os: [macos-13] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # only test oldest and newest version of torch torch-version: ["1.11.0", "2.2.2"] exclude: @@ -55,7 +55,10 @@ jobs: # # Wheels for macOS x86_64 are deprecated since 2.3.0 # - # PyTorch<2.2 does only support Python<3.12 (all platforms) + # Starting with macOS 14, runners are based on ARM. + # The macOS 12 runner image is removed on December 3rd. + # + # PyTorch<2.2.0 does only support Python<3.12 (all platforms) - python-version: "3.12" torch-version: "1.11.0" - python-version: "3.12" @@ -66,7 +69,7 @@ jobs: torch-version: "2.0.1" - python-version: "3.12" torch-version: "2.1.2" - # PyTorch<2.0 does only support Python<3.11 (macOS and Windows) + # PyTorch<2.0.0 does only support Python<3.11 (macOS and Windows) - python-version: "3.11" torch-version: "1.11.0" - python-version: "3.11" diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml index 78f69e8..f12c92e 100644 --- a/.github/workflows/ubuntu.yaml +++ b/.github/workflows/ubuntu.yaml @@ -43,7 +43,18 @@ jobs: matrix: os: [ubuntu-latest] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - torch-version: ["1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2", "2.3.1", "2.4.1"] + torch-version: + [ + "1.11.0", + "1.12.1", + "1.13.1", + "2.0.1", + "2.1.2", + "2.2.2", + "2.3.1", + "2.4.1", + "2.5.1", + ] exclude: # Check latest versions here: https://download.pytorch.org/whl/torch/ # @@ -68,6 +79,9 @@ jobs: torch-version: "1.11.0" - python-version: "3.11" torch-version: "1.12.1" + # PyTorch>=2.5.0 does not support Python<3.9 + - python-version: "3.8" + torch-version: "2.5.1" runs-on: ${{ matrix.os }} diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index dcc81d4..ccc00bf 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -42,9 +42,9 @@ jobs: fail-fast: false matrix: os: [windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # only test oldest and newest version of torch - torch-version: ["1.11.0", "2.4.1"] + torch-version: ["1.11.0", "2.5.1"] exclude: # Check latest versions here: https://download.pytorch.org/whl/torch/ # @@ -71,6 +71,9 @@ jobs: torch-version: "1.12.1" - python-version: "3.11" torch-version: "1.13.1" + # PyTorch>=2.5.0 does not support Python<3.9 + - python-version: "3.8" + torch-version: "2.5.1" runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 4d8ef75..181c3fc 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,18 @@ Implementation of the DFT-D4 dispersion model in PyTorch. This module allows to process a single structure or a batch of structures for the calculation of atom-resolved dispersion energies. +If you use this software, please cite the following publication + +- M. Friede, C. Hölzer, S. Ehlert, S. Grimme, *J. Chem. Phys.*, **2024**, *161*, 062501. DOI: [10.1063/5.0216715](https://doi.org/10.1063/5.0216715) + + For details on the D4 dispersion model, see: - E. Caldeweyher, C. Bannwarth and S. Grimme, *J. Chem. Phys.*, 2017, 147, 034112. [DOI: 10.1063/1.4993215](https://dx.doi.org/10.1063/1.4993215) - E. Caldeweyher, S. Ehlert, A. Hansen, H. Neugebauer, S. Spicher, C. Bannwarth and S. Grimme, *J. Chem. Phys.*, 2019, 150, 154122. [DOI: 10.1063/1.5090222](https://dx.doi.org/10.1063/1.5090222) - E. Caldeweyher, J.-M. Mewes, S. Ehlert and S. Grimme, *Phys. Chem. Chem. Phys.*, 2020, 22, 8499-8512. [DOI: 10.1039/D0CP00502A](https://doi.org/10.1039/D0CP00502A) + For alternative implementations, also check out: - [dftd4](https://dftd4.readthedocs.io): Implementation of the DFT-D4 dispersion model in Fortran with Python bindings. @@ -136,6 +142,7 @@ The following dependencies are required | 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: | 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. diff --git a/docs/index.rst b/docs/index.rst index 1e3ad80..ca8e076 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -56,6 +56,13 @@ This module allows to process a single structure or a batch of structures for th References ---------- +For using DFT-D4 in the automatic differentiation framework: + +- \M. Friede, C. Hölzer, S. Ehlert, S. Grimme, *J. Chem. Phys.*, **2024**, *161*, 062501. DOI: `10.1063/5.0216715 `__ + + +For the DFT-D4 dispersion model: + - \E. Caldeweyher, C. Bannwarth and S. Grimme, *J. Chem. Phys.*, **2017**, *147*, 034112. DOI: `10.1063/1.4993215 `__ - \E. Caldeweyher, S. Ehlert, A. Hansen, H. Neugebauer, S. Spicher, C. Bannwarth and S. Grimme, *J. Chem. Phys.*, **2019**, *150*, 154122. DOI: `10.1063/1.5090222 `__ diff --git a/setup.cfg b/setup.cfg index eaadc6f..0358a0d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ install_requires = tad-mctc tad-multicharge tomli - torch>=1.11,<2.5 + torch>=1.11,<3 typing-extensions python_requires = >=3.8, <3.13 package_dir = @@ -65,6 +65,6 @@ tox = [options.package_data] tad_dftd4 = py.typed - parameters.toml + damping/parameters/parameters.toml **/*.npy **/*.npz diff --git a/tox.ini b/tox.ini index 2c0dda1..79d7606 100644 --- a/tox.ini +++ b/tox.ini @@ -19,10 +19,10 @@ min_version = 4.0 isolated_build = True envlist = py38-torch{1110,1121,1131,201,212,222,231,240,241}, - py39-torch{1110,1121,1131,201,212,222,231,240,241,250,260}, - py310-torch{1110,1121,1131,201,212,222,231,240,241,250,260}, - py311-torch{1131,201,212,222,231,240,241,250,260} - py312-torch{222,231,240,241,250,260} + py39-torch{1110,1121,1131,201,212,222,231,240,241,250,251,260}, + py310-torch{1110,1121,1131,201,212,222,231,240,241,250,251,260}, + py311-torch{1131,201,212,222,231,240,241,250,251,260} + py312-torch{222,231,240,241,250,251,260} [testenv] setenv = @@ -47,7 +47,8 @@ deps = torch240: torch==2.4.0 torch241: torch==2.4.1 torch250: torch==2.5.0 - torch250: torch==2.6.0 + torch251: torch==2.5.1 + torch260: torch==2.6.0 .[tox] commands =