guix/gnu/packages/chemistry.scm

1225 lines
50 KiB
Scheme
Raw Normal View History

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2018, 2021 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2022, 2023, 2024 David Elsing <david.elsing@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages chemistry)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages c)
#:use-module (gnu packages cpp)
#:use-module (gnu packages documentation)
#:use-module (gnu packages flex)
#:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages gv)
#:use-module (gnu packages image)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
gnu: Separate Python core packages from the rest. * gnu/packages/python.scm: Move hundreds of package definitions from here... * gnu/packages/python-xyz.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/benchmark.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/cluster.scm, gnu/packages/compression.scm, gnu/packages/connman.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dav.scm, gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/finance.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/freedesktop.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/gtk.scm, gnu/packages/ham-radio.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/kde-frameworks.scm, gnu/packages/key-mon.scm, gnu/packages/libffi.scm, gnu/packages/libreoffice.scm, gnu/packages/libusb.scm, gnu/packages/lirc.scm, gnu/packages/logging.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/medical.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nutrition.scm, gnu/packages/openldap.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/polkit.scm, gnu/packages/protobuf.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/qt.scm, gnu/packages/rdf.scm, gnu/packages/ruby.scm, gnu/packages/search.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/simulation.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/storage.scm, gnu/packages/sync.scm, gnu/packages/terminals.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/virtualization.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wicd.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: Update module references.
2019-01-15 08:21:30 -05:00
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages stb)
#:use-module (gnu packages tex)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python))
(define-public avogadrolibs
(package
(name "avogadrolibs")
(version "1.93.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/OpenChemistry/avogadrolibs")
(commit version)))
(sha256
(base32 "1xivga626n5acnmwmym8svl0pdri8hkp59czf04ri2zflnviyh39"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(native-inputs
(list eigen
mmtf-cpp
googletest
pkg-config
pybind11))
(inputs
(list glew
libarchive
libmsym
molequeue
python
spglib
qtbase-5))
(arguments
'(#:configure-flags (list "-DENABLE_TESTING=ON"
(string-append "-DSPGLIB_INCLUDE_DIR="
(assoc-ref %build-inputs "spglib")
"/include"))))
(home-page "https://www.openchemistry.org/projects/avogadro2/")
(synopsis "Libraries for chemistry, bioinformatics, and related areas")
(description
"Avogadro libraries provide 3D rendering, visualization, analysis and data
processing useful in computational chemistry, molecular modeling,
bioinformatics, materials science, and related areas.")
(license license:bsd-3)))
(define-public avogadro2
(package
(name "avogadro2")
(version "1.93.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/OpenChemistry/avogadroapp")
(commit version)))
(sha256
(base32
"1z3pjlwja778a1dmvx9aqz2hlw5q9g3kqxhm9slz08452600jsv7"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(native-inputs
(list eigen pkg-config))
(inputs
(list avogadrolibs hdf5 molequeue qtbase-5))
;; TODO: Enable tests with "-DENABLE_TESTING" configure flag.
(arguments
'(#:tests? #f))
(home-page "https://www.openchemistry.org/projects/avogadro2/")
(synopsis "Advanced molecule editor")
(description
"Avogadro 2 is an advanced molecule editor and visualizer designed for use
in computational chemistry, molecular modeling, bioinformatics, materials
science, and related areas. It offers flexible high quality rendering and a
powerful plugin architecture.")
(license license:bsd-3)))
(define-public inchi
(package
(name "inchi")
;; Update the inchi-doc native input when updating inchi.
(version "1.06")
(source (origin
(method url-fetch)
(uri (string-append "https://www.inchi-trust.org/download/"
(string-join (string-split version #\.) "")
"/INCHI-1-SRC.zip"))
(sha256
(base32
"1zbygqn0443p0gxwr4kx3m1bkqaj8x9hrpch3s41py7jq08f6x28"))
(file-name (string-append name "-" version ".zip"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; no check target
#:phases
(modify-phases %standard-phases
(delete 'configure) ; no configure script
(add-before 'build 'chdir-to-build-directory
(lambda _ (chdir "INCHI_EXE/inchi-1/gcc") #t))
(add-after 'build 'build-library
(lambda _
(chdir "../../../INCHI_API/libinchi/gcc")
(invoke "make")))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(doc (string-append out "/share/doc/inchi"))
(include-dir (string-append out "/include/inchi"))
(lib (string-append out "/lib/inchi"))
(inchi-doc (assoc-ref inputs "inchi-doc"))
gnu: Use 'search-input-file' when looking for executables. * gnu/packages/admin.scm (isc-dhcp): Use 'search-input-file' when looking for executables. * gnu/packages/audio.scm (ableton-link): Likewise. * gnu/packages/benchmark.scm (fio): Likewise. * gnu/packages/bioinformatics.scm (roary): Likewise. (ngless): Likewise. * gnu/packages/boost.scm (boost-for-irods): Likewise. * gnu/packages/bootloaders.scm (grub): Likewise. (grub-efi): Likewise. * gnu/packages/chemistry.scm (inchi): Likewise. * gnu/packages/dictionaries.scm (ding): Likewise. * gnu/packages/dlang.scm (ldc): Likewise. * gnu/packages/education.scm (childsplay): Likewise. * gnu/packages/emacs-xyz.scm (emacs-hyperbole): Likewise. (emacs-haskell-mode): Likewise. (emacs-auctex): Likewise. (emacs-ggtags): Likewise. (emacs-graphviz-dot-mode): Likewise. (emacs-flycheck-grammalecte): Likewise. (emacs-counsel-notmuch): Likewise. (emacspeak): Likewise. (emacs-exwm): Likewise. (emacs-exwm-x): Likewise. (emacs-treemacs): Likewise. (emacs-telega): Likewise. (emacs-exiftool): Likewise. * gnu/packages/emulators.scm (higan): Likewise. * gnu/packages/engineering.scm (freehdl): Likewise. (librepcb): Likewise. * gnu/packages/entr.scm (entr): Likewise. * gnu/packages/file-systems.scm (libeatmydata): Likewise. (xfstests): Likewise. (mergerfs): Likewise. (mergerfs-tools): Likewise. * gnu/packages/finance.scm (monero-gui): Likewise. * gnu/packages/flashing-tools.scm (flashrom): Likewise. * gnu/packages/fontutils.scm (fontforge): Likewise. * gnu/packages/game-development.scm (python2-renpy): Likewise. * gnu/packages/games.scm (opensurge): Likewise. (xboard): Likewise. (hyperrogue): Likewise. (flare-game): Likewise. (chessx): Likewise. * gnu/packages/geo.scm (grass): Likewise. * gnu/packages/glib.scm (glib): Likewise. * gnu/packages/gnome.scm (mm-common): Likewise. (network-manager-openvpn): Likewise. (network-manager-vpnc): Likewise. (network-manager-openconnect): Likewise. (apostrophe): Likewise. * gnu/packages/gnupg.scm (pius): Likewise. (jetring): Likewise. * gnu/packages/gnuzilla.scm (icedove): Likewise. * gnu/packages/golang.scm (go-1.4): Likewise. * gnu/packages/graphviz.scm (xdot): Likewise. * gnu/packages/guile-xyz.scm (jupyter-guile-kernel): Likewise. * gnu/packages/haskell-xyz.scm (ghc-hindent): Likewise. * gnu/packages/ibus.scm (ibus): Likewise. * gnu/packages/image.scm (phockup): Likewise. * gnu/packages/irc.scm (quassel): Likewise. * gnu/packages/java.scm (drip): Likewise. (ant-bootstrap): Likewise. (tla2tools): Likewise. * gnu/packages/julia.scm (julia): Likewise. * gnu/packages/less.scm (lesspipe): Likewise. * gnu/packages/libreoffice.scm (libreoffice): Likewise. * gnu/packages/linux.scm (fuse): Likewise. (lm-sensors): Likewise. (bluez): Likewise. (fakeroot): Likewise. (inputattach): Likewise. * gnu/packages/lisp-xyz.scm (sbcl-cl-diskspace): Likewise. * gnu/packages/lisp.scm (lisp-repl-core-dumper): Likewise. * gnu/packages/lua.scm (fennel): Likewise. * gnu/packages/lxde.scm (spacefm): Likewise. * gnu/packages/mail.scm (public-inbox): Likewise. * gnu/packages/maths.scm (hdf-java): Likewise. (maxima): Likewise. (frama-c): Likewise. * gnu/packages/messaging.scm (libgadu): Likewise. * gnu/packages/music.scm (denemo): Likewise. (curseradio): Likewise. * gnu/packages/netpbm.scm (netpbm): Likewise. * gnu/packages/networking.scm (blueman): Likewise. (squid): Likewise. (aircrack-ng): Likewise. * gnu/packages/node.scm (node): Likewise. (node-llparse-frontend-bootstrap): Likewise. (node-llparse-bootstrap): Likewise. (llhttp-bootstrap): Likewise. (node-lts): Likewise. * gnu/packages/ocaml.scm (ocaml-4.11): Likewise. (opam): Likewise. (ocaml-graph): Likewise. * gnu/packages/orpheus.scm (orpheus): Likewise. * gnu/packages/password-utils.scm (password-store): Likewise. * gnu/packages/python.scm (pypy3): Likewise. * gnu/packages/qt.scm (qt5ct): Likewise. * gnu/packages/radio.scm (libosmo-dsp): Likewise. * gnu/packages/ruby.scm (ruby-pandoc-ruby): Likewise. * gnu/packages/rust.scm (rust-1.30): Likewise. * gnu/packages/screen.scm (byobu): Likewise. * gnu/packages/statistics.scm (r-with-tests): Likewise. * gnu/packages/suckless.scm (surf): Likewise. * gnu/packages/syndication.scm (gfeeds): Likewise. * gnu/packages/telephony.scm (mumble): Likewise. * gnu/packages/terminals.scm (alacritty): Likewise. * gnu/packages/tex.scm (texlive-bin): Likewise. * gnu/packages/uml.scm (plantuml): Likewise. * gnu/packages/version-control.scm (python-git-multimail): Likewise. (gitolite): Likewise. (hg-commitsigs): Likewise. (git-when-merged): Likewise. (git-imerge): Likewise. (gita): Likewise. * gnu/packages/video.scm (you-get): Likewise. * gnu/packages/vim.scm (eovim): Likewise. * gnu/packages/virtualization.scm (qemu): Likewise. (virt-manager): Likewise. (criu): Likewise. * gnu/packages/vpn.scm (strongswan): Likewise. (xl2tpd): Likewise. * gnu/packages/wm.scm (i3lock-fancy): Likewise. * gnu/packages/wxwidgets.scm (python-wxpython): Likewise. (python2-wxpython): Likewise. * gnu/packages/xdisorg.scm (autorandr): Likewise. * gnu/packages/xorg.scm (hackneyed-x11-cursors): Likewise. (v86d): Likewise. (mkfontdir): Likewise. (xpra): Likewise.
2021-07-16 10:50:56 -04:00
(unzip (search-input-file inputs "/bin/unzip")))
(chdir "../../..")
;; Install binary.
(with-directory-excursion "INCHI_EXE/bin/Linux"
(rename-file "inchi-1" "inchi")
(install-file "inchi" bin))
;; Install libraries.
(with-directory-excursion "INCHI_API/bin/Linux"
(for-each (lambda (file)
(install-file file lib))
(find-files "." "libinchi\\.so\\.1\\.*")))
;; Install header files.
(with-directory-excursion "INCHI_BASE/src"
(for-each (lambda (file)
(install-file file include-dir))
(find-files "." "\\.h$")))
;; Install documentation.
(mkdir-p doc)
(invoke unzip "-j" "-d" doc inchi-doc)
#t))))))
(native-inputs
`(("unzip" ,unzip)
("inchi-doc"
,(origin
(method url-fetch)
(uri (string-append "http://www.inchi-trust.org/download/"
(string-join (string-split version #\.) "")
"/INCHI-1-DOC.zip"))
(sha256
(base32
"1kyda09i9p89xfq90ninwi7w13k1w3ljpl4gqdhpfhi5g8fgxx7f"))
(file-name (string-append name "-" version ".zip"))))))
(home-page "https://www.inchi-trust.org")
(synopsis "Utility for manipulating machine-readable chemical structures")
(description
"The @dfn{InChI} (IUPAC International Chemical Identifier) algorithm turns
chemical structures into machine-readable strings of information. InChIs are
unique to the compound they describe and can encode absolute stereochemistry
making chemicals and chemistry machine-readable and discoverable. A simple
analogy is that InChI is the bar-code for chemistry and chemical structures.")
(license (license:non-copyleft
"file://LICENCE"
"See LICENCE in the distribution."))))
(define-public libmsym
(package
(name "libmsym")
(version "0.2.3")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/mcodev31/libmsym")
(commit (string-append "v" version))))
(sha256
(base32
"0a9j28irdsr461qpzlc9z1yjyb9kp64fh5zw7ylspc9zn3189qwk"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
#:tests? #f)) ; no check target
(home-page "https://github.com/mcodev31/libmsym")
(synopsis "C library dealing with point group symmetry in molecules")
(description "libmsym is a C library dealing with point group symmetry in
molecules.")
(license license:expat)))
(define-public mmtf-cpp
(package
(name "mmtf-cpp")
(version "1.1.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rcsb/mmtf-cpp")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0rs2f1ppgqz663c3m22p8wsq6z839bj59zy29chci46ypfhwv6ph"))))
(build-system cmake-build-system)
;; Tests require the soon-to-be-deprecated version 1 of the catch-framework.
(arguments '(#:tests? #f))
;; There is no support for modern msgpack versions yet (see:
;; https://github.com/rcsb/mmtf-cpp/issues/44).
(propagated-inputs (list msgpack-3)) ;included by mmtf/structure_data.hpp
(home-page "https://mmtf.rcsb.org/")
(synopsis "C++ API for the Macromolecular Transmission Format")
(description "This package is a library for the
@acronym{MMTF,macromolecular transmission format}, a binary encoding of
biological structures.")
(license license:expat)))
(define-public molequeue
(package
(name "molequeue")
(version "0.9.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/OpenChemistry/molequeue/"
"releases/download/" version "/molequeue-"
version ".tar.bz2"))
(sha256
(base32
"1w1fgxzqrb5yxvpmnc3c9ymnvixy0z1nfafkd9whg9zw8nbgl998"))))
(build-system cmake-build-system)
(inputs
(list qtbase-5))
(arguments
'(#:configure-flags '("-DENABLE_TESTING=ON")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-tests
(lambda _
;; TODO: Fix/enable the failing message and clientserver tests.
;; In the message test, the floating-point value "5.36893473232" on
;; line 165 of molequeue/app/testing/messagetest.cpp should
;; (apparently) be truncated, but it is not.
(substitute* "molequeue/app/testing/messagetest.cpp"
(("5\\.36893473232") "5.36893"))
;; It is unclear why the clientserver test fails, so it is
;; completely disabled.
(substitute* "molequeue/app/testing/CMakeLists.txt"
((".*clientserver.*") ""))
#t))
(add-before 'check 'set-display
(lambda _
;; Make Qt render "offscreen" for the sake of tests.
(setenv "QT_QPA_PLATFORM" "offscreen")
#t)))))
(home-page "https://www.openchemistry.org/projects/molequeue/")
(synopsis "Application for coordinating computational jobs")
(description "MoleQueue is a system-tray resident desktop application for
abstracting, managing, and coordinating the execution of tasks both locally and
on remote computational resources. Users can set up local and remote queues
that describe where the task will be executed. Each queue can have programs,
with templates to facilitate the execution of the program. Input files can be
staged, and output files collected using a standard interface.")
(license license:bsd-3)))
(define-public tng
(package
(name "tng")
(version "1.8.2")
(source (origin
(method git-fetch)
(uri (git-reference
gnu: Remove ".git" from "https://github/…/….git". Until now, 'lookup-origin' and thus 'lookup-origin-revision' in (guix swh) would sometimes return #f for these because the ".git" URLs are redirects to the non-".git" URLs. Consequently, 'guix lint -c archival' would keep saying "scheduled Software Heritage archival"; likewise, the fallback download code would fail. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm, gnu/packages/android.scm, gnu/packages/animation.scm, gnu/packages/arcan.scm, gnu/packages/assembly.scm, gnu/packages/audio.scm, gnu/packages/authentication.scm, gnu/packages/avr.scm, gnu/packages/axoloti.scm, gnu/packages/backup.scm, gnu/packages/bash.scm, gnu/packages/benchmark.scm, gnu/packages/bioconductor.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/boost.scm, gnu/packages/build-tools.scm, gnu/packages/c.scm, gnu/packages/calendar.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/chez.scm, gnu/packages/clojure.scm, gnu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/compton.scm, gnu/packages/coq.scm, gnu/packages/cpp.scm, gnu/packages/cran.scm, gnu/packages/crypto.scm, gnu/packages/curl.scm, gnu/packages/databases.scm, gnu/packages/datastructures.scm, gnu/packages/debug.scm, gnu/packages/disk.scm, gnu/packages/distributed.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/dns.scm, gnu/packages/docker.scm, gnu/packages/education.scm, gnu/packages/efi.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/embedded.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/erlang.scm, gnu/packages/fabric-management.scm, gnu/packages/file-systems.scm, gnu/packages/finance.scm, gnu/packages/firmware.scm, gnu/packages/flashing-tools.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/fpga.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/genealogy.scm, gnu/packages/genimage.scm, gnu/packages/geo.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/gnome-xyz.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/golang.scm, gnu/packages/gpodder.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/groff.scm, gnu/packages/groovy.scm, gnu/packages/gtk.scm, gnu/packages/guile-xyz.scm, gnu/packages/guile.scm, gnu/packages/hardware.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-xyz.scm, gnu/packages/hexedit.scm, gnu/packages/i2p.scm, gnu/packages/ibus.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/ipfs.scm, gnu/packages/java-graphics.scm, gnu/packages/java-maths.scm, gnu/packages/java.scm, gnu/packages/javascript.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/jupyter.scm, gnu/packages/kodi.scm, gnu/packages/language.scm, gnu/packages/lego.scm, gnu/packages/less.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lirc.scm, gnu/packages/lisp-xyz.scm, gnu/packages/llvm.scm, gnu/packages/logging.scm, gnu/packages/lolcode.scm, gnu/packages/lua.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/maths.scm, gnu/packages/maven.scm, gnu/packages/mes.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/node-xyz.scm, gnu/packages/ocaml.scm, gnu/packages/ocr.scm, gnu/packages/onc-rpc.scm, gnu/packages/opencl.scm, gnu/packages/opencog.scm, gnu/packages/pantheon.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/perl6.scm, gnu/packages/phabricator.scm, gnu/packages/popt.scm, gnu/packages/printers.scm, gnu/packages/prolog.scm, gnu/packages/protobuf.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/qt.scm, gnu/packages/radio.scm, gnu/packages/rails.scm, gnu/packages/rdf.scm, gnu/packages/rednotebook.scm, gnu/packages/rpc.scm, gnu/packages/rsync.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/screen.scm, gnu/packages/security-token.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/shellutils.scm, gnu/packages/simh.scm, gnu/packages/sml.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/stenography.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/synergy.scm, gnu/packages/telephony.scm, gnu/packages/terminals.scm, gnu/packages/tex.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tmux.scm, gnu/packages/tor.scm, gnu/packages/toys.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/virtualization.scm, gnu/packages/vlang.scm, gnu/packages/vnc.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wireservice.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, tests/lint.scm: Remove trailing ".git" from 'git-reference' URL.
2020-07-12 16:53:28 -04:00
(url "https://github.com/gromacs/tng")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1apf2n8nb34z09xarj7k4jgriq283l769sakjmj5aalpbilvai4q"))))
(build-system cmake-build-system)
(inputs
(list zlib))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'remove-bundled-zlib
(lambda _
(delete-file-recursively "external")
#t))
(replace 'check
(lambda _
(invoke "../build/bin/tests/tng_testing")
#t)))))
(home-page "https://github.com/gromacs/tng")
(synopsis "Trajectory Next Generation binary format manipulation library")
(description "TRAJNG (Trajectory next generation) is a program library for
handling molecular dynamics (MD) trajectories. It can store coordinates, and
optionally velocities and the H-matrix. Coordinates and velocities are
stored with user-specified precision.")
(license license:bsd-3)))
(define-public gromacs
(package
(name "gromacs")
(version "2022.4")
(source (origin
(method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz"))
(sha256
(base32
"15vjwasxjq0h18dmzacjkdim51zrvr0ni42hbc30557j5xhbw4f5"))
;; 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"))))
(build-system cmake-build-system)
(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_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()")))))))
(native-inputs
(list doxygen
graphviz
pkg-config
python
python-pygments
python-sphinx))
(inputs
(list fftwf
`(,hwloc-2 "lib")
lmfit
openblas
perl
tinyxml2
tng))
gnu: Use HTTPS package home pages wherever possible. * gnu/packages/accessibility.scm (florence)[home-page]: Use HTTPS. * gnu/packages/admin.scm (netcat, nmon)[home-page]: Likewise. * gnu/packages/algebra.scm (mpfrcx, cm, flint, fftw, r-dtt)[home-page]: Likewise. * gnu/packages/apr.scm (apr, apr-util)[home-page]: Likewise. * gnu/packages/aspell.scm (aspell-dict-it)[home-page]: Likewise. * gnu/packages/astronomy.scm (casacore, sextractor, libnova) (xplanet)[home-page]: Likewise. * gnu/packages/audio.scm (libtimidity, alsa-modular-synth, azr3, tao) (freepats, rakarrack, liblo, libshout-idjc, timidity++, libsbsms) (libmodplug, libxmp, xmp, sox, drc, gsm, gnaural) (streamripper)[home-page]: Likewise. * gnu/packages/authentication.scm (pamtester)[home-page]: Likewise. * gnu/packages/backup.scm (grsync)[home-page]: Likewise. * gnu/packages/bioconductor.scm (r-nmf, r-edger, r-limma) (r-plgem)[home-page]: Likewise. * gnu/packages/bioinformatics.scm (python-biom-format, bowtie, bowtie1) (bwa, crossmap, java-htsjdk, java-htsjdk-latest, java-picard) (java-picard-2.10.3, kaiju, proteinortho, rsem, rseqc, seek, samtools) (snap-aligner, subread, stringtie, r-centipede, prinseq, emboss, phylip) (libsbml)[home-page]: Likewise. * gnu/packages/build-tools.scm (tup)[home-page]: Likewise. * gnu/packages/cdrom.scm (libcddb, cdrdao, cdrtools) (cd-discid)[home-page]: Likewise. * gnu/packages/check.scm (cunit, python-nose) (python-pyhamcrest)[home-page]: Likewise. * gnu/packages/chemistry.scm (gromacs)[home-page]: Likewise. * gnu/packages/chez.scm (chez-fmt)[home-page]: Likewise. * gnu/packages/code.scm (lcov, uncrustify, cscope)[home-page]: Likewise. * gnu/packages/compression.scm (p7zip)[home-page]: Likewise. * gnu/packages/cran.scm (r-emdist, r-proj4, r-zoo, r-ggalluvial) (r-orgmassspecr, r-polychrome, r-partykit, r-rcpp, r-ff, r-emdbook) (r-fitdistrplus, r-linprog, r-geometry, r-dtw, r-fst, r-rjags) (r-intergraph, r-qualv, r-labelled, r-survey, r-coin, r-fmsb, r-tm) (r-corpcor, r-rmpfr, r-spatialextremes, r-longitudinal, r-genenet) (r-bayesm, r-seqinr, r-mpm, r-text2vec, r-rgdal, r-seewave, r-hdrcde) (r-shapes, r-anytime, r-stm, r-d3network, r-tam, r-directlabels) (r-spatstat-utils, r-spatstat-sparse, r-spatstat-data, r-spatstat-geom) (r-spatstat-core, r-spatstat-linnet, r-spatstat-random, r-spatstat) (r-rcpptoml, r-mlecens, r-seurat, r-mlearning, r-zooimage)[home-page]: Likewise. * gnu/packages/crates-io.scm (rust-nickel-0.11, rust-thrift-0.13) (rust-trust-dns-https-0.20, rust-trust-dns-native-tls-0.20) (rust-trust-dns-openssl-0.20, rust-trust-dns-proto-0.20) (rust-trust-dns-resolver-0.20, rust-trust-dns-rustls-0.20) (rust-uint-0.9, rust-yaml-rust-0.4)[home-page]: Likewise. * gnu/packages/crypto.scm (libdecaf, ccrypt)[home-page]: Likewise. * gnu/packages/curl.scm (curlpp)[home-page]: Likewise. * gnu/packages/databases.scm (python-pylibmc, unixodbc, wiredtiger) (libpqxx, mdbtools, virtuoso-ose, libdbi, libdbi-drivers) (soci)[home-page]: Likewise. * gnu/packages/debian.scm (apt-mirror)[home-page]: Likewise. * gnu/packages/debug.scm (remake)[home-page]: Likewise. * gnu/packages/disk.scm (sdparm, idle3-tools, duc)[home-page]: Likewise. * gnu/packages/django.scm (python-django-haystack)[home-page]: Likewise. * gnu/packages/djvu.scm (djvulibre, djview)[home-page]: Likewise. * gnu/packages/dns.scm (dnsmasq)[home-page]: Likewise. * gnu/packages/docbook.scm (dblatex, docbook2x)[home-page]: Likewise. * gnu/packages/documentation.scm (scrollkeeper)[home-page]: Likewise. * gnu/packages/ebook.scm (liblinebreak)[home-page]: Likewise. * gnu/packages/electronics.scm (xoscope)[home-page]: Likewise. * gnu/packages/emacs-xyz.scm (emacs-bbdb, emacs-caps-lock, emacs-djvu) (emacs-pabbrev, emacs-twittering-mode, emacs-filladapt, emacs-rudel) (emacs-stream, emacspeak, emacs-cc-mode, emacs-eldoc, emacs-jsonrpc) (emacs-gtk-look, emacs-xclip, emacs-slime-volleyball, emacs-minimap) (emacs-auto-dictionary-mode, emacs-persist, emacs-shell-command+) (emacs-map, emacs-xref, emacs-dictionary)[home-page]: Likewise. * gnu/packages/embedded.scm (sdcc)[home-page]: Likewise. * gnu/packages/engineering.scm (asco, libngspice, libspnav) (openctm)[home-page]: Likewise. * gnu/packages/erlang.scm (erlang-erlware-commons)[home-page]: Likewise. * gnu/packages/file-systems.scm (jfsutils, curlftpfs)[home-page]: Likewise. * gnu/packages/finance.scm (gbonds)[home-page]: Likewise. * gnu/packages/flashing-tools.scm (dfu-util, srecord)[home-page]: Likewise. * gnu/packages/fltk.scm (ntk)[home-page]: Likewise. * gnu/packages/fonts.scm (font-terminus, font-tex-gyre) (font-comic-neue)[home-page]: Likewise. * gnu/packages/fontutils.scm (ttf2pt1, potrace, libspiro)[home-page]: Likewise. * gnu/packages/fpga.scm (icestorm, gtkwave, gtkwave) (python-myhdl)[home-page]: Likewise. * gnu/packages/freedesktop.scm (libatasmart)[home-page]: Likewise. * gnu/packages/ftp.scm (weex)[home-page]: Likewise. * gnu/packages/game-development.scm (dds, python-tmx, sfxr, quesoglc) (eureka, plib)[home-page]: Likewise. * gnu/packages/games.scm (abe, alex4, armagetronad, barony) (foobillard++, golly, ltris, pipewalker, prboom-plus, trigger-rally) (cmatrix, pinball, pioneers, tennix, chromium-bsu, freeciv, kiki) (quakespasm, frotz, frotz-dumb-terminal, frotz-sdl, btanks) (flare-engine, chessx, barrage, cgoban, passage)[home-page]: Likewise. * gnu/packages/geo.scm (python-geopandas, saga)[home-page]: Likewise. * gnu/packages/gl.scm (freeglut, gl2ps)[home-page]: Likewise. * gnu/packages/gnome.scm (cogl, clutter-gtk, clutter-gst, bluefish) (workrave)[home-page]: Likewise. * gnu/packages/gnustep.scm (wmnd, wmfire, wmfire)[home-page]: Likewise. * gnu/packages/graph.scm (mscgen)[home-page]: Likewise. * gnu/packages/graphics.scm (assimp, alembic, ctl, agg) (opencsg)[home-page]: Likewise. * gnu/packages/graphviz.scm (gts)[home-page]: Likewise. * gnu/packages/gtk.scm (gtkspell3)[home-page]: Likewise. * gnu/packages/guile-xyz.scm (guile-irregex)[home-page]: Likewise. * gnu/packages/haskell-apps.scm (cpphs)[home-page]: Likewise. * gnu/packages/haskell-check.scm (ghc-hunit)[home-page]: Likewise. * gnu/packages/haskell-web.scm (ghc-http-client-restricted) (ghc-blaze-html, ghc-happstack-server, ghc-sourcemap)[home-page]: Likewise. * gnu/packages/haskell-xyz.scm (ghc-assoc, ghc-cairo, ghc-cborg) (ghc-csv, ghc-glob, ghc-gtk2hs-buildtools, ghc-hmatrix-gsl-stats) (ghc-intervalmap, ghc-lens-family-core, ghc-managed, ghc-mountpoints) (ghc-network-multicast, ghc-optional-args, ghc-regex, ghc-spoon) (ghc-transformers, ghc-turtle, ghc-utf8-light, ghc-wizards) (ghc-template-haskell, ghc-boot-th, ghc-binary-orphans) (ghc-postgresql-simple)[home-page]: Likewise. * gnu/packages/hexedit.scm (ht, bvi)[home-page]: Likewise. * gnu/packages/hunspell.scm (hunspell-dict-hu)[home-page]: Likewise. * gnu/packages/image-processing.scm (mia)[home-page]: Likewise. * gnu/packages/image-viewers.scm (geeqie, gpicview, luminance-hdr) (qiv)[home-page]: Likewise. * gnu/packages/image.scm (libuemf, devil, steghide, optipng, niftilib) (sng, mtpaint)[home-page]: Likewise. * gnu/packages/java-xml.scm (java-simple-xml, java-jaxp) (java-apache-xml-commons-resolver)[home-page]: Likewise. * gnu/packages/java.scm (java-cisd-base, java-cisd-args4j) (java-hamcrest-core, java-jsr305, java-eclipse-osgi) (java-eclipse-equinox-common, java-eclipse-core-jobs) (java-eclipse-equinox-registry, java-eclipse-equinox-app) (java-eclipse-equinox-preferences, java-eclipse-core-contenttype) (java-eclipse-text, java-treelayout, java-aopalliance, java-jeromq) (java-cdi-api)[home-page]: Likewise. * gnu/packages/jemalloc.scm (jemalloc-4.5.0)[home-page]: Likewise. * gnu/packages/julia-xyz.scm (julia-recipespipeline)[home-page]: Likewise. * gnu/packages/kde-internet.scm (kget)[home-page]: Likewise. * gnu/packages/kde-systemtools.scm (dolphin-plugins) (konsole)[home-page]: Likewise. * gnu/packages/kodi.scm (fstrcmp)[home-page]: Likewise. * gnu/packages/language.scm (hime, libchewing)[home-page]: Likewise. * gnu/packages/lego.scm (nqc)[home-page]: Likewise. * gnu/packages/lesstif.scm (lesstif)[home-page]: Likewise. * gnu/packages/libcanberra.scm (libcanberra)[home-page]: Likewise. * gnu/packages/libdaemon.scm (libdaemon)[home-page]: Likewise. * gnu/packages/libffi.scm (libffi)[home-page]: Likewise. * gnu/packages/libreoffice.scm (libwpd, libwpg, libwps)[home-page]: Likewise. * gnu/packages/libusb.scm (libmtp, gmtp)[home-page]: Likewise. * gnu/packages/linux.scm (e2fsprogs, extundelete, lsscsi, net-tools) (kbd, sysfsutils, cpuid, libpfm4)[home-page]: Likewise. * gnu/packages/lisp-check.scm (sbcl-ptester, sbcl-xlunit)[home-page]: Likewise. * gnu/packages/lisp-xyz.scm (sbcl-html-encode, sbcl-py-configparser) (sbcl-cl-utilities, sbcl-series, sbcl-uffi, sbcl-clsql, sbcl-sycamore) (sbcl-osicat, sbcl-hu.dwim.common, sbcl-caveman, sbcl-trivial-shell) (sbcl-trivial-benchmark, sbcl-screamer, sbcl-smug)[home-page]: Likewise. * gnu/packages/lisp.scm (lush2)[home-page]: Likewise. * gnu/packages/logging.scm (log4cpp)[home-page]: Likewise. * gnu/packages/lua.scm (lua-ldoc)[home-page]: Likewise. * gnu/packages/machine-learning.scm (mcl, openfst, rxcpp)[home-page]: Likewise. * gnu/packages/mail.scm (muchsync, procmail, sendmail) (opensmtpd-filter-dkimsign, crm114)[home-page]: Likewise. * gnu/packages/man.scm (libpipeline, man-db)[home-page]: Likewise. * gnu/packages/maths.scm (lapack, scalapack, hdf-eos5, itpp, gmsh) (metamath, p4est, armadillo, suitesparse, atlas, lpsolve, wcalc, why3) (frama-c)[home-page]: Likewise. * gnu/packages/mcrypt.scm (mcrypt, libmcrypt, libmhash)[home-page]: Likewise. * gnu/packages/minetest.scm (minetest-advtrains)[home-page]: Likewise. * gnu/packages/monitoring.scm (python-whisper, python-carbon) (hostscope)[home-page]: Likewise. * gnu/packages/mp3.scm (id3lib, libmp3splt, mp3splt, mpg321) (lame)[home-page]: Likewise. * gnu/packages/multiprecision.scm (mpc)[home-page]: Likewise. * gnu/packages/music.scm (aria-maestosa, lingot, setbfree, bristol) (portmidi, python-pyportmidi, zynaddsubfx, yoshimi, aj-snapshot) (schismtracker, midicsv, midicsv, qmidiarp, qmidiroute, dssi, tap-lv2) (shiru-lv2)[home-page]: Likewise. * gnu/packages/ncurses.scm (stfl)[home-page]: Likewise. * gnu/packages/networking.scm (lksctp-tools, mbuffer, ifstatus, bird) (tunctl, traceroute)[home-page]: Likewise. * gnu/packages/node-xyz.scm (node-mersenne)[home-page]: Likewise. * gnu/packages/ntp.scm (openntpd)[home-page]: Likewise. * gnu/packages/ocaml.scm (opam, hevea, ocaml-menhir, ocaml-piqilib) (ocaml-graph, cubicle)[home-page]: Likewise. * gnu/packages/opencl.scm (python-pyopencl)[home-page]: Likewise. * gnu/packages/package-management.scm (xstow, modules)[home-page]: Likewise. * gnu/packages/parallel.scm (xjobs)[home-page]: Likewise. * gnu/packages/pdf.scm (podofo, qpdf, xournal, impressive)[home-page]: Likewise. * gnu/packages/perl.scm (perl-math-vecstat, perltidy)[home-page]: Likewise. * gnu/packages/photo.scm (libpano13, enblend-enfuse, hugin)[home-page]: Likewise. * gnu/packages/plan9.scm (drawterm)[home-page]: Likewise. * gnu/packages/plotutils.scm (guile-charting, ploticus)[home-page]: Likewise. * gnu/packages/popt.scm (argtable, popt)[home-page]: Likewise. * gnu/packages/profiling.scm (otf2)[home-page]: Likewise. * gnu/packages/pulseaudio.scm (pulseaudio)[home-page]: Likewise. * gnu/packages/python-check.scm (python-mypy)[home-page]: Likewise. * gnu/packages/python-web.scm (python-cssutils) (python-translationstring)[home-page]: Likewise. * gnu/packages/python-xyz.scm (python-diskcache, python-doxyqml) (python-docutils, python-pexpect, python-importlib-resources) (python-simplegeneric, python-urwid, python-xlrd, python-xlwt) (python-pyasn1, python-pythondialog, python-tftpy, python-random2) (python-arcp, python-pyopengl, python-sortedcollections) (python-sortedcontainers, python-yapsy, python-pydispatcher) (python-posix-ipc)[home-page]: Likewise. * gnu/packages/qt.scm (qwt, libqglviewer, signond)[home-page]: Likewise. * gnu/packages/radio.scm (unixcw, gnuais)[home-page]: Likewise. * gnu/packages/raspberry-pi.scm (bcm2835)[home-page]: Likewise. * gnu/packages/rdf.scm (clucene, rasqal, redland)[home-page]: Likewise. * gnu/packages/regex.scm (tre)[home-page]: Likewise. * gnu/packages/rsync.scm (librsync)[home-page]: Likewise. * gnu/packages/ruby.scm (ruby-packnga, ruby-nokogiri, ruby-oj, ruby-ox) (ruby-sinatra, ruby-citrus, ruby-cbor, ruby-roda)[home-page]: Likewise. * gnu/packages/scheme.scm (scheme48, tinyscheme)[home-page]: Likewise. * gnu/packages/screen.scm (dtach)[home-page]: Likewise. * gnu/packages/scsi.scm (sg3-utils)[home-page]: Likewise. * gnu/packages/sdl.scm (libmikmod, sdl-pango)[home-page]: Likewise. * gnu/packages/shellutils.scm (hstr, rig)[home-page]: Likewise. * gnu/packages/simulation.scm (python-dolfin-adjoint)[home-page]: Likewise. * gnu/packages/smalltalk.scm (smalltalk)[home-page]: Likewise. * gnu/packages/speech.scm (espeak)[home-page]: Likewise. * gnu/packages/stalonetray.scm (stalonetray)[home-page]: Likewise. * gnu/packages/statistics.scm (jags, r-mass, r-class, r-lattice) (r-matrix, r-nnet, r-spatial, r-bit, r-bit64, r-digest, r-xtable) (python-statsmodels, r-ade4, r-latticeextra, r-rcurl, r-xml, r-mvtnorm) (r-robustbase, r-minqa, r-fdrtool, java-jdistlib, xlispstat)[home-page]: Likewise. * gnu/packages/swig.scm (swig)[home-page]: Likewise. * gnu/packages/task-management.scm (wtime)[home-page]: Likewise. * gnu/packages/tcl.scm (itcl, tclxml, tclx)[home-page]: Likewise. * gnu/packages/terminals.scm (libtermkey, mlterm, libvterm) (libvterm)[home-page]: Likewise. * gnu/packages/tex.scm (texlive-lm, texlive-lm-math, texlive-cs) (texlive-csplain, biber, texmaker)[home-page]: Likewise. * gnu/packages/text-editors.scm (joe)[home-page]: Likewise. * gnu/packages/textutils.scm (drm-tools, docx2txt)[home-page]: Likewise. * gnu/packages/tv.scm (tvtime)[home-page]: Likewise. * gnu/packages/unicode.scm (libunibreak)[home-page]: Likewise. * gnu/packages/upnp.scm (libupnp)[home-page]: Likewise. * gnu/packages/version-control.scm (cvs)[home-page]: Likewise. * gnu/packages/video.scm (transcode, libquicktime, mjpegtools, aalib) (liba52, libmpeg2, x265, libdv, dvdauthor, aegisub, pitivi, gavl) (dvdbackup, guvcview, video-contact-sheet)[home-page]: Likewise. * gnu/packages/virtualization.scm (bochs)[home-page]: Likewise. * gnu/packages/w3m.scm (w3m)[home-page]: Likewise. * gnu/packages/web.scm (qjson, libquvi-scripts, libquvi, quvi) (tidy-html, htmlcxx)[home-page]: Likewise. * gnu/packages/wm.scm (evilwm, menumaker)[home-page]: Likewise. * gnu/packages/wv.scm (wv)[home-page]: Likewise. * gnu/packages/wxwidgets.scm (wxsvg)[home-page]: Likewise. * gnu/packages/xdisorg.scm (mtdev, xsel)[home-page]: Likewise. * gnu/packages/xfig.scm (xfig, transfig)[home-page]: Likewise. * gnu/packages/xml.scm (openjade, python-pyxb, xmlstarlet, xmlrpc-c) (opensp)[home-page]: Likewise. * gnu/packages/xorg.scm (xf86-video-qxl)[home-page]: Likewise.
2023-02-11 19:00:00 -05:00
(home-page "https://www.gromacs.org/")
(synopsis "Molecular dynamics software package")
(description "GROMACS is a versatile package to perform molecular dynamics,
i.e. simulate the Newtonian equations of motion for systems with hundreds to
millions of particles. It is primarily designed for biochemical molecules like
proteins, lipids and nucleic acids that have a lot of complicated bonded
interactions, but since GROMACS is extremely fast at calculating the nonbonded
interactions (that usually dominate simulations) many groups are also using it
for research on non-biological systems, e.g. polymers. GROMACS supports all the
usual algorithms you expect from a modern molecular dynamics implementation.")
(license license:lgpl2.1+)
(properties '((tunable? . #t)))))
(define-public openbabel
(package
(name "openbabel")
(version "3.1.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/openbabel/openbabel/"
"releases/download/openbabel-"
(string-replace-substring version "." "-")
"/openbabel-" version "-source.tar.bz2"))
(sha256
(base32
"0s0f4zib8vshfaywsr5bjjz55jwsg6yiz2qw4i5jm8wysn0q7v56"))))
(build-system cmake-build-system)
(arguments
`(;; FIXME: Disable tests on i686 to work around
;; https://github.com/openbabel/openbabel/issues/2041.
#:tests? ,(or (%current-target-system)
(not (string=? "i686-linux" (%current-system))))
#:configure-flags
(list "-DOPENBABEL_USE_SYSTEM_INCHI=ON"
(string-append "-DINCHI_LIBRARY="
(assoc-ref %build-inputs "inchi")
"/lib/inchi/libinchi.so.1")
(string-append "-DINCHI_INCLUDE_DIR="
(assoc-ref %build-inputs "inchi") "/include/inchi"))
#:test-target "test"))
(native-inputs
(list pkg-config))
(inputs
(list eigen inchi libxml2 zlib))
(home-page "http://openbabel.org/wiki/Main_Page")
(synopsis "Chemistry data manipulation toolbox")
(description
"Open Babel is a chemical toolbox designed to speak the many languages of
chemical data. It's a collaborative project allowing anyone to search, convert,
analyze, or store data from molecular modeling, chemistry, solid-state
materials, biochemistry, or related areas.")
(license license:gpl2)))
(define-public spglib
(package
(name "spglib")
(version "1.16.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/spglib/spglib")
(commit (string-append "v" version))))
(sha256
(base32 "1kzc956m1pnazhz52vspqridlw72wd8x5l3dsilpdxl491aa2nws"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
'(#:test-target "check"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-header-install-dir
(lambda _
;; As of the writing of this package, CMake and GNU build systems
;; install the header to two different location. This patch makes
;; the CMake build system's choice of header directory compatible
;; with the GNU build system's choice and with what avogadrolibs
;; expects.
;; See https://github.com/spglib/spglib/issues/75 and the relevant
;; part of https://github.com/OpenChemistry/avogadroapp/issues/97.
(substitute* "CMakeLists.txt"
(("\\$\\{CMAKE_INSTALL_INCLUDEDIR\\}" include-dir)
(string-append include-dir "/spglib")))
#t)))))
(home-page "https://spglib.github.io/spglib/index.html")
(synopsis "Library for crystal symmetry search")
(description "Spglib is a library for finding and handling crystal
symmetries written in C. Spglib can be used to:
@enumerate
@item Find symmetry operations
@item Identify space-group type
@item Wyckoff position assignment
@item Refine crystal structure
@item Find a primitive cell
@item Search irreducible k-points
@end enumerate")
(license license:bsd-3)))
(define-public python-pymol
(package
(name "python-pymol")
(version "2.5.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/schrodinger/pymol-open-source")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "08zmfgclkbjkqjpq8xs1mphs1i8rpqj76mcw7m2mrhvma5qj1nr5"))))
(build-system python-build-system)
(arguments
'(#:configure-flags
(list "--glut" "--testing")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-reproducible
(lambda _
(substitute* "create_shadertext.py"
(("time\\.time\\(\\)") "0"))))
(add-after 'unpack 'add-include-directories
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
(string-append (assoc-ref inputs "freetype")
"/include/freetype2:"
(assoc-ref inputs "libxml2")
"/include/libxml2:"
(getenv "CPLUS_INCLUDE_PATH")))))
;; Prevent deleting the leading / in the __init__.py path in the
;; launch script.
(add-after 'unpack 'disable-unchroot
(lambda _
(substitute* "setup.py"
(("self\\.unchroot") ""))))
;; The setup.py script does not support one of the Python build
;; system's default flags, "--single-version-externally-managed".
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(invoke "python" "setup.py" "install"
(string-append "--prefix=" (assoc-ref outputs "out"))
"--root=/"))))))
(inputs
(list freetype
libpng
freeglut
glew
libxml2
mmtf-cpp
python-pyqt
glm
netcdf))
(native-inputs (list catch2))
(home-page "https://pymol.org")
(synopsis "Molecular visualization system")
(description "PyMOL is a capable molecular viewer and renderer. It can be
used to prepare publication-quality figures, to share interactive results with
your colleagues, or to generate pre-rendered animations.")
(license license:bsd-3)))
(define-public gemmi
(package
(name "gemmi")
(version "0.6.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/project-gemmi/gemmi")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0wciqqswc4p4v4kglfv36gnvyyimqn4lnywdzd0pgrjn443i860y"))
(patches
(search-patches "gemmi-fix-sajson-types.patch"
"gemmi-fix-pegtl-usage.patch"))
(modules '((guix build utils)))
(snippet
'(begin
(delete-file-recursively "include/gemmi/third_party")
(delete-file-recursively "third_party")))))
(outputs '("out" "bin" "python"))
(build-system cmake-build-system)
(arguments
(list
#:modules '((guix build cmake-build-system)
(guix build utils)
((guix build python-build-system)
#:select (site-packages)))
#:imported-modules (append %cmake-build-system-modules
'((guix build python-build-system)))
#:configure-flags
#~(list "-DUSE_PYTHON=ON"
(string-append "-DPYTHON_INSTALL_DIR="
(site-packages %build-inputs %outputs)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-includes
(lambda _
(substitute* (list "src/sprintf.cpp"
"include/gemmi/dirwalk.hpp"
"include/gemmi/cif.hpp"
"include/gemmi/json.hpp"
"python/gemmi.cpp"
"include/gemmi/atof.hpp"
"include/gemmi/numb.hpp"
"include/gemmi/fourier.hpp")
(("<stb/stb_sprintf.h>") "<stb_sprintf.h>")
(("\"third_party/tinydir.h\"") "<tinydir.h>")
(("\"third_party/tao/pegtl.hpp\"") "<tao/pegtl.hpp>")
(("\"third_party/sajson.h\"") "<sajson.h>")
(("\"gemmi/third_party/tao/pegtl/parse_error.hpp\"")
"<tao/pegtl/parse_error.hpp>")
(("\"third_party/fast_float.h\"")
"<fast_float/fast_float.h>")
(("\"third_party/pocketfft_hdronly.h\"")
"<pocketfft_hdronly.h>"))))
(add-after 'unpack 'change-bin-prefix
(lambda _
(substitute* "CMakeLists.txt"
(("install\\(TARGETS program DESTINATION bin\\)")
(string-append
"install(TARGETS program DESTINATION "
#$output:bin "/bin)")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(with-directory-excursion "../source"
(setenv "PYTHONPATH" "../build")
(invoke "python3" "-m" "unittest" "discover" "-v"
"-s" "tests"))))))))
(inputs (list python zlib))
(native-inputs
(list fast-float
optionparser
pegtl
pocketfft-cpp
pybind11
sajson-for-gemmi
stb-sprintf
tinydir))
(home-page "https://gemmi.readthedocs.io/en/latest/")
(synopsis "Macromolecular crystallography library and utilities")
(description "GEMMI is a C++ library for macromolecular crystallography.
It can be used for working with
@enumerate
@item macromolecular models (content of PDB, PDBx/mmCIF and mmJSON files),
@item refinement restraints (CIF files),
@item reflection data (MTZ and mmCIF formats),
@item data on a 3D grid (electron density maps, masks, MRC/CCP4 format)
@item crystallographic symmetry.
@end enumerate")
(license license:mpl2.0)))
(define-public freesasa
(package
(name "freesasa")
(version "2.1.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/mittinatten/freesasa")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"07wdnahf3g355ryaiqvfxd5f4rl54wv8jwxcbn0nia89fqysbv0f"))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove C files generated by Flex and Bison
(for-each delete-file
'("src/parser.c" "src/parser.h"
"src/lexer.c" "src/lexer.h"))))))
(outputs '("out" "doc"))
(build-system gnu-build-system)
(arguments
(list
#:configure-flags
#~(list "--enable-check"
"--enable-parser-generator"
"CXXFLAGS=-std=c++17"
"--enable-doxygen"
;; Some tests rely on replacing malloc with a wrapper which
;; fails in a controlled way, but this does not work if the call
;; is replaced. This was fixed upstream, remove once there is a
;; new release.
"CFLAGS=-fno-builtin-malloc")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'remove-libc++-linking
(lambda _
(substitute* "src/Makefile.am"
(("-lc\\+\\+") ""))))
(add-after 'unpack 'build-shared-library
(lambda _
(substitute* "src/Makefile.am"
(("lib_LIBRARIES") "lib_LTLIBRARIES")
(("libfreesasa\\.a") "libfreesasa.la")
(("freesasa_LDADD \\+= libfreesasa\\.la" prev)
(string-append prev "\nlibfreesasa_la_LIBADD"
" = -ljson-c -lgemmi_cpp ${libxml2_LIBS}\n"))
(("_a_SOURCES") "_la_SOURCES"))
(substitute* "configure.ac"
(("AC_PROG_INSTALL" inst)
(string-append "AM_PROG_LIBTOOL\n" inst)))
(substitute* "tests/Makefile.am"
(("libfreesasa\\.a") "libfreesasa.la"))))
(add-before 'build 'build-lexer-and-parser
(lambda _
(with-directory-excursion "src"
(invoke "make" "lexer.h" "parser.h"))))
(add-after 'install 'install-doc
(lambda _
(copy-recursively
"doc/html"
(string-append #$output:doc "/share/doc/"
#$name "-" #$version)))))))
(inputs (list gemmi json-c libxml2))
(native-inputs
(list autoconf
automake
bison
check
doxygen
fast-float
flex
libtool
pegtl
perl
pkg-config))
(home-page "https://freesasa.github.io/")
(synopsis "Calculate the solvent accessible surface area (SASA) of
molecules")
(description "FreeSASA is a command line tool and C-library for
calculating @acronym{SASAs, solvent accessible surface areas}. By default Lee
& Richards' algorithm is used, but Shrake & Rupley's is also available. Both
can be parameterized to arbitrary precision, and for high resolution versions
of the algorithms, the calculations give identical results.")
(license license:expat)))
(define-public maeparser
(package
(name "maeparser")
(version "1.3.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/schrodinger/maeparser")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0mr5glg4br04ql5grby8yqni9fqq1l1cc75wyc159a1b9lwr7q7r"))))
(build-system cmake-build-system)
(inputs (list boost zlib))
(home-page "https://github.com/schrodinger/maeparser")
(synopsis "Maestro file parser")
(description "maeparser is a parser for Schrodinger Maestro files.")
(license license:expat)))
(define-public coordgenlibs
(package
(name "coordgenlibs")
(version "3.0.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/schrodinger/coordgenlibs/")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1wjaxwaihjy9xm5ys23f5abl50zcar1h9pww5ajdkgygsqy0bavi"))))
(build-system cmake-build-system)
(arguments
(list
#:configure-flags
#~(list "-DCOORDGEN_RIGOROUS_BUILD=OFF"
"-DCOORDGEN_USE_MAEPARSER=ON")))
(inputs (list boost maeparser))
(home-page "https://github.com/schrodinger/coordgenlibs/")
(synopsis "2D molecule coordinate generation")
(description "@code{coordgenlibs} contains algorithms to generate 2D
coordinates of molecules including macrocycles and metal complexes. It has an
emphasis on quality rather than speed.")
(license license:bsd-3)))
(define-public yaehmop
(package
(name "yaehmop")
(version "2023.03.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/greglandrum/yaehmop")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"18xnxqn8i7vswy3iffapfh9q2iimpnd23ps45hn4xxbs6dqgzprb"))
(modules '((guix build utils)))
(snippet
'(begin
;; Separate program
(delete-file-recursively "viewkel")
;; Remove example output (some are corrupted)
(for-each delete-file (find-files "examples" "\\.Z$"))
;; Documentation outputs
(for-each delete-file (find-files "docs" "\\.(ps|pdf)$"))
;; These are transpiled from Fortran to C, but we build the
;; Fortran code instead
(delete-file-recursively "tightbind/f2c_files")
(with-directory-excursion "tightbind"
(for-each delete-file '("abfns.c"
"cboris.c"
"diag.c"
"lovlap.c")))))))
(build-system cmake-build-system)
(arguments
(list
#:configure-flags
#~(list
"-DUSE_BLAS_LAPACK=ON"
(string-append "-DPARM_FILE_LOC=" #$output
"/share/" #$name "-" #$version "/eht_parms.dat")
"-DBIND_EXE_NAME=yaehmop-bind")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'chdir
(lambda _
(chdir "tightbind")))
(add-after 'chdir 'patch-fortran-functions
(lambda _
(substitute* '("mov.c" "prototypes.h")
(("lovlap\\(") "lovlap_(")
(("abfns\\(") "abfns_("))))
(add-after 'chdir 'patch-cmake
(lambda _
(substitute* "CMakeLists.txt"
(("project\\(yaehmop C\\)") "project(yaehmop C Fortran)")
(("abfns.c") "fortran77/abfns.f")
(("lovlap.c") "fortran77/lovlap.f")
(("(set\\(PARM_FILE_LOC.*)\\)" all init)
(string-append init " CACHE STRING \"\")"))
(("add_library\\(yaehmop_eht" lib)
(string-append lib " SHARED "))
(("target_link_libraries\\(test_eht \\$\\{LAPACK_LIBRARIES\\}.*"
all)
(string-append all "\ntarget_link_libraries(yaehmop_eht "
"${LAPACK_LIBRARIES})\n")))))
(add-after 'build 'build-doc
(lambda _
(with-directory-excursion "../docs"
(substitute* "bind_manual.tex"
(("\\\\usepackage\\{bindpage\\}")
(string-append
"\\usepackage[left=2cm,right=2cm,top=4cm,bottom=2cm]"
"{geometry}\n"
"\\pdfsuppressptexinfo=-1\n")))
(substitute* "Zmat_appendix.tex"
(("file=dihedral\\.eps")
"file=figs/dihedral.eps"))
(setenv "FORCE_SOURCE_DATE" "1")
(invoke "latexmk" "-pdf" "bind_manual.tex"))))
(add-after 'install 'install-eht-parms
(lambda _
(install-file "../tightbind/eht_parms.dat"
(string-append #$output "/share/"
#$name "-" #$version))))
(add-after 'install-eht-parms 'install-doc
(lambda _
(install-file "../docs/bind_manual.pdf"
(string-append #$output "/share/doc/"
#$name "-" #$version))))
(delete 'check)
(add-after 'install-doc 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "./test_eht")))))))
(inputs (list openblas))
(native-inputs
(list gfortran
(texlive-updmap.cfg
(list texlive-epstopdf
texlive-latexmk))))
(home-page "https://github.com/greglandrum/yaehmop")
(synopsis "Perform extended Hückel calculations")
(description "@acronym{YAeHMOP, Yet Another extended Hueckel Molecular
Orbital Package} contains a program and library for performing extended Hückel
calculations and analyzing the results.")
(license license:bsd-2)))
(define-public avalon-toolkit
(package
(name "avalon-toolkit")
(version "2.0.5a")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rohdebe1/ava-formake")
(commit (string-append "AvalonToolkit_" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1mfg40y5xc17sm59zdfc5sk22n9zm5zk0z1aw47chvl6hp465szk"))
(patches
(search-patches "avalon-toolkit-rdkit-fixes.patch"))
(modules '((guix build utils) (ice-9 ftw)))
(snippet
#~(begin
(delete-file-recursively "src/main/java")
(delete-file-recursively "src/test/target")))))
(build-system gnu-build-system)
(arguments
(list
;; There is only one test, which is missing a file
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(delete 'configure)
(replace 'build
(lambda* (#:key parallel-build? #:allow-other-keys)
(mkdir "build")
(mkdir-p "target/executables")
(mkdir-p "target/libraries")
(invoke "make" "programs" "-j"
(if parallel-build?
(number->string (parallel-job-count))
"1"))))
(replace 'install
(lambda _
;; Executables
(let ((programs '("canonizer" "matchtest" "smi2mol" "struchk")))
(for-each
(lambda (program)
(install-file (string-append "target/executables/" program)
(string-append #$output "/bin")))
programs))
(for-each
(lambda (name)
(symlink (string-append #$output "/bin/smi2mol")
(string-append #$output "/bin/" name)))
'("mol2smi" "rdf2smi" "mol2tbl" "mol2sma" "smi2rdf"))
;; Library
(install-file "target/libraries/libavalon_tools.a"
(string-append #$output "/lib"))
(install-file "target/libraries/libavalon4rdkit.a"
(string-append #$output "/lib"))
(for-each
(lambda (file)
(install-file file (string-append #$output
"/include/avalontoolkit")))
(find-files "src/main/C/include" "\\.h$"))
(install-file "license.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version "/")))))))
(home-page "https://sourceforge.net/projects/avalontoolkit/")
(synopsis "Tools for SMILES and MOL files and for structure fingerprinting")
(description "This package contains a library and programs for
canonicalization of SMILES and MOL files, molecular structure fingerprinting
and rendering molecules.")
(license license:bsd-3)))
(define-public ringdecomposerlib
(package
(name "ringdecomposerlib")
(version "1.1.3")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rareylab/RingDecomposerLib")
(commit (string-append "v" version "_rdkit"))))
(file-name (git-file-name name version))
(sha256
(base32
"1rxzs2wpkkdi40wdzxc4sn0brk7dm7ivgqyfh38gf2f5c7pbg0wi"))))
(build-system cmake-build-system)
(arguments
(list
#:configure-flags
#~(list "-DBUILD_PYTHON_WRAPPER=ON"
"-DPYTHON_EXECUTABLE=python3"
(string-append "-DPYTHON_FLAGS=;--prefix=" #$output ";--root=/"))
#:imported-modules (append %cmake-build-system-modules
'((guix build python-build-system)))
#:modules '((guix build cmake-build-system)
(guix build utils)
((guix build python-build-system)
#:select (add-installed-pythonpath)))
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'patch-cmake
(lambda _
(substitute* (list "src/Test/CMakeLists.txt"
"src/RingDecomposerLib/CMakeLists.txt")
(("build_.*STATIC") "#"))
(substitute* "test/CMakeLists.txt"
(("STATIC_TEST") "SHARED_TEST"))
;; Link Python library against shared library
(substitute* "src/python/CMakeLists.txt"
(("RingDecomposerLibStatic") "RingDecomposerLib"))
(substitute* "src/python/setup.py.in"
(("static_libs =.*") "static_libs = []\n")
(("shared_libs\\s*=.*")
(string-append
"shared_libs = ['RingDecomposerLib']"))
(("library_dirs\\s*=\\s*\\[\\]")
"library_dirs = ['${CMAKE_BINARY_DIR}/src/RingDecomposerLib']")
(("extra_objects=.*")
(string-append
"extra_link_args=['-Wl,-rpath=" #$output "/lib'],\n")))))
(add-after 'build 'build-doc
(lambda _
;; Disable redundant LaTeX documentation
(substitute* "../source/documentation/sphinx/conf.py"
(("^(subprocess.*latex|shutil).*") ""))
(substitute* "../source/documentation/doxygen.cfg"
(("GENERATE_LATEX.*YES") "GENERATE_LATEX = NO"))
;; Build HTML documentation
(invoke "sphinx-build" "-b" "html"
"../source/documentation/sphinx" "html")))
(add-after 'install 'install-doc
(lambda _
;; Not reproducible
(delete-file-recursively "html/.doctrees")
(copy-recursively "html"
(string-append #$output "/share/doc/"
#$name "-" #$version "/html"))))
(delete 'check)
(add-after 'install 'check
(assoc-ref %standard-phases 'check))
(add-before 'check 'set-pythonpath
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs))))))
(inputs (list python))
(native-inputs (list doxygen python python-cython python-sphinx))
(home-page "https://github.com/rareylab/RingDecomposerLib")
(synopsis "Calculate ring topology descriptions")
(description "RingDecomposerLib is a library for the calculation of
unique ring families, relevant cycles, the smallest set of smallest rings and
other ring topology descriptions.")
(license license:bsd-3)))
(define-public rdkit
(package
(name "rdkit")
(version "2023.09.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rdkit/rdkit")
(commit
(string-append
"Release_" (string-replace-substring version "." "_")))))
(file-name (git-file-name name version))
(sha256
(base32
"1lgcgijlzzwpfxndsdlx13npdfk7hcii11zg25cvpmzhbpn6vyn8"))
(patches
(search-patches "rdkit-unbundle-external-dependencies.patch"))
(modules '((guix build utils)))
(snippet
#~(begin
;; Remove pickle files (only used in tests),
;; as they are compiled programs
(for-each
(lambda (name)
(display (string-append name "\n"))
(delete-file name))
(find-files "." "\\.pkl(\\.gz)?$"))
;; Remove SQLite data files (can be generated)
(delete-file "Data/RDData.sqlt")
(delete-file "Data/RDTests.sqlt")))))
(build-system cmake-build-system)
(arguments
(list
#:imported-modules (append %cmake-build-system-modules
'((guix build python-build-system)))
#:modules '((guix build cmake-build-system)
(guix build utils)
((guix build python-build-system)
#:select (add-installed-pythonpath)))
#:configure-flags
#~(list "-DRDK_BUILD_AVALON_SUPPORT=ON"
"-DRDK_BUILD_CAIRO_SUPPORT=ON"
"-DRDK_BUILD_FREESASA_SUPPORT=ON"
"-DRDK_BUILD_INCHI_SUPPORT=ON"
"-DRDK_BUILD_YAEHMOP_SUPPORT=ON"
(string-append "-DCATCH_DIR="
(search-input-directory %build-inputs
"/include/catch2"))
"-DRDK_INSTALL_INTREE=OFF"
"-DRDK_INSTALL_STATIC_LIBS=OFF"
(string-append
"-DRDK_OPTIMIZE_POPCNT="
#$(let ((system (or (%current-target-system)
(%current-system))))
(cond
((string-prefix? "x86_64" system) "ON")
((string-prefix? "i686" system) "ON")
(else "OFF"))))
"-DRDK_USE_FLEXBISON=ON"
(string-append
"-DCMAKE_INCLUDE_PATH="
(search-input-directory %build-inputs "/include/avalontoolkit")))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'copy-external-dependencies
(lambda _
(symlink
(string-append
(search-input-file
%build-inputs "/share/fonts/truetype/ComicNeue-Regular.ttf"))
"Data/Fonts/ComicNeue-Regular.ttf")))
(add-after 'unpack 'fix-inchi-include
(lambda _
(substitute* "Code/cmake/Modules/FindInchi.cmake"
(("inchi_api.h.*\\)") "inchi/inchi_api.h)")
(("INCHI_LIBRARY NAMES.*\\)")
"INCHI_LIBRARY NAMES inchi PATH_SUFFIXES inchi)")
(("find_library" prev)
(string-append
"list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.1)\n"
prev)))
(substitute* "External/INCHI-API/inchi.cpp"
(("<inchi_api.h>") "<inchi/inchi_api.h>"))))
(add-before 'build 'enable-bytecode-determinism
(lambda _
(setenv "PYTHONHASHSEED" "0")
(setenv "PYTHONDONTWRITEBYTECODE" "1")))
(add-after 'install 'pre-check
(lambda* (#:key inputs outputs #:allow-other-keys)
(with-directory-excursion "../source"
(invoke "sqlite3" "Data/RDData.sqlt"
".read rdkit/Dbase/test_data/RDData.sqlite")
(invoke "sqlite3" "Data/RDTests.sqlt"
".read rdkit/Dbase/test_data/RDTests.sqlite")
(setenv "RDBASE" (canonicalize-path ".")))
(add-installed-pythonpath inputs outputs)))
(delete 'check)
(add-after 'pre-check 'check
(lambda* (#:key tests? parallel-tests? #:allow-other-keys)
(when tests?
(let ((job-count (number->string
(if parallel-tests? (parallel-job-count) 1))))
(invoke
"ctest" "-j" job-count
"-E" (string-append
"("
(string-join
'(;; need pickled data
"pyDiscreteValueVect" "pySparseIntVect"
"graphmoltestPickler" "pyPartialCharges"
"substructLibraryTest" "pyFeatures"
"pythonTestDirML" "pythonTestDirChem"
;; Catching Python exception fails
"pyRanker"
;; Flaky test depending on floating point rounding
"testConrec"
) "|")
")")))))))))
(inputs
(list avalon-toolkit
cairo
coordgenlibs
font-comic-neue
freetype
inchi
maeparser
python
ringdecomposerlib
sqlite
yaehmop))
(native-inputs
(list bison
boost
catch2-3
eigen
flex
freesasa
pkg-config
rapidjson
tar))
(propagated-inputs
(list python-numpy python-cairocffi python-pillow))
(home-page "https://rdkit.org/")
(synopsis "Collection of cheminformatics software")
(description "RDKit is a C++ and Python library for cheminformatics, which
includes (among other things) the analysis and modification of molecules in 2D
and 3D and descriptor generation for machine learning.")
;; For 32 bit systems, there is a bug in Boost.Python:
;; https://github.com/boostorg/python/issues/312. Additionally, several
;; other test fail.
(supported-systems %64bit-supported-systems)
(license license:bsd-3)))