summaryrefslogtreecommitdiff
path: root/gnu/packages/chemistry.scm
diff options
context:
space:
mode:
authorKonrad Hinsen <konrad.hinsen@fastmail.net>2018-01-05 17:14:24 +0100
committerLeo Famulari <leo@famulari.name>2018-01-05 16:19:09 -0500
commitf250a868d8c687df08559682fa68fb4ea2a1ea69 (patch)
tree5fa63eca7ed53599b6d53647de9439d79c2616ec /gnu/packages/chemistry.scm
parent73114e30cb46182f3dbc56cd6e142f3af19a12c3 (diff)
downloadguix-patches-f250a868d8c687df08559682fa68fb4ea2a1ea69.tar
guix-patches-f250a868d8c687df08559682fa68fb4ea2a1ea69.tar.gz
gnu: Add nmoldyn.
* gnu/packages/chemistry.scm (nmoldyn): New variable. Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu/packages/chemistry.scm')
-rw-r--r--gnu/packages/chemistry.scm66
1 files changed, 66 insertions, 0 deletions
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 0cd1585e92..ed883072b4 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -20,6 +20,8 @@
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
+ #:use-module (gnu packages gv)
+ #:use-module (gnu packages maths)
#:use-module (gnu packages python)
#:use-module (guix build-system python))
@@ -51,3 +53,67 @@ domains by comparing two protein structures, or from normal mode analysis on a
single structure. The software is currently not actively maintained and works
only with Python 2 and NumPy < 1.9.")
(license license:cecill-c)))
+
+(define with-numpy-1.8
+ (package-input-rewriting `((,python2-numpy . ,python2-numpy-1.8))))
+
+(define-public nmoldyn
+ (package
+ (name "nmoldyn")
+ (version "3.0.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://bitbucket.org/khinsen/"
+ "nmoldyn3/downloads/nMOLDYN-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1mvmz3lkr217kdrd8cvdr1d82y58wp1403c9rnd943mijgq8xb5a"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-matplotlib" ,(with-numpy-1.8 python2-matplotlib))
+ ("python-scientific", python2-scientific)
+ ("netcdf", netcdf)
+ ("gv" ,gv)))
+ (propagated-inputs
+ `(("python-mmtk" ,python2-mmtk)))
+ (arguments
+ `(#:python ,python-2
+ #:tests? #f ; No test suite
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'create-linux2-directory
+ (lambda _
+ (mkdir-p "nMOLDYN/linux2")))
+ (add-before 'build 'change-PDF-viewer
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "nMOLDYN/Preferences.py"
+ ;; Set the paths for external executables, substituting
+ ;; gv for acroread.
+ ;; There is also vmd_path, but VMD is not free software
+ ;; and Guix contains currently no free molecular viewer that
+ ;; could be substituted.
+ (("PREFERENCES\\['acroread_path'\\] = ''")
+ (format "PREFERENCES['acroread_path'] = '~a'"
+ (which "gv")))
+ (("PREFERENCES\\['ncdump_path'\\] = ''")
+ (format "PREFERENCES['ncdump_path'] = '~a'"
+ (which "ncdump")))
+ (("PREFERENCES\\['ncgen_path'\\] = ''")
+ (format "PREFERENCES['ncgen_path'] = '~a'"
+ (which "ncgen3")))
+ (("PREFERENCES\\['task_manager_path'\\] = ''")
+ (format "PREFERENCES['task_manager_path'] = '~a'"
+ (which "task_manager")))
+ ;; Show documentation as PDF
+ (("PREFERENCES\\['documentation_style'\\] = 'html'")
+ "PREFERENCES['documentation_style'] = 'pdf'") ))))))
+ (home-page "http://dirac.cnrs-orleans.fr/nMOLDYN/")
+ (synopsis "Analysis software for Molecular Dynamics trajectories")
+ (description "nMOLDYN is an interactive analysis program for Molecular Dynamics
+simulations. It is especially designed for the computation and decomposition of
+neutron scattering spectra, but also computes other quantities. The software
+is currently not actively maintained and works only with Python 2 and
+NumPy < 1.9.")
+ (license license:cecill)))