diff options
| author | Romain GARBAGE <romain.garbage@inria.fr> | 2026-01-23 16:19:41 +0100 |
|---|---|---|
| committer | Romain GARBAGE <romain.garbage@inria.fr> | 2026-01-28 15:39:29 +0100 |
| commit | 9e54066da112371e192fbcb8cfbbd8569fe16117 (patch) | |
| tree | d7d560a2f97fa960017515705d8e7e922229bbbd | |
| parent | 7e4e12d6f1f9857041ea9d0b66eb319134dfe018 (diff) | |
chemistry: Add python-deepmd.
* guix-science/packages/chemistry.scm (python-deepmd): New variable.
* patches/python-deepmd-remove-unsupported-key.patch: New file.
| -rw-r--r-- | guix-science/packages/chemistry.scm | 72 | ||||
| -rw-r--r-- | patches/python-deepmd-remove-unsupported-key.patch | 14 |
2 files changed, 85 insertions, 1 deletions
diff --git a/guix-science/packages/chemistry.scm b/guix-science/packages/chemistry.scm index ec5362e..f579724 100644 --- a/guix-science/packages/chemistry.scm +++ b/guix-science/packages/chemistry.scm | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #:use-module (gnu packages compression) | 19 | #:use-module (gnu packages compression) |
| 20 | #:use-module (gnu packages databases) | 20 | #:use-module (gnu packages databases) |
| 21 | #:use-module (gnu packages gcc) | 21 | #:use-module (gnu packages gcc) |
| 22 | #:use-module (gnu packages machine-learning) | ||
| 22 | #:use-module (gnu packages maths) | 23 | #:use-module (gnu packages maths) |
| 23 | #:use-module (gnu packages mpi) | 24 | #:use-module (gnu packages mpi) |
| 24 | #:use-module (gnu packages perl) | 25 | #:use-module (gnu packages perl) |
| @@ -31,7 +32,9 @@ | |||
| 31 | #:use-module (gnu packages version-control) | 32 | #:use-module (gnu packages version-control) |
| 32 | #:use-module (gnu packages wget) | 33 | #:use-module (gnu packages wget) |
| 33 | #:use-module (guix-science packages fortran) | 34 | #:use-module (guix-science packages fortran) |
| 34 | #:use-module (guix-science packages maths)) | 35 | #:use-module (guix-science packages machine-learning) |
| 36 | #:use-module (guix-science packages maths) | ||
| 37 | #:use-module (guix-science packages python-xyz)) | ||
| 35 | 38 | ||
| 36 | (define-public cp2k | 39 | (define-public cp2k |
| 37 | (package | 40 | (package |
| @@ -307,6 +310,73 @@ with a large toolbox of collective variables that describe complex | |||
| 307 | processes in physics, chemistry, material science, and biology.") | 310 | processes in physics, chemistry, material science, and biology.") |
| 308 | (license license:lgpl3+))) | 311 | (license license:lgpl3+))) |
| 309 | 312 | ||
| 313 | (define-public python-deepmd | ||
| 314 | (package | ||
| 315 | (name "python-deepmd") | ||
| 316 | (version "3.1.2") | ||
| 317 | (source | ||
| 318 | (origin | ||
| 319 | (method git-fetch) | ||
| 320 | (uri (git-reference | ||
| 321 | (url "https://github.com/deepmodeling/deepmd-kit") | ||
| 322 | (commit (string-append "v" version)))) | ||
| 323 | (file-name (git-file-name name version)) | ||
| 324 | (sha256 (base32 "0bqayw4rps6h69dj6k2s5991z2zjhlc06ps8rlapj51sa668wmkd")) | ||
| 325 | (patches (search-patches | ||
| 326 | "patches/python-deepmd-remove-unsupported-key.patch")))) | ||
| 327 | (build-system pyproject-build-system) | ||
| 328 | (arguments | ||
| 329 | (list | ||
| 330 | #:phases | ||
| 331 | #~(modify-phases %standard-phases | ||
| 332 | (add-before 'build 'set-environment | ||
| 333 | (lambda _ | ||
| 334 | (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" | ||
| 335 | #$version) | ||
| 336 | (setenv "DP_ENABLE_TENSORFLOW" "0")))) | ||
| 337 | ;; Tests fail with error | ||
| 338 | ;; "ModuleNotFoundError: No module named 'deepmd._version'" | ||
| 339 | #:tests? #f | ||
| 340 | #:test-backend | ||
| 341 | #~'unittest)) | ||
| 342 | (propagated-inputs | ||
| 343 | (list python-array-api-compat | ||
| 344 | python-h5py | ||
| 345 | python-mendeleev | ||
| 346 | python-numpy | ||
| 347 | python-scipy | ||
| 348 | python-pygments | ||
| 349 | python-pyyaml | ||
| 350 | python-dargs | ||
| 351 | python-typing-extensions | ||
| 352 | python-importlib-metadata | ||
| 353 | python-h5py | ||
| 354 | python-wcmatch | ||
| 355 | python-packaging | ||
| 356 | python-ml-dtypes | ||
| 357 | python-mendeleev | ||
| 358 | python-array-api-compat)) | ||
| 359 | (native-inputs | ||
| 360 | (list cmake-minimal | ||
| 361 | python-dependency-groups | ||
| 362 | python-hatch-fancy-pypi-readme | ||
| 363 | python-packaging | ||
| 364 | python-scikit-build-core | ||
| 365 | python-tomli | ||
| 366 | python-setuptools-scm)) | ||
| 367 | (home-page "https://deepmodeling.com/") | ||
| 368 | (synopsis | ||
| 369 | "Deep learning package for molecular dynamics") | ||
| 370 | (description "DeePMD-kit is a package written in Python/C++, designed to minimize | ||
| 371 | the effort required to build deep learning-based model of interatomic | ||
| 372 | potential energy and force field and to perform molecular | ||
| 373 | dynamics (MD). This brings new hopes to addressing the | ||
| 374 | accuracy-versus-efficiency dilemma in molecular | ||
| 375 | simulations. Applications of DeePMD-kit span from finite molecules to | ||
| 376 | extended systems and from metallic systems to chemically bonded | ||
| 377 | systems.") | ||
| 378 | (license license:lgpl3+))) | ||
| 379 | |||
| 310 | (define-public python-mendeleev | 380 | (define-public python-mendeleev |
| 311 | (package | 381 | (package |
| 312 | (name "python-mendeleev") | 382 | (name "python-mendeleev") |
diff --git a/patches/python-deepmd-remove-unsupported-key.patch b/patches/python-deepmd-remove-unsupported-key.patch new file mode 100644 index 0000000..dc76f0c --- /dev/null +++ b/patches/python-deepmd-remove-unsupported-key.patch | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | This fixes a build error where scikit-built fails to recognize "scripts" key. | ||
| 2 | --- a/pyproject.toml 1970-01-01 01:00:01.000000000 +0100 | ||
| 3 | +++ b/pyproject.toml 2026-01-23 14:50:36.387749244 +0100 | ||
| 4 | @@ -215,10 +215,6 @@ | ||
| 5 | provider = "backend.dynamic_metadata" | ||
| 6 | provider-path = "backend" | ||
| 7 | |||
| 8 | -[tool.scikit-build.metadata.scripts] | ||
| 9 | -provider = "backend.dynamic_metadata" | ||
| 10 | -provider-path = "backend" | ||
| 11 | - | ||
| 12 | [tool.scikit-build.metadata.readme] | ||
| 13 | provider = "scikit_build_core.metadata.fancy_pypi_readme" | ||
| 14 | |||
