From b554ed366d51c7adbcf49902e1f7a84cb9d87c7d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Jun 2026 09:38:58 +0200 Subject: [PATCH 1/2] fix: convert ASE unit constants to float to fix broken arithmetic (#373) --- python/dftd4/ase.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/dftd4/ase.py b/python/dftd4/ase.py index f0d68439..2bd545cd 100644 --- a/python/dftd4/ase.py +++ b/python/dftd4/ase.py @@ -101,7 +101,10 @@ all_changes, ) from ase.calculators.mixing import SumCalculator -from ase.units import Bohr, Hartree +from ase.units import Bohr as _Bohr, Hartree as _Hartree + +Bohr = float(_Bohr) +Hartree = float(_Hartree) from .interface import DampingParam, DispersionModel From 3f40e365c856b75a2c82adf8fa2f5459e6b8aa44 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:01:55 +0200 Subject: [PATCH 2/2] Fix readthedocs build (#374) --- doc/conf.py | 4 ++-- python/dftd4/ase.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 31770efd..98892010 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -8,7 +8,7 @@ project = "DFT-D4" author = "Grimme group" -copyright = f"2017–2024 {author}" +copyright = f"2017–2026 {author}" extensions = [ "sphinx_copybutton", @@ -44,7 +44,7 @@ templates_path = ["_templates"] autodoc_typehints = "none" -autodoc_mock_imports = ["dftd4.library", "numpy", "ase", "qcelemental", "pyscf"] +autodoc_mock_imports = ["dftd4.library"] autosummary_generate = True napoleon_google_docstring = False napoleon_use_param = False diff --git a/python/dftd4/ase.py b/python/dftd4/ase.py index 2bd545cd..f0d68439 100644 --- a/python/dftd4/ase.py +++ b/python/dftd4/ase.py @@ -101,10 +101,7 @@ all_changes, ) from ase.calculators.mixing import SumCalculator -from ase.units import Bohr as _Bohr, Hartree as _Hartree - -Bohr = float(_Bohr) -Hartree = float(_Hartree) +from ase.units import Bohr, Hartree from .interface import DampingParam, DispersionModel