glicid-non-free/glicid-tainted/packages/chemistry.scm
2023-04-18 23:10:08 +02:00

507 lines
21 KiB
Scheme

(define-module (glicid-tainted packages chemistry)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages mpi)
#:use-module (gnu packages maths)
#:use-module (gnu packages perl)
#:use-module (gnu packages xml)
#:use-module (gnu packages chemistry)
#:use-module (gnu packages documentation)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages check)
#:use-module (gnu packages gcc)
#:use-module (gnu packages ssh)
#:use-module (guix-science-nonfree packages cuda)
#:use-module (glicid packages mpi)
)
(define-public gromacs+cuda
(package
(inherit gromacs)
(name "gromacs+cuda")
(arguments
(list #:configure-flags
#~(list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
;; Unbundling
"-DGMX_USE_LMFIT=EXTERNAL"
"-DGMX_BUILD_OWN_FFTW=off"
"-DGMX_EXTERNAL_BLAS=on"
"-DGMX_EXTERNAL_LAPACK=on"
"-DGMX_EXTERNAL_TNG=on"
"-DGMX_EXTERNAL_ZLIB=on"
; "-DGMX_HWLOC=ON"
"-DGMX_GPU=CUDA"
(string-append "-DCUDA_TOOLKIT_ROOT_DIR=" #$(this-package-input "cuda-toolkit"))
"-DGMX_EXTERNAL_TINYXML2=on"
(string-append "-DTinyXML2_DIR="
#$(this-package-input "tinyxml2"))
;; Workaround for cmake/FindSphinx.cmake version parsing that does
;; not understand the guix-wrapped `sphinx-build --version' answer
(string-append "-DSPHINX_EXECUTABLE_VERSION="
#$(package-version python-sphinx)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fixes
(lambda* (#:key inputs #:allow-other-keys)
;; Still bundled: part of gromacs, source behind registration
;; but free software anyways
;;(delete-file-recursively "src/external/vmd_molfile")
;; Still bundled: threads-based OpenMPI-compatible fallback
;; designed to be bundled like that
;;(delete-file-recursively "src/external/thread_mpi")
;; Unbundling
(delete-file-recursively "src/external/lmfit")
(delete-file-recursively "src/external/clFFT")
(delete-file-recursively "src/external/fftpack")
(delete-file-recursively "src/external/build-fftw")
(delete-file-recursively "src/external/tng_io")
(delete-file-recursively "src/external/tinyxml2")
(delete-file-recursively "src/external/googletest")
(copy-recursively #$(package-source googletest)
"src/external/googletest")
;; This test warns about the build host hardware, disable
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
"void __guix_disabled()"))
)))))
(inputs
(modify-inputs (package-inputs gromacs)
(append cuda
;hwloc
))))
)
(define-public gromacs+cuda-v1
(package
(inherit gromacs)
(name "gromacs+cuda-v1")
(arguments
(list #:configure-flags
#~(list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
;; Unbundling
"-DGMX_USE_LMFIT=EXTERNAL"
"-DGMX_BUILD_OWN_FFTW=off"
"-DGMX_EXTERNAL_BLAS=on"
"-DGMX_EXTERNAL_LAPACK=on"
"-DGMX_EXTERNAL_TNG=on"
"-DGMX_EXTERNAL_ZLIB=on"
"-DGMX_HWLOC=ON"
"-DGMX_GPU=CUDA"
(string-append "-DCUDA_TOOLKIT_ROOT_DIR=" #$(this-package-input "cuda-toolkit"))
"-DGMX_EXTERNAL_TINYXML2=on"
(string-append "-DTinyXML2_DIR="
#$(this-package-input "tinyxml2"))
;; Workaround for cmake/FindSphinx.cmake version parsing that does
;; not understand the guix-wrapped `sphinx-build --version' answer
(string-append "-DSPHINX_EXECUTABLE_VERSION="
#$(package-version python-sphinx)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fixes
(lambda* (#:key inputs #:allow-other-keys)
;; Still bundled: part of gromacs, source behind registration
;; but free software anyways
;;(delete-file-recursively "src/external/vmd_molfile")
;; Still bundled: threads-based OpenMPI-compatible fallback
;; designed to be bundled like that
;;(delete-file-recursively "src/external/thread_mpi")
;; Unbundling
(delete-file-recursively "src/external/lmfit")
(delete-file-recursively "src/external/clFFT")
(delete-file-recursively "src/external/fftpack")
(delete-file-recursively "src/external/build-fftw")
(delete-file-recursively "src/external/tng_io")
(delete-file-recursively "src/external/tinyxml2")
(delete-file-recursively "src/external/googletest")
(copy-recursively #$(package-source googletest)
"src/external/googletest")
;; This test warns about the build host hardware, disable
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
"void __guix_disabled()"))
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, NumaCacheSelfconsistency\\)")
"void __guix_disabledv2()")) ;; really not sure it's the best way…
)))))
(inputs
(modify-inputs (package-inputs gromacs)
(append cuda
hwloc ;; openmpi-glicid-waves openssh-sans-x ;; ssh is because openmpi use rsh and tests use it !
))))
)
(define-public gromacs+cuda-v1-zen3
(package
(inherit gromacs)
(name "gromacs+cuda-v1")
(arguments
(list #:configure-flags
#~(list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
;; Unbundling
"-DGMX_USE_LMFIT=EXTERNAL"
"-DGMX_BUILD_OWN_FFTW=off"
"-DGMX_EXTERNAL_BLAS=on"
"-DGMX_EXTERNAL_LAPACK=on"
"-DGMX_EXTERNAL_TNG=on"
"-DGMX_EXTERNAL_ZLIB=on"
"-DGMX_HWLOC=ON"
"-DGMX_GPU=CUDA"
"-DGMX_SIMD=AVX2_256"
(string-append "-DCUDA_TOOLKIT_ROOT_DIR=" #$(this-package-input "cuda-toolkit"))
"-DGMX_EXTERNAL_TINYXML2=on"
(string-append "-DTinyXML2_DIR="
#$(this-package-input "tinyxml2"))
;; Workaround for cmake/FindSphinx.cmake version parsing that does
;; not understand the guix-wrapped `sphinx-build --version' answer
(string-append "-DSPHINX_EXECUTABLE_VERSION="
#$(package-version python-sphinx)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fixes
(lambda* (#:key inputs #:allow-other-keys)
;; Still bundled: part of gromacs, source behind registration
;; but free software anyways
;;(delete-file-recursively "src/external/vmd_molfile")
;; Still bundled: threads-based OpenMPI-compatible fallback
;; designed to be bundled like that
;;(delete-file-recursively "src/external/thread_mpi")
;; Unbundling
(delete-file-recursively "src/external/lmfit")
(delete-file-recursively "src/external/clFFT")
(delete-file-recursively "src/external/fftpack")
(delete-file-recursively "src/external/build-fftw")
(delete-file-recursively "src/external/tng_io")
(delete-file-recursively "src/external/tinyxml2")
(delete-file-recursively "src/external/googletest")
(copy-recursively #$(package-source googletest)
"src/external/googletest")
;; This test warns about the build host hardware, disable
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
"void __guix_disabled()"))
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, NumaCacheSelfconsistency\\)")
"void __guix_disabledv2()")) ;; really not sure it's the best way…
)))))
(inputs
(modify-inputs (package-inputs gromacs)
(append cuda
hwloc ;; openmpi-glicid-waves openssh-sans-x ;; ssh is because openmpi use rsh and tests use it !
))))
)
(define-public gromacs+cuda-v2
(package
(inherit gromacs)
(name "gromacs+cuda-v2")
(arguments
(list #:configure-flags
#~(list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
;; Unbundling
"-DGMX_USE_LMFIT=EXTERNAL"
"-DGMX_BUILD_OWN_FFTW=off"
"-DGMX_EXTERNAL_BLAS=on"
"-DGMX_EXTERNAL_LAPACK=on"
"-DGMX_EXTERNAL_TNG=on"
"-DGMX_EXTERNAL_ZLIB=on"
"-DGMX_HWLOC=ON"
"-DGMX_MPI=ON"
"-DGMX_GPU=CUDA"
(string-append "-DCUDA_TOOLKIT_ROOT_DIR=" #$(this-package-input "cuda-toolkit"))
"-DGMX_EXTERNAL_TINYXML2=on"
(string-append "-DTinyXML2_DIR="
#$(this-package-input "tinyxml2"))
;; Workaround for cmake/FindSphinx.cmake version parsing that does
;; not understand the guix-wrapped `sphinx-build --version' answer
(string-append "-DSPHINX_EXECUTABLE_VERSION="
#$(package-version python-sphinx)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fixes
(lambda* (#:key inputs #:allow-other-keys)
;; Still bundled: part of gromacs, source behind registration
;; but free software anyways
;;(delete-file-recursively "src/external/vmd_molfile")
;; Still bundled: threads-based OpenMPI-compatible fallback
;; designed to be bundled like that
;;(delete-file-recursively "src/external/thread_mpi")
;; Unbundling
(delete-file-recursively "src/external/lmfit")
(delete-file-recursively "src/external/clFFT")
(delete-file-recursively "src/external/fftpack")
(delete-file-recursively "src/external/build-fftw")
(delete-file-recursively "src/external/tng_io")
(delete-file-recursively "src/external/tinyxml2")
(delete-file-recursively "src/external/googletest")
(copy-recursively #$(package-source googletest)
"src/external/googletest")
;; This test warns about the build host hardware, disable
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
"void __guix_disabled()"))
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, NumaCacheSelfconsistency\\)")
"void __guix_disabledv2()")) ;; really not sure it's the best way…
)))))
(inputs
(modify-inputs (package-inputs gromacs)
(append cuda
hwloc openmpi-glicid-waves openssh-sans-x ;; ssh is because openmpi use rsh and tests use it !
))))
)
(define-public gromacs-upstream-2205
(package
(inherit gromacs)
(name "gromacs-upstream")
(version "2022.5")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"08y233h7ajzjc63k7r8dabvckrmlwpim5y8jdklgz4xv4k2c6g08"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream+cuda-2205
(package
(inherit gromacs+cuda)
(version "2022.5")
(name "gromacs-upstream+cuda")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"08y233h7ajzjc63k7r8dabvckrmlwpim5y8jdklgz4xv4k2c6g08"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream+cuda-v2-2205
(package
(inherit gromacs+cuda-v2)
(version "2022.5")
(name "gromacs-upstream+cuda-v2")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"08y233h7ajzjc63k7r8dabvckrmlwpim5y8jdklgz4xv4k2c6g08"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream+cuda-v1-2205
(package
(inherit gromacs+cuda-v1)
(version "2022.5")
(name "gromacs-upstream+cuda-v1")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"08y233h7ajzjc63k7r8dabvckrmlwpim5y8jdklgz4xv4k2c6g08"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream-2300
(package
(inherit gromacs-upstream-2205)
(version "2023")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"1a3vgckygd6gllnyvaydq721gkvfwmwxka6q9x0wmg7vfbdcd4mc"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream+cuda-2300
(package
(inherit gromacs-upstream+cuda-2205)
(version "2023")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"1a3vgckygd6gllnyvaydq721gkvfwmwxka6q9x0wmg7vfbdcd4mc"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream+cuda-v1-2300
(package
(inherit gromacs-upstream+cuda-v1-2205)
(version "2023")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"1a3vgckygd6gllnyvaydq721gkvfwmwxka6q9x0wmg7vfbdcd4mc"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream+cuda-v2-2300
(package
(inherit gromacs-upstream+cuda-v2-2205)
(version "2023")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"1a3vgckygd6gllnyvaydq721gkvfwmwxka6q9x0wmg7vfbdcd4mc"))
;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch"))))
)
)
(define-public gromacs-upstream+cuda-v3-2300
(package
(inherit gromacs-upstream+cuda-v2-2300)
(name "gromacs-upstream+cuda-v3")
(arguments
(list #:configure-flags
#~(list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
;; Unbundling
"-DGMX_USE_LMFIT=EXTERNAL"
"-DGMX_BUILD_OWN_FFTW=off"
"-DGMX_EXTERNAL_BLAS=on"
"-DGMX_EXTERNAL_LAPACK=on"
"-DGMX_EXTERNAL_TNG=on"
"-DGMX_EXTERNAL_ZLIB=on"
"-DGMX_HWLOC=ON"
"-DGMX_MPI=ON"
"-DGMX_GPU=CUDA"
(string-append "-DCUDA_TOOLKIT_ROOT_DIR=" #$(this-package-input "cuda-toolkit"))
"-DGMX_EXTERNAL_TINYXML2=on"
(string-append "-DTinyXML2_DIR="
#$(this-package-input "tinyxml2"))
"-DGMX_USE_CUFFTMP=on"
(string-append "-DcuFFTMp_ROOT=" #$(this-package-input "cuda-toolkit"))
;; Workaround for cmake/FindSphinx.cmake version parsing that does
;; not understand the guix-wrapped `sphinx-build --version' answer
(string-append "-DSPHINX_EXECUTABLE_VERSION="
#$(package-version python-sphinx)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fixes
(lambda* (#:key inputs #:allow-other-keys)
;; Still bundled: part of gromacs, source behind registration
;; but free software anyways
;;(delete-file-recursively "src/external/vmd_molfile")
;; Still bundled: threads-based OpenMPI-compatible fallback
;; designed to be bundled like that
;;(delete-file-recursively "src/external/thread_mpi")
;; Unbundling
(delete-file-recursively "src/external/lmfit")
(delete-file-recursively "src/external/clFFT")
(delete-file-recursively "src/external/fftpack")
(delete-file-recursively "src/external/build-fftw")
(delete-file-recursively "src/external/tng_io")
(delete-file-recursively "src/external/tinyxml2")
(delete-file-recursively "src/external/googletest")
(copy-recursively #$(package-source googletest)
"src/external/googletest")
;; This test warns about the build host hardware, disable
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
"void __guix_disabled()"))
(substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
(("TEST\\(HardwareTopologyTest, NumaCacheSelfconsistency\\)")
"void __guix_disabledv2()")) ;; really not sure it's the best way…
)))))
(inputs
(modify-inputs (package-inputs gromacs)
(append cuda
hwloc openmpi-glicid-waves openssh-sans-x ;; ssh is because openmpi use rsh and tests use it !
)))))
(define-public gromacs-upstream gromacs-upstream-2300)
(define-public gromacs-upstream+cuda gromacs-upstream+cuda-2300)
(define-public gromacs-upstream+cuda-v2 gromacs-upstream+cuda-v2-2300)
gromacs-upstream+cuda-v3-2300