all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#29994] [PATCH 2/2] gnu: Add nmoldyn.
@ 2018-01-05 16:14 Konrad Hinsen
  2018-01-05 21:21 ` bug#29994: " Leo Famulari
  0 siblings, 1 reply; 2+ messages in thread
From: Konrad Hinsen @ 2018-01-05 16:14 UTC (permalink / raw)
  To: 29994

* gnu/packages/chemistry.scm (nmoldyn): New variable.
---
 gnu/packages/chemistry.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 871d6f668..9e60ade4d 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))
 
@@ -52,3 +54,68 @@ 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"))
+       (file-name (string-append "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)))
-- 
2.14.3 (Apple Git-98)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#29994: [PATCH 2/2] gnu: Add nmoldyn.
  2018-01-05 16:14 [bug#29994] [PATCH 2/2] gnu: Add nmoldyn Konrad Hinsen
@ 2018-01-05 21:21 ` Leo Famulari
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Famulari @ 2018-01-05 21:21 UTC (permalink / raw)
  To: Konrad Hinsen; +Cc: 29994-done

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

On Fri, Jan 05, 2018 at 05:14:24PM +0100, Konrad Hinsen wrote:
> * gnu/packages/chemistry.scm (nmoldyn): New variable.

> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://bitbucket.org/khinsen/"
> +                           "nmoldyn3/downloads/nMOLDYN-"
> +                           version ".tar.gz"))
> +       (file-name (string-append "nMOLDYN-" version ".tar.gz"))

As with domainfinder, I removed file-name.

Pushed as f250a868d8c687df08559682fa68fb4ea2a1ea69

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-05 21:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-05 16:14 [bug#29994] [PATCH 2/2] gnu: Add nmoldyn Konrad Hinsen
2018-01-05 21:21 ` bug#29994: " Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.