summaryrefslogtreecommitdiff
path: root/gnu/packages/chemistry.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/chemistry.scm')
-rw-r--r--gnu/packages/chemistry.scm300
1 files changed, 222 insertions, 78 deletions
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 4aa39a567d..4b0e719959 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
-;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.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>
@@ -29,6 +29,8 @@
#: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 boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
@@ -43,95 +45,89 @@
#:use-module (gnu packages python)
#: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 xml)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python))
-(define-public avogadro
+(define-public avogadrolibs
(package
- (name "avogadro")
- (version "1.2.0")
+ (name "avogadrolibs")
+ (version "1.93.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/cryos/avogadro")
+ (url "https://github.com/OpenChemistry/avogadrolibs")
(commit version)))
(sha256
- (base32 "0258py3lkba85qhs5ynancinyym61vlp0zaq9yrfs3hhnhpzv9n2"))
- (file-name (git-file-name name version))
- (patches
- (search-patches "avogadro-eigen3-update.patch"
- "avogadro-python-eigen-lib.patch"
- "avogadro-boost148.patch"))))
+ (base32 "1xivga626n5acnmwmym8svl0pdri8hkp59czf04ri2zflnviyh39"))
+ (file-name (git-file-name name version))))
(build-system cmake-build-system)
+ (native-inputs
+ `(("eigen" ,eigen)
+ ("mmtf-cpp" ,mmtf-cpp)
+ ("msgpack" ,msgpack)
+ ("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)
+ ("pybind11" ,pybind11)))
+ (inputs
+ `(("glew" ,glew)
+ ("libarchive" ,libarchive)
+ ("libmsym" ,libmsym)
+ ("molequeue" ,molequeue)
+ ("python" ,python)
+ ("spglib" ,spglib)
+ ("qtbase" ,qtbase)))
(arguments
- `(#:tests? #f
- #:configure-flags
- (list "-DENABLE_GLSL=ON"
- (string-append "-DPYTHON_LIBRARIES="
- (assoc-ref %build-inputs "python")
- "/lib")
- (string-append "-DPYTHON_INCLUDE_DIRS="
- (assoc-ref %build-inputs "python")
- "/include/python"
- ,(version-major+minor
- (package-version python))))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-python-lib-path
- (lambda* (#:key outputs #:allow-other-keys)
- ;; This is necessary to install the Python module in the correct
- ;; directory.
- (substitute* "libavogadro/src/python/CMakeLists.txt"
- (("^EXECUTE_PROCESS.*$") "")
- (("^.*from sys import stdout.*$") "")
- (("^.*OUTPUT_VARIABLE.*")
- (string-append "set(PYTHON_LIB_PATH \""
- (assoc-ref outputs "out")
- "/lib/python"
- ,(version-major+minor
- (package-version python))
- "/site-packages\")")))))
- (add-after 'install 'wrap-program
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Make sure 'avogadro' runs with the correct PYTHONPATH.
- (let* ((out (assoc-ref outputs "out")))
- (setenv "GUIX_PYTHONPATH"
- (string-append
- (assoc-ref outputs "out")
- "/lib/python"
- ,(version-major+minor
- (package-version python))
- "/site-packages:"
- (getenv "GUIX_PYTHONPATH")))
- (wrap-program (string-append out "/bin/avogadro")
- `("GUIX_PYTHONPATH" ":" prefix
- (,(getenv "GUIX_PYTHONPATH"))))))))))
+ '(#: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
- `(("doxygen" ,doxygen)
+ `(("eigen" ,eigen)
("pkg-config" ,pkg-config)))
(inputs
- `(("boost" ,boost)
- ("eigen" ,eigen)
- ("glew" ,glew)
- ("openbabel" ,openbabel)
- ("python" ,python-2)
- ("python-numpy" ,python2-numpy)
- ("python-pyqt" ,python2-pyqt-4)
- ("python-sip" ,python2-sip)
- ("qt" ,qt-4)
- ("zlib" ,zlib)))
- (home-page "https://avogadro.cc")
+ `(("avogadrolibs" ,avogadrolibs)
+ ("hdf5" ,hdf5)
+ ("molequeue" ,molequeue)
+ ("qtbase" ,qtbase)))
+ ;; 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 is an advanced molecule editor and visualizer designed for use
+ "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:gpl2+)))
+ (license license:bsd-3)))
(define-public domainfinder
(package
@@ -165,15 +161,16 @@ only with Python 2 and NumPy < 1.9.")
(define-public inchi
(package
(name "inchi")
- (version "1.05")
+ ;; Update the inchi-doc native input when updating inchi.
+ (version "1.06")
(source (origin
(method url-fetch)
- (uri (string-append "http://www.inchi-trust.org/download/"
+ (uri (string-append "https://www.inchi-trust.org/download/"
(string-join (string-split version #\.) "")
"/INCHI-1-SRC.zip"))
(sha256
(base32
- "081pcjx1z5jm23fs1pl2r3bccia0ww8wfkzcjpb7byhn7b513hsa"))
+ "1zbygqn0443p0gxwr4kx3m1bkqaj8x9hrpch3s41py7jq08f6x28"))
(file-name (string-append name "-" version ".zip"))))
(build-system gnu-build-system)
(arguments
@@ -226,7 +223,7 @@ only with Python 2 and NumPy < 1.9.")
"/INCHI-1-DOC.zip"))
(sha256
(base32
- "1id1qb2y4lwsiw91qr2yqpn6kxbwjwhjk0hb2rwk4fxhdqib6da6"))
+ "1kyda09i9p89xfq90ninwi7w13k1w3ljpl4gqdhpfhi5g8fgxx7f"))
(file-name (string-append name "-" version ".zip"))))))
(home-page "https://www.inchi-trust.org")
(synopsis "Utility for manipulating machine-readable chemical structures")
@@ -240,6 +237,103 @@ analogy is that InChI is the bar-code for chemistry and chemical structures.")
"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.0.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
+ "17ylramda69plf5w0v5hxbl4ggkdi5s15z55cv0pljl12yvyva8l"))))
+ (build-system cmake-build-system)
+ ;; Tests require the soon-to-be-deprecated version 1 of the catch-framework.
+ (arguments
+ '(#:tests? #f))
+ (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
+ `(("qtbase" ,qtbase)))
+ (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 with-numpy-1.8
(package-input-rewriting `((,python2-numpy . ,python2-numpy-1.8))))
@@ -428,19 +522,23 @@ usual algorithms you expect from a modern molecular dynamics implementation.")
(define-public openbabel
(package
(name "openbabel")
- (version "2.4.1")
+ (version "3.1.1")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/" name "/" name "/"
- version "/" name "-" version ".tar.gz"))
+ (uri (string-append "https://github.com/openbabel/openbabel/"
+ "releases/download/openbabel-"
+ (string-replace-substring version "." "-")
+ "/openbabel-" version "-source.tar.bz2"))
(sha256
(base32
- "1z3d6xm70dpfikhwdnbzc66j2l49vq105ch041wivrfz5ic3ch90"))
- (patches
- (search-patches "openbabel-fix-crash-on-nwchem-output.patch"))))
+ "0s0f4zib8vshfaywsr5bjjz55jwsg6yiz2qw4i5jm8wysn0q7v56"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
+ `(;; 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")
@@ -463,3 +561,49 @@ 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)))