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