| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net> |
| 3 | ;;; Copyright © 2018, 2021 Kei Kebreau <kkebreau@posteo.net> |
| 4 | ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> |
| 5 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
| 6 | ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> |
| 7 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
| 8 | ;;; |
| 9 | ;;; This file is part of GNU Guix. |
| 10 | ;;; |
| 11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 12 | ;;; under the terms of the GNU General Public License as published by |
| 13 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 14 | ;;; your option) any later version. |
| 15 | ;;; |
| 16 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | ;;; GNU General Public License for more details. |
| 20 | ;;; |
| 21 | ;;; You should have received a copy of the GNU General Public License |
| 22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 23 | |
| 24 | (define-module (gnu packages chemistry) |
| 25 | #:use-module (guix packages) |
| 26 | #:use-module (guix utils) |
| 27 | #:use-module ((guix licenses) #:prefix license:) |
| 28 | #:use-module (guix download) |
| 29 | #:use-module (guix git-download) |
| 30 | #:use-module (gnu packages) |
| 31 | #:use-module (gnu packages algebra) |
| 32 | #:use-module (gnu packages autotools) |
| 33 | #:use-module (gnu packages backup) |
| 34 | #:use-module (gnu packages boost) |
| 35 | #:use-module (gnu packages check) |
| 36 | #:use-module (gnu packages compression) |
| 37 | #:use-module (gnu packages documentation) |
| 38 | #:use-module (gnu packages gl) |
| 39 | #:use-module (gnu packages graphviz) |
| 40 | #:use-module (gnu packages gv) |
| 41 | #:use-module (gnu packages maths) |
| 42 | #:use-module (gnu packages mpi) |
| 43 | #:use-module (gnu packages perl) |
| 44 | #:use-module (gnu packages pkg-config) |
| 45 | #:use-module (gnu packages python) |
| 46 | #:use-module (gnu packages python-xyz) |
| 47 | #:use-module (gnu packages qt) |
| 48 | #:use-module (gnu packages serialization) |
| 49 | #:use-module (gnu packages sphinx) |
| 50 | #:use-module (gnu packages xml) |
| 51 | #:use-module (guix build-system cmake) |
| 52 | #:use-module (guix build-system gnu) |
| 53 | #:use-module (guix build-system python)) |
| 54 | |
| 55 | (define-public avogadrolibs |
| 56 | (package |
| 57 | (name "avogadrolibs") |
| 58 | (version "1.93.0") |
| 59 | (source |
| 60 | (origin |
| 61 | (method git-fetch) |
| 62 | (uri (git-reference |
| 63 | (url "https://github.com/OpenChemistry/avogadrolibs") |
| 64 | (commit version))) |
| 65 | (sha256 |
| 66 | (base32 "1xivga626n5acnmwmym8svl0pdri8hkp59czf04ri2zflnviyh39")) |
| 67 | (file-name (git-file-name name version)))) |
| 68 | (build-system cmake-build-system) |
| 69 | (native-inputs |
| 70 | `(("eigen" ,eigen) |
| 71 | ("mmtf-cpp" ,mmtf-cpp) |
| 72 | ("msgpack" ,msgpack) |
| 73 | ("googletest" ,googletest) |
| 74 | ("pkg-config" ,pkg-config) |
| 75 | ("pybind11" ,pybind11))) |
| 76 | (inputs |
| 77 | `(("glew" ,glew) |
| 78 | ("libarchive" ,libarchive) |
| 79 | ("libmsym" ,libmsym) |
| 80 | ("molequeue" ,molequeue) |
| 81 | ("python" ,python) |
| 82 | ("spglib" ,spglib) |
| 83 | ("qtbase" ,qtbase))) |
| 84 | (arguments |
| 85 | '(#:configure-flags (list "-DENABLE_TESTING=ON" |
| 86 | (string-append "-DSPGLIB_INCLUDE_DIR=" |
| 87 | (assoc-ref %build-inputs "spglib") |
| 88 | "/include")))) |
| 89 | (home-page "https://www.openchemistry.org/projects/avogadro2/") |
| 90 | (synopsis "Libraries for chemistry, bioinformatics, and related areas") |
| 91 | (description |
| 92 | "Avogadro libraries provide 3D rendering, visualization, analysis and data |
| 93 | processing useful in computational chemistry, molecular modeling, |
| 94 | bioinformatics, materials science, and related areas.") |
| 95 | (license license:bsd-3))) |
| 96 | |
| 97 | (define-public avogadro2 |
| 98 | (package |
| 99 | (name "avogadro2") |
| 100 | (version "1.93.0") |
| 101 | (source |
| 102 | (origin |
| 103 | (method git-fetch) |
| 104 | (uri (git-reference |
| 105 | (url "https://github.com/OpenChemistry/avogadroapp") |
| 106 | (commit version))) |
| 107 | (sha256 |
| 108 | (base32 |
| 109 | "1z3pjlwja778a1dmvx9aqz2hlw5q9g3kqxhm9slz08452600jsv7")) |
| 110 | (file-name (git-file-name name version)))) |
| 111 | (build-system cmake-build-system) |
| 112 | (native-inputs |
| 113 | `(("eigen" ,eigen) |
| 114 | ("pkg-config" ,pkg-config))) |
| 115 | (inputs |
| 116 | `(("avogadrolibs" ,avogadrolibs) |
| 117 | ("hdf5" ,hdf5) |
| 118 | ("molequeue" ,molequeue) |
| 119 | ("qtbase" ,qtbase))) |
| 120 | ;; TODO: Enable tests with "-DENABLE_TESTING" configure flag. |
| 121 | (arguments |
| 122 | '(#:tests? #f)) |
| 123 | (home-page "https://www.openchemistry.org/projects/avogadro2/") |
| 124 | (synopsis "Advanced molecule editor") |
| 125 | (description |
| 126 | "Avogadro 2 is an advanced molecule editor and visualizer designed for use |
| 127 | in computational chemistry, molecular modeling, bioinformatics, materials |
| 128 | science, and related areas. It offers flexible high quality rendering and a |
| 129 | powerful plugin architecture.") |
| 130 | (license license:bsd-3))) |
| 131 | |
| 132 | (define-public domainfinder |
| 133 | (package |
| 134 | (name "domainfinder") |
| 135 | (version "2.0.5") |
| 136 | (source |
| 137 | (origin |
| 138 | (method url-fetch) |
| 139 | (uri (string-append "https://bitbucket.org/khinsen/" |
| 140 | "domainfinder/downloads/DomainFinder-" |
| 141 | version ".tar.gz")) |
| 142 | (sha256 |
| 143 | (base32 |
| 144 | "1z26lsyf7xwnzwjvimmbla7ckipx6p734w7y0jk2a2fzci8fkdcr")))) |
| 145 | (build-system python-build-system) |
| 146 | (inputs |
| 147 | `(("python-mmtk" ,python2-mmtk))) |
| 148 | (arguments |
| 149 | `(#:python ,python-2 |
| 150 | ;; No test suite |
| 151 | #:tests? #f)) |
| 152 | (home-page "http://dirac.cnrs-orleans.fr/DomainFinder.html") |
| 153 | (synopsis "Analysis of dynamical domains in proteins") |
| 154 | (description "DomainFinder is an interactive program for the determination |
| 155 | and characterization of dynamical domains in proteins. It can infer dynamical |
| 156 | domains by comparing two protein structures, or from normal mode analysis on a |
| 157 | single structure. The software is currently not actively maintained and works |
| 158 | only with Python 2 and NumPy < 1.9.") |
| 159 | (license license:cecill-c))) |
| 160 | |
| 161 | (define-public inchi |
| 162 | (package |
| 163 | (name "inchi") |
| 164 | ;; Update the inchi-doc native input when updating inchi. |
| 165 | (version "1.06") |
| 166 | (source (origin |
| 167 | (method url-fetch) |
| 168 | (uri (string-append "https://www.inchi-trust.org/download/" |
| 169 | (string-join (string-split version #\.) "") |
| 170 | "/INCHI-1-SRC.zip")) |
| 171 | (sha256 |
| 172 | (base32 |
| 173 | "1zbygqn0443p0gxwr4kx3m1bkqaj8x9hrpch3s41py7jq08f6x28")) |
| 174 | (file-name (string-append name "-" version ".zip")))) |
| 175 | (build-system gnu-build-system) |
| 176 | (arguments |
| 177 | '(#:tests? #f ; no check target |
| 178 | #:phases |
| 179 | (modify-phases %standard-phases |
| 180 | (delete 'configure) ; no configure script |
| 181 | (add-before 'build 'chdir-to-build-directory |
| 182 | (lambda _ (chdir "INCHI_EXE/inchi-1/gcc") #t)) |
| 183 | (add-after 'build 'build-library |
| 184 | (lambda _ |
| 185 | (chdir "../../../INCHI_API/libinchi/gcc") |
| 186 | (invoke "make"))) |
| 187 | (replace 'install |
| 188 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 189 | (let* ((out (assoc-ref outputs "out")) |
| 190 | (bin (string-append out "/bin")) |
| 191 | (doc (string-append out "/share/doc/inchi")) |
| 192 | (include-dir (string-append out "/include/inchi")) |
| 193 | (lib (string-append out "/lib/inchi")) |
| 194 | (inchi-doc (assoc-ref inputs "inchi-doc")) |
| 195 | (unzip (string-append (assoc-ref inputs "unzip") |
| 196 | "/bin/unzip"))) |
| 197 | (chdir "../../..") |
| 198 | ;; Install binary. |
| 199 | (with-directory-excursion "INCHI_EXE/bin/Linux" |
| 200 | (rename-file "inchi-1" "inchi") |
| 201 | (install-file "inchi" bin)) |
| 202 | ;; Install libraries. |
| 203 | (with-directory-excursion "INCHI_API/bin/Linux" |
| 204 | (for-each (lambda (file) |
| 205 | (install-file file lib)) |
| 206 | (find-files "." "libinchi\\.so\\.1\\.*"))) |
| 207 | ;; Install header files. |
| 208 | (with-directory-excursion "INCHI_BASE/src" |
| 209 | (for-each (lambda (file) |
| 210 | (install-file file include-dir)) |
| 211 | (find-files "." "\\.h$"))) |
| 212 | ;; Install documentation. |
| 213 | (mkdir-p doc) |
| 214 | (invoke unzip "-j" "-d" doc inchi-doc) |
| 215 | #t)))))) |
| 216 | (native-inputs |
| 217 | `(("unzip" ,unzip) |
| 218 | ("inchi-doc" |
| 219 | ,(origin |
| 220 | (method url-fetch) |
| 221 | (uri (string-append "http://www.inchi-trust.org/download/" |
| 222 | (string-join (string-split version #\.) "") |
| 223 | "/INCHI-1-DOC.zip")) |
| 224 | (sha256 |
| 225 | (base32 |
| 226 | "1kyda09i9p89xfq90ninwi7w13k1w3ljpl4gqdhpfhi5g8fgxx7f")) |
| 227 | (file-name (string-append name "-" version ".zip")))))) |
| 228 | (home-page "https://www.inchi-trust.org") |
| 229 | (synopsis "Utility for manipulating machine-readable chemical structures") |
| 230 | (description |
| 231 | "The @dfn{InChI} (IUPAC International Chemical Identifier) algorithm turns |
| 232 | chemical structures into machine-readable strings of information. InChIs are |
| 233 | unique to the compound they describe and can encode absolute stereochemistry |
| 234 | making chemicals and chemistry machine-readable and discoverable. A simple |
| 235 | analogy is that InChI is the bar-code for chemistry and chemical structures.") |
| 236 | (license (license:non-copyleft |
| 237 | "file://LICENCE" |
| 238 | "See LICENCE in the distribution.")))) |
| 239 | |
| 240 | (define-public libmsym |
| 241 | (package |
| 242 | (name "libmsym") |
| 243 | (version "0.2.3") |
| 244 | (source |
| 245 | (origin |
| 246 | (method git-fetch) |
| 247 | (uri (git-reference |
| 248 | (url "https://github.com/mcodev31/libmsym") |
| 249 | (commit (string-append "v" version)))) |
| 250 | (sha256 |
| 251 | (base32 |
| 252 | "0a9j28irdsr461qpzlc9z1yjyb9kp64fh5zw7ylspc9zn3189qwk")) |
| 253 | (file-name (git-file-name name version)))) |
| 254 | (build-system cmake-build-system) |
| 255 | (arguments |
| 256 | '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON") |
| 257 | #:tests? #f)) ; no check target |
| 258 | (home-page "https://github.com/mcodev31/libmsym") |
| 259 | (synopsis "C library dealing with point group symmetry in molecules") |
| 260 | (description "libmsym is a C library dealing with point group symmetry in |
| 261 | molecules.") |
| 262 | (license license:expat))) |
| 263 | |
| 264 | (define-public mmtf-cpp |
| 265 | (package |
| 266 | (name "mmtf-cpp") |
| 267 | (version "1.0.0") |
| 268 | (source |
| 269 | (origin |
| 270 | (method git-fetch) |
| 271 | (uri (git-reference |
| 272 | (url "https://github.com/rcsb/mmtf-cpp") |
| 273 | (commit (string-append "v" version)))) |
| 274 | (file-name (git-file-name name version)) |
| 275 | (sha256 |
| 276 | (base32 |
| 277 | "17ylramda69plf5w0v5hxbl4ggkdi5s15z55cv0pljl12yvyva8l")))) |
| 278 | (build-system cmake-build-system) |
| 279 | ;; Tests require the soon-to-be-deprecated version 1 of the catch-framework. |
| 280 | (arguments |
| 281 | '(#:tests? #f)) |
| 282 | (home-page "https://mmtf.rcsb.org/") |
| 283 | (synopsis "C++ API for the Macromolecular Transmission Format") |
| 284 | (description "This package is a library for the |
| 285 | @acronym{MMTF,macromolecular transmission format}, a binary encoding of |
| 286 | biological structures.") |
| 287 | (license license:expat))) |
| 288 | |
| 289 | (define-public molequeue |
| 290 | (package |
| 291 | (name "molequeue") |
| 292 | (version "0.9.0") |
| 293 | (source |
| 294 | (origin |
| 295 | (method url-fetch) |
| 296 | (uri (string-append "https://github.com/OpenChemistry/molequeue/" |
| 297 | "releases/download/" version "/molequeue-" |
| 298 | version ".tar.bz2")) |
| 299 | (sha256 |
| 300 | (base32 |
| 301 | "1w1fgxzqrb5yxvpmnc3c9ymnvixy0z1nfafkd9whg9zw8nbgl998")))) |
| 302 | (build-system cmake-build-system) |
| 303 | (inputs |
| 304 | `(("qtbase" ,qtbase))) |
| 305 | (arguments |
| 306 | '(#:configure-flags '("-DENABLE_TESTING=ON") |
| 307 | #:phases |
| 308 | (modify-phases %standard-phases |
| 309 | (add-after 'unpack 'patch-tests |
| 310 | (lambda _ |
| 311 | ;; TODO: Fix/enable the failing message and clientserver tests. |
| 312 | ;; In the message test, the floating-point value "5.36893473232" on |
| 313 | ;; line 165 of molequeue/app/testing/messagetest.cpp should |
| 314 | ;; (apparently) be truncated, but it is not. |
| 315 | (substitute* "molequeue/app/testing/messagetest.cpp" |
| 316 | (("5\\.36893473232") "5.36893")) |
| 317 | ;; It is unclear why the clientserver test fails, so it is |
| 318 | ;; completely disabled. |
| 319 | (substitute* "molequeue/app/testing/CMakeLists.txt" |
| 320 | ((".*clientserver.*") "")) |
| 321 | #t)) |
| 322 | (add-before 'check 'set-display |
| 323 | (lambda _ |
| 324 | ;; Make Qt render "offscreen" for the sake of tests. |
| 325 | (setenv "QT_QPA_PLATFORM" "offscreen") |
| 326 | #t))))) |
| 327 | (home-page "https://www.openchemistry.org/projects/molequeue/") |
| 328 | (synopsis "Application for coordinating computational jobs") |
| 329 | (description "MoleQueue is a system-tray resident desktop application for |
| 330 | abstracting, managing, and coordinating the execution of tasks both locally and |
| 331 | on remote computational resources. Users can set up local and remote queues |
| 332 | that describe where the task will be executed. Each queue can have programs, |
| 333 | with templates to facilitate the execution of the program. Input files can be |
| 334 | staged, and output files collected using a standard interface.") |
| 335 | (license license:bsd-3))) |
| 336 | |
| 337 | (define with-numpy-1.8 |
| 338 | (package-input-rewriting `((,python2-numpy . ,python2-numpy-1.8)))) |
| 339 | |
| 340 | (define-public nmoldyn |
| 341 | (package |
| 342 | (name "nmoldyn") |
| 343 | (version "3.0.11") |
| 344 | (source |
| 345 | (origin |
| 346 | (method git-fetch) |
| 347 | (uri (git-reference |
| 348 | (url "https://github.com/khinsen/nMOLDYN3") |
| 349 | (commit (string-append "v" version)))) |
| 350 | (file-name (git-file-name name version)) |
| 351 | (sha256 |
| 352 | (base32 |
| 353 | "016h4bqg419p6s7bcx55q5iik91gqmk26hbnfgj2j6zl0j36w51r")))) |
| 354 | (build-system python-build-system) |
| 355 | (inputs |
| 356 | `(("python-matplotlib" ,(with-numpy-1.8 python2-matplotlib)) |
| 357 | ("python-scientific" ,python2-scientific) |
| 358 | ("netcdf" ,netcdf) |
| 359 | ("gv" ,gv))) |
| 360 | (propagated-inputs |
| 361 | `(("python-mmtk" ,python2-mmtk))) |
| 362 | (arguments |
| 363 | `(#:python ,python-2 |
| 364 | #:tests? #f ; No test suite |
| 365 | #:phases |
| 366 | (modify-phases %standard-phases |
| 367 | (add-before 'build 'create-linux2-directory |
| 368 | (lambda _ |
| 369 | (mkdir-p "nMOLDYN/linux2"))) |
| 370 | (add-before 'build 'change-PDF-viewer |
| 371 | (lambda* (#:key inputs #:allow-other-keys) |
| 372 | (substitute* "nMOLDYN/Preferences.py" |
| 373 | ;; Set the paths for external executables, substituting |
| 374 | ;; gv for acroread. |
| 375 | ;; There is also vmd_path, but VMD is not free software |
| 376 | ;; and Guix contains currently no free molecular viewer that |
| 377 | ;; could be substituted. |
| 378 | (("PREFERENCES\\['acroread_path'\\] = ''") |
| 379 | (format #f "PREFERENCES['acroread_path'] = '~a'" |
| 380 | (which "gv"))) |
| 381 | (("PREFERENCES\\['ncdump_path'\\] = ''") |
| 382 | (format #f "PREFERENCES['ncdump_path'] = '~a'" |
| 383 | (which "ncdump"))) |
| 384 | (("PREFERENCES\\['ncgen_path'\\] = ''") |
| 385 | (format #f "PREFERENCES['ncgen_path'] = '~a'" |
| 386 | (which "ncgen3"))) |
| 387 | (("PREFERENCES\\['task_manager_path'\\] = ''") |
| 388 | (format #f "PREFERENCES['task_manager_path'] = '~a'" |
| 389 | (which "task_manager"))) |
| 390 | ;; Show documentation as PDF |
| 391 | (("PREFERENCES\\['documentation_style'\\] = 'html'") |
| 392 | "PREFERENCES['documentation_style'] = 'pdf'") )))))) |
| 393 | (home-page "http://dirac.cnrs-orleans.fr/nMOLDYN.html") |
| 394 | (synopsis "Analysis software for Molecular Dynamics trajectories") |
| 395 | (description "nMOLDYN is an interactive analysis program for Molecular Dynamics |
| 396 | simulations. It is especially designed for the computation and decomposition of |
| 397 | neutron scattering spectra, but also computes other quantities. The software |
| 398 | is currently not actively maintained and works only with Python 2 and |
| 399 | NumPy < 1.9.") |
| 400 | (license license:cecill))) |
| 401 | |
| 402 | (define-public tng |
| 403 | (package |
| 404 | (name "tng") |
| 405 | (version "1.8.2") |
| 406 | (source (origin |
| 407 | (method git-fetch) |
| 408 | (uri (git-reference |
| 409 | (url "https://github.com/gromacs/tng") |
| 410 | (commit (string-append "v" version)))) |
| 411 | (file-name (git-file-name name version)) |
| 412 | (sha256 |
| 413 | (base32 |
| 414 | "1apf2n8nb34z09xarj7k4jgriq283l769sakjmj5aalpbilvai4q")))) |
| 415 | (build-system cmake-build-system) |
| 416 | (inputs |
| 417 | `(("zlib" ,zlib))) |
| 418 | (arguments |
| 419 | `(#:phases |
| 420 | (modify-phases %standard-phases |
| 421 | (add-after 'unpack 'remove-bundled-zlib |
| 422 | (lambda _ |
| 423 | (delete-file-recursively "external") |
| 424 | #t)) |
| 425 | (replace 'check |
| 426 | (lambda _ |
| 427 | (invoke "../build/bin/tests/tng_testing") |
| 428 | #t))))) |
| 429 | (home-page "https://github.com/gromacs/tng") |
| 430 | (synopsis "Trajectory Next Generation binary format manipulation library") |
| 431 | (description "TRAJNG (Trajectory next generation) is a program library for |
| 432 | handling molecular dynamics (MD) trajectories. It can store coordinates, and |
| 433 | optionally velocities and the H-matrix. Coordinates and velocities are |
| 434 | stored with user-specified precision.") |
| 435 | (license license:bsd-3))) |
| 436 | |
| 437 | (define-public gromacs |
| 438 | (package |
| 439 | (name "gromacs") |
| 440 | (version "2020.2") |
| 441 | (source (origin |
| 442 | (method url-fetch) |
| 443 | (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-" |
| 444 | version ".tar.gz")) |
| 445 | (sha256 |
| 446 | (base32 |
| 447 | "1wyjgcdl30wy4hy6jvi9lkq53bqs9fgfq6fri52dhnb3c76y8rbl")) |
| 448 | ;; Our version of tinyxml2 is far newer than the bundled one and |
| 449 | ;; require fixing `testutils' code. See patch header for more info |
| 450 | (patches (search-patches "gromacs-tinyxml2.patch")))) |
| 451 | (build-system cmake-build-system) |
| 452 | (arguments |
| 453 | `(#:configure-flags |
| 454 | (list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests |
| 455 | ;; Unbundling |
| 456 | "-DGMX_USE_LMFIT=EXTERNAL" |
| 457 | "-DGMX_BUILD_OWN_FFTW=off" |
| 458 | "-DGMX_EXTERNAL_BLAS=on" |
| 459 | "-DGMX_EXTERNAL_LAPACK=on" |
| 460 | "-DGMX_EXTERNAL_TNG=on" |
| 461 | "-DGMX_EXTERNAL_ZLIB=on" |
| 462 | "-DGMX_EXTERNAL_TINYXML2=on" |
| 463 | (string-append "-DTinyXML2_DIR=" |
| 464 | (assoc-ref %build-inputs "tinyxml2")) |
| 465 | ;; Workaround for cmake/FindSphinx.cmake version parsing that does |
| 466 | ;; not understand the guix-wrapped `sphinx-build --version' answer |
| 467 | (string-append "-DSPHINX_EXECUTABLE_VERSION=" |
| 468 | ,(package-version python-sphinx))) |
| 469 | #:phases |
| 470 | (modify-phases %standard-phases |
| 471 | (add-after 'unpack 'fixes |
| 472 | (lambda* (#:key inputs #:allow-other-keys) |
| 473 | ;; Still bundled: part of gromacs, source behind registration |
| 474 | ;; but free software anyways |
| 475 | ;;(delete-file-recursively "src/external/vmd_molfile") |
| 476 | ;; Still bundled: threads-based OpenMPI-compatible fallback |
| 477 | ;; designed to be bundled like that |
| 478 | ;;(delete-file-recursively "src/external/thread_mpi") |
| 479 | ;; Unbundling |
| 480 | (delete-file-recursively "src/external/lmfit") |
| 481 | (delete-file-recursively "src/external/clFFT") |
| 482 | (delete-file-recursively "src/external/fftpack") |
| 483 | (delete-file-recursively "src/external/build-fftw") |
| 484 | (delete-file-recursively "src/external/tng_io") |
| 485 | (delete-file-recursively "src/external/tinyxml2") |
| 486 | (delete-file-recursively "src/external/googletest") |
| 487 | (copy-recursively (assoc-ref inputs "googletest-source") |
| 488 | "src/external/googletest") |
| 489 | ;; This test warns about the build host hardware, disable |
| 490 | (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp" |
| 491 | (("TEST\\(HardwareTopologyTest, HwlocExecute\\)") |
| 492 | "void __guix_disabled()")) |
| 493 | #t))))) |
| 494 | (native-inputs |
| 495 | `(("doxygen" ,doxygen) |
| 496 | ("googletest-source" ,(package-source googletest)) |
| 497 | ("graphviz" ,graphviz) |
| 498 | ("pkg-config" ,pkg-config) |
| 499 | ("python" ,python) |
| 500 | ("python-pygments" ,python-pygments) |
| 501 | ("python-sphinx" ,python-sphinx))) |
| 502 | (inputs |
| 503 | `(("fftwf" ,fftwf) |
| 504 | ("hwloc" ,hwloc-2 "lib") |
| 505 | ("lmfit" ,lmfit) |
| 506 | ("openblas" ,openblas) |
| 507 | ("perl" ,perl) |
| 508 | ("tinyxml2" ,tinyxml2) |
| 509 | ("tng" ,tng))) |
| 510 | (home-page "http://www.gromacs.org/") |
| 511 | (synopsis "Molecular dynamics software package") |
| 512 | (description "GROMACS is a versatile package to perform molecular dynamics, |
| 513 | i.e. simulate the Newtonian equations of motion for systems with hundreds to |
| 514 | millions of particles. It is primarily designed for biochemical molecules like |
| 515 | proteins, lipids and nucleic acids that have a lot of complicated bonded |
| 516 | interactions, but since GROMACS is extremely fast at calculating the nonbonded |
| 517 | interactions (that usually dominate simulations) many groups are also using it |
| 518 | for research on non-biological systems, e.g. polymers. GROMACS supports all the |
| 519 | usual algorithms you expect from a modern molecular dynamics implementation.") |
| 520 | (license license:lgpl2.1+))) |
| 521 | |
| 522 | (define-public openbabel |
| 523 | (package |
| 524 | (name "openbabel") |
| 525 | (version "3.1.1") |
| 526 | (source (origin |
| 527 | (method url-fetch) |
| 528 | (uri (string-append "https://github.com/openbabel/openbabel/" |
| 529 | "releases/download/openbabel-" |
| 530 | (string-replace-substring version "." "-") |
| 531 | "/openbabel-" version "-source.tar.bz2")) |
| 532 | (sha256 |
| 533 | (base32 |
| 534 | "0s0f4zib8vshfaywsr5bjjz55jwsg6yiz2qw4i5jm8wysn0q7v56")))) |
| 535 | (build-system cmake-build-system) |
| 536 | (arguments |
| 537 | `(;; FIXME: Disable tests on i686 to work around |
| 538 | ;; https://github.com/openbabel/openbabel/issues/2041. |
| 539 | #:tests? ,(or (%current-target-system) |
| 540 | (not (string=? "i686-linux" (%current-system)))) |
| 541 | #:configure-flags |
| 542 | (list "-DOPENBABEL_USE_SYSTEM_INCHI=ON" |
| 543 | (string-append "-DINCHI_LIBRARY=" |
| 544 | (assoc-ref %build-inputs "inchi") |
| 545 | "/lib/inchi/libinchi.so.1") |
| 546 | (string-append "-DINCHI_INCLUDE_DIR=" |
| 547 | (assoc-ref %build-inputs "inchi") "/include/inchi")) |
| 548 | #:test-target "test")) |
| 549 | (native-inputs |
| 550 | `(("pkg-config" ,pkg-config))) |
| 551 | (inputs |
| 552 | `(("eigen" ,eigen) |
| 553 | ("inchi" ,inchi) |
| 554 | ("libxml2" ,libxml2) |
| 555 | ("zlib" ,zlib))) |
| 556 | (home-page "http://openbabel.org/wiki/Main_Page") |
| 557 | (synopsis "Chemistry data manipulation toolbox") |
| 558 | (description |
| 559 | "Open Babel is a chemical toolbox designed to speak the many languages of |
| 560 | chemical data. It's a collaborative project allowing anyone to search, convert, |
| 561 | analyze, or store data from molecular modeling, chemistry, solid-state |
| 562 | materials, biochemistry, or related areas.") |
| 563 | (license license:gpl2))) |
| 564 | |
| 565 | (define-public spglib |
| 566 | (package |
| 567 | (name "spglib") |
| 568 | (version "1.16.0") |
| 569 | (source |
| 570 | (origin |
| 571 | (method git-fetch) |
| 572 | (uri (git-reference |
| 573 | (url "https://github.com/spglib/spglib") |
| 574 | (commit (string-append "v" version)))) |
| 575 | (sha256 |
| 576 | (base32 "1kzc956m1pnazhz52vspqridlw72wd8x5l3dsilpdxl491aa2nws")) |
| 577 | (file-name (git-file-name name version)))) |
| 578 | (build-system cmake-build-system) |
| 579 | (arguments |
| 580 | '(#:test-target "check" |
| 581 | #:phases |
| 582 | (modify-phases %standard-phases |
| 583 | (add-after 'unpack 'patch-header-install-dir |
| 584 | (lambda _ |
| 585 | ;; As of the writing of this package, CMake and GNU build systems |
| 586 | ;; install the header to two different location. This patch makes |
| 587 | ;; the CMake build system's choice of header directory compatible |
| 588 | ;; with the GNU build system's choice and with what avogadrolibs |
| 589 | ;; expects. |
| 590 | ;; See https://github.com/spglib/spglib/issues/75 and the relevant |
| 591 | ;; part of https://github.com/OpenChemistry/avogadroapp/issues/97. |
| 592 | (substitute* "CMakeLists.txt" |
| 593 | (("\\$\\{CMAKE_INSTALL_INCLUDEDIR\\}" include-dir) |
| 594 | (string-append include-dir "/spglib"))) |
| 595 | #t))))) |
| 596 | (home-page "https://spglib.github.io/spglib/index.html") |
| 597 | (synopsis "Library for crystal symmetry search") |
| 598 | (description "Spglib is a library for finding and handling crystal |
| 599 | symmetries written in C. Spglib can be used to: |
| 600 | |
| 601 | @enumerate |
| 602 | @item Find symmetry operations |
| 603 | @item Identify space-group type |
| 604 | @item Wyckoff position assignment |
| 605 | @item Refine crystal structure |
| 606 | @item Find a primitive cell |
| 607 | @item Search irreducible k-points |
| 608 | @end enumerate") |
| 609 | (license license:bsd-3))) |