all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#40691] [PATCH 0/1] gnu: Add gromacs.
@ 2020-04-17 22:22 Vincent Legoll
  2020-04-17 22:24 ` [bug#40691] [PATCH] " Vincent Legoll
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-04-17 22:22 UTC (permalink / raw)
  To: 40691

Hello,

following this is a patch to add gromacs.

Description & synopsis taken from nix (hello Tobias)

Linted, indent-code.el passed, and built OK with 2 rounds.

Not sure if we want more cmake flags.

problems reported by cmake:

-- Found Doxygen: 
/gnu/store/k6albjaxkybsgshqyw6g44f5hz75l7q6-doxygen-1.8.15/bin/doxygen 
(found version "1.8.15") found components:  doxygen missing components:  dot

-- Could NOT find Sphinx: Found unsuitable version "-real 2.3.1", but 
required is at least "1.6.1" (found 
/gnu/store/anyhb84x3mvyp11sbhmdnicbsa42m3x0-python-sphinx-2.3.1/bin/sphinx-build)

-- 
Vincent Legoll

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

* [bug#40691] [PATCH] gnu: Add gromacs.
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
@ 2020-04-17 22:24 ` Vincent Legoll
  2020-04-17 22:48 ` [bug#40691] gromacs - WIP, submitted Vincent Legoll
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-04-17 22:24 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/bioinformatics.scm (gromacs): New variable.
---
 gnu/packages/bioinformatics.scm | 39 +++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index b9be0c1918..f0fca30dd8 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -785,6 +786,44 @@ input/output delimiter.  When the new functionality is not used, bioawk is
 intended to behave exactly the same as the original BWK awk.")
     (license license:x11)))
 
+(define-public gromacs
+  (package
+    (name "gromacs")
+    (version "2020.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1kwrk3i1dxp8abhqqsl049lh361n4910h0415g052f8shdc6arp1"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "-DGMX_DEVELOPER_BUILD=on")))
+    (native-inputs
+     `(("doxygen" ,doxygen) ; need dot
+       ("python-sphinx" ,python-sphinx))) ; problem reported by cmake
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("hwloc" ,hwloc-2 "lib")
+       ("imagemagick" ,imagemagick)
+       ("lapack" ,lapack)
+       ("openblas" ,openblas)
+       ("openmpi" ,openmpi)
+       ("perl" ,perl)))
+    (home-page "http://www.gromacs.org/")
+    (synopsis "Molecular dynamics software package")
+    (description "GROMACS is a versatile package to perform molecular dynamics,
+i.e. simulate the Newtonian equations of motion for systems with hundreds to
+millions of particles.  It is primarily designed for biochemical molecules like
+proteins, lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the nonbonded
+interactions (that usually dominate simulations) many groups are also using it
+for research on non-biological systems, e.g. polymers.  GROMACS supports all the
+usual algorithms you expect from a modern molecular dynamics implementation.")
+    (license license:lgpl2.1+)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
-- 
2.26.0

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

* [bug#40691] gromacs - WIP, submitted
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
  2020-04-17 22:24 ` [bug#40691] [PATCH] " Vincent Legoll
@ 2020-04-17 22:48 ` Vincent Legoll
  2020-04-19 22:19 ` [bug#40691] [PATCH 0/1] gnu: Add gromacs Ludovic Courtès
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-04-17 22:48 UTC (permalink / raw)
  To: 40691

And now I see I've copy/pasted the fftwf input when
I probably should have put one of the other fftws...

WDYT ?

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

* [bug#40691] [PATCH 0/1] gnu: Add gromacs.
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
  2020-04-17 22:24 ` [bug#40691] [PATCH] " Vincent Legoll
  2020-04-17 22:48 ` [bug#40691] gromacs - WIP, submitted Vincent Legoll
@ 2020-04-19 22:19 ` Ludovic Courtès
  2020-04-20 22:15   ` [bug#40691] [PATCH v2 1/1] " Vincent Legoll
  2020-05-02 13:48 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2020-04-19 22:19 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Hi Vincent,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> following this is a patch to add gromacs.
>
> Description & synopsis taken from nix (hello Tobias)

Heheh.  :-)

> Not sure if we want more cmake flags.

Could you add a comment explaining the reason for this flag?

> problems reported by cmake:
>
> -- Found Doxygen:
> /gnu/store/k6albjaxkybsgshqyw6g44f5hz75l7q6-doxygen-1.8.15/bin/doxygen
> (found version "1.8.15") found components:  doxygen missing
> components:  dot

Perhaps add ‘graphviz’ as a native input?

> -- Could NOT find Sphinx: Found unsuitable version "-real 2.3.1", but
> required is at least "1.6.1" (found
> /gnu/store/anyhb84x3mvyp11sbhmdnicbsa42m3x0-python-sphinx-2.3.1/bin/sphinx-build)

Oh, looks like it’s looking at argv[0] and the script is wrapped.  :-/
Can you somehow for CMake to think it’s fine, either with a flag or by
skipping the relevant check in ‘CMakeLists.txt’?

Thanks,
Ludo’.

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

* [bug#40691] [PATCH v2 1/1] gnu: Add gromacs.
  2020-04-19 22:19 ` [bug#40691] [PATCH 0/1] gnu: Add gromacs Ludovic Courtès
@ 2020-04-20 22:15   ` Vincent Legoll
  2020-04-22 15:38     ` Ludovic Courtès
  0 siblings, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-04-20 22:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 40691

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

Hello,

On 20/04/2020 00:19, Ludovic Courtès wrote:
> Could you add a comment explaining the reason for this flag?

Done, it'to build test executables.

>> problems reported by cmake:
>>
>> -- Found Doxygen:
>> /gnu/store/k6albjaxkybsgshqyw6g44f5hz75l7q6-doxygen-1.8.15/bin/doxygen
>> (found version "1.8.15") found components:  doxygen missing
>> components:  dot
> 
> Perhaps add ‘graphviz’ as a native input?

Yep, that fixed it

>> -- Could NOT find Sphinx: Found unsuitable version "-real 2.3.1", but
>> required is at least "1.6.1" (found
>> /gnu/store/anyhb84x3mvyp11sbhmdnicbsa42m3x0-python-sphinx-2.3.1/bin/sphinx-build)
> 
> Oh, looks like it’s looking at argv[0] and the script is wrapped.  :-/
> Can you somehow for CMake to think it’s fine, either with a flag or by
> skipping the relevant check in ‘CMakeLists.txt’?

Done, passing the version to cmake & adding pygments to inputs made it
pass.

Thanks for the help

How's the attached v2 ?

-- 
Vincent Legoll



[-- Attachment #2: 0001-gnu-Add-gromacs.patch --]
[-- Type: text/x-patch, Size: 3443 bytes --]

From 650247f97a56f2967d068ee8b1911fae6412ce4d Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Sat, 18 Apr 2020 00:14:56 +0200
Subject: [PATCH] gnu: Add gromacs.

* gnu/packages/bioinformatics.scm (gromacs): New variable.
---
 gnu/packages/bioinformatics.scm | 47 +++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index b9be0c1918..1b643e29c8 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -79,6 +80,7 @@
   #:use-module (gnu packages golang)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graph)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
@@ -785,6 +787,51 @@ input/output delimiter.  When the new functionality is not used, bioawk is
 intended to behave exactly the same as the original BWK awk.")
     (license license:x11)))
 
+(define-public gromacs
+  (package
+    (name "gromacs")
+    (version "2020.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1kwrk3i1dxp8abhqqsl049lh361n4910h0415g052f8shdc6arp1"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
+             ;; Workaround for cmake/FindSphinx.cmake version parsing that does
+             ;; not understand the guix-wrapped `sphinx-build --version' answer
+             (string-append "-DSPHINX_EXECUTABLE_VERSION="
+                            ,(package-version python-sphinx)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("python" ,python)
+       ("python-pygments" ,python-pygments)
+       ("python-sphinx" ,python-sphinx)))
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("hwloc" ,hwloc-2 "lib")
+       ("imagemagick" ,imagemagick)
+       ("lapack" ,lapack)
+       ("openblas" ,openblas)
+       ("openmpi" ,openmpi)
+       ("perl" ,perl)))
+    (home-page "http://www.gromacs.org/")
+    (synopsis "Molecular dynamics software package")
+    (description "GROMACS is a versatile package to perform molecular dynamics,
+i.e. simulate the Newtonian equations of motion for systems with hundreds to
+millions of particles.  It is primarily designed for biochemical molecules like
+proteins, lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the nonbonded
+interactions (that usually dominate simulations) many groups are also using it
+for research on non-biological systems, e.g. polymers.  GROMACS supports all the
+usual algorithms you expect from a modern molecular dynamics implementation.")
+    (license license:lgpl2.1+)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
-- 
2.26.0


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

* [bug#40691] [PATCH v2 1/1] gnu: Add gromacs.
  2020-04-20 22:15   ` [bug#40691] [PATCH v2 1/1] " Vincent Legoll
@ 2020-04-22 15:38     ` Ludovic Courtès
  2020-04-23 13:07       ` [bug#40691] [PATCH v3 " Vincent Legoll
  0 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2020-04-22 15:38 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Hi Vincent,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> From 650247f97a56f2967d068ee8b1911fae6412ce4d Mon Sep 17 00:00:00 2001
> From: Vincent Legoll <vincent.legoll@gmail.com>
> Date: Sat, 18 Apr 2020 00:14:56 +0200
> Subject: [PATCH] gnu: Add gromacs.
>
> * gnu/packages/bioinformatics.scm (gromacs): New variable.

This v2 looks alright to me, but I got this test failure on x86_64:

--8<---------------cut here---------------start------------->8---
      Start 13: HardwareUnitTests
13/52 Test #13: HardwareUnitTests ...................***Failed    0.04 sec
[==========] Running 5 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from CpuInfoTest
[ RUN      ] CpuInfoTest.SupportLevel
[       OK ] CpuInfoTest.SupportLevel (0 ms)
[----------] 1 test from CpuInfoTest (0 ms total)

[----------] 4 tests from HardwareTopologyTest
[ RUN      ] HardwareTopologyTest.Execute
[       OK ] HardwareTopologyTest.Execute (6 ms)
[ RUN      ] HardwareTopologyTest.HwlocExecute
/tmp/guix-build-gromacs-2020.1.drv-0/gromacs-2020.1/src/gromacs/hardware/tests/hardwaretopology.cpp:88: Failure
Expected: (hwTop.supportLevel()) >= (gmx::HardwareTopology::SupportLevel::Basic), actual: 4-byte object <01-00 00-00> vs 4-byte object <02-00 00-00>
Cannot determine basic hardware topology from hwloc. GROMACS will still

work, but it might affect your performance for large nodes.
Please mail gmx-developers@gromacs.org so we can try to fix it.
[  FAILED  ] HardwareTopologyTest.HwlocExecute (5 ms)
[ RUN      ] HardwareTopologyTest.ProcessorSelfconsistency
[       OK ] HardwareTopologyTest.ProcessorSelfconsistency (6 ms)
[ RUN      ] HardwareTopologyTest.NumaCacheSelfconsistency
[       OK ] HardwareTopologyTest.NumaCacheSelfconsistency (5 ms)
[----------] 4 tests from HardwareTopologyTest (22 ms total)

[----------] Global test environment tear-down
[==========] 5 tests from 2 test cases ran. (22 ms total)
[  PASSED  ] 4 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] HardwareTopologyTest.HwlocExecute

 1 FAILED TEST

[…]

The following tests FAILED:
         13 - HardwareUnitTests (Failed)
Errors while running CTest
make: *** [Makefile:99: test] Error 8
--8<---------------cut here---------------end--------------->8---

Could you check what the test is doing?

It may be reasonable to just skip it.

Thanks,
Ludo’.

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

* [bug#40691] [PATCH v3 1/1] gnu: Add gromacs.
  2020-04-22 15:38     ` Ludovic Courtès
@ 2020-04-23 13:07       ` Vincent Legoll
  2020-04-23 19:52         ` Ludovic Courtès
  0 siblings, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-04-23 13:07 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 40691

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

On 22/04/2020 17:38, Ludovic Courtès wrote:

> This v2 looks alright to me, but I got this test failure on x86_64:
> 
> --8<---------------cut here---------------start------------->8---
>        Start 13: HardwareUnitTests
> 13/52 Test #13: HardwareUnitTests ...................***Failed    0.04 sec
> [==========] Running 5 tests from 2 test cases.
> [----------] Global test environment set-up.
> [----------] 1 test from CpuInfoTest
> [ RUN      ] CpuInfoTest.SupportLevel
> [       OK ] CpuInfoTest.SupportLevel (0 ms)
> [----------] 1 test from CpuInfoTest (0 ms total)
> 
> [----------] 4 tests from HardwareTopologyTest
> [ RUN      ] HardwareTopologyTest.Execute
> [       OK ] HardwareTopologyTest.Execute (6 ms)
> [ RUN      ] HardwareTopologyTest.HwlocExecute
> /tmp/guix-build-gromacs-2020.1.drv-0/gromacs-2020.1/src/gromacs/hardware/tests/hardwaretopology.cpp:88: Failure
> Expected: (hwTop.supportLevel()) >= (gmx::HardwareTopology::SupportLevel::Basic), actual: 4-byte object <01-00 00-00> vs 4-byte object <02-00 00-00>
> Cannot determine basic hardware topology from hwloc. GROMACS will still
> 
> work, but it might affect your performance for large nodes.
> Please mail gmx-developers@gromacs.org so we can try to fix it.
> [  FAILED  ] HardwareTopologyTest.HwlocExecute (5 ms)
> [ RUN      ] HardwareTopologyTest.ProcessorSelfconsistency
> [       OK ] HardwareTopologyTest.ProcessorSelfconsistency (6 ms)
> [ RUN      ] HardwareTopologyTest.NumaCacheSelfconsistency
> [       OK ] HardwareTopologyTest.NumaCacheSelfconsistency (5 ms)
> [----------] 4 tests from HardwareTopologyTest (22 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 5 tests from 2 test cases ran. (22 ms total)
> [  PASSED  ] 4 tests.
> [  FAILED  ] 1 test, listed below:
> [  FAILED  ] HardwareTopologyTest.HwlocExecute
> 
>   1 FAILED TEST
> 
> […]
> 
> The following tests FAILED:
>           13 - HardwareUnitTests (Failed)
> Errors while running CTest
> make: *** [Makefile:99: test] Error 8
> --8<---------------cut here---------------end--------------->8---
> 
> Could you check what the test is doing?

I think it tries to get CPU topology from the linux kernel,
which is not particularly useful to test on a build server,
the package may run on completely different hardware.

> It may be reasonable to just skip it.

Hope you don't mind trading a test suite failure for a (harmless)
test suite build warning...

How's the crude disabling in the attached patch v3 look to you ?

And does it fix the failure ?
This test is not failing here (kvm on ryzen).

-- 
Vincent Legoll

[-- Attachment #2: 0001-gnu-Add-gromacs.v3.patch --]
[-- Type: text/x-patch, Size: 3840 bytes --]

From 660371d5a3e7c7c763fc123357ddd6c31f730553 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Sat, 18 Apr 2020 00:14:56 +0200
Subject: [PATCH] gnu: Add gromacs.

* gnu/packages/bioinformatics.scm (gromacs): New variable.
---
 gnu/packages/bioinformatics.scm | 56 +++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index b9be0c1918..62647d6146 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -79,6 +80,7 @@
   #:use-module (gnu packages golang)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graph)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
@@ -785,6 +787,60 @@ input/output delimiter.  When the new functionality is not used, bioawk is
 intended to behave exactly the same as the original BWK awk.")
     (license license:x11)))
 
+(define-public gromacs
+  (package
+    (name "gromacs")
+    (version "2020.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1kwrk3i1dxp8abhqqsl049lh361n4910h0415g052f8shdc6arp1"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
+             ;; Workaround for cmake/FindSphinx.cmake version parsing that does
+             ;; not understand the guix-wrapped `sphinx-build --version' answer
+             (string-append "-DSPHINX_EXECUTABLE_VERSION="
+                            ,(package-version python-sphinx)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-hwloc-test
+          (lambda _
+             ;; This test warns about the build host hardware
+             (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
+               (("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
+                "void __guix_disabled()"))
+             #t)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("python" ,python)
+       ("python-pygments" ,python-pygments)
+       ("python-sphinx" ,python-sphinx)))
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("hwloc" ,hwloc-2 "lib")
+       ("imagemagick" ,imagemagick)
+       ("lapack" ,lapack)
+       ("openblas" ,openblas)
+       ("openmpi" ,openmpi)
+       ("perl" ,perl)))
+    (home-page "http://www.gromacs.org/")
+    (synopsis "Molecular dynamics software package")
+    (description "GROMACS is a versatile package to perform molecular dynamics,
+i.e. simulate the Newtonian equations of motion for systems with hundreds to
+millions of particles.  It is primarily designed for biochemical molecules like
+proteins, lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the nonbonded
+interactions (that usually dominate simulations) many groups are also using it
+for research on non-biological systems, e.g. polymers.  GROMACS supports all the
+usual algorithms you expect from a modern molecular dynamics implementation.")
+    (license license:lgpl2.1+)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
-- 
2.26.0


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

* [bug#40691] [PATCH v3 1/1] gnu: Add gromacs.
  2020-04-23 13:07       ` [bug#40691] [PATCH v3 " Vincent Legoll
@ 2020-04-23 19:52         ` Ludovic Courtès
  2020-05-01 22:30           ` Vincent Legoll
  2020-05-02 13:46           ` [bug#40691] [PATCH v4 0/3] gnu: Add gromacs, tng & lmfit Vincent Legoll
  0 siblings, 2 replies; 30+ messages in thread
From: Ludovic Courtès @ 2020-04-23 19:52 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Hi Vincent,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

>> It may be reasonable to just skip it.
>
> Hope you don't mind trading a test suite failure for a (harmless)
> test suite build warning...
>
> How's the crude disabling in the attached patch v3 look to you ?
>
> And does it fix the failure ?
> This test is not failing here (kvm on ryzen).

Oh that’s guix-daemon inside QEMU/KVM?  Then what can happen, unlike on
real hardware, is that hwloc doesn’t discrepancies between the actual
number of cores and the info it gathers from /sys or whatever.

> From 660371d5a3e7c7c763fc123357ddd6c31f730553 Mon Sep 17 00:00:00 2001
> From: Vincent Legoll <vincent.legoll@gmail.com>
> Date: Sat, 18 Apr 2020 00:14:56 +0200
> Subject: [PATCH] gnu: Add gromacs.
>
> * gnu/packages/bioinformatics.scm (gromacs): New variable.

[...]

> +         (add-after 'unpack 'disable-hwloc-test
> +          (lambda _
> +             ;; This test warns about the build host hardware
> +             (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
> +               (("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
> +                "void __guix_disabled()"))

I was thinking it’d be nice to use whatever mechanism gtest has to mark
a test as skipped but I didn’t find anything, so it’s probably OK like
this.

However, there’s another issue I hadn’t noticed (apologies!):
src/external bundles a few things like googletest, tinyxml2, zlib
(indirectly), etc.

Could you check if we can use our own dependencies instead of the
bundled ones?

For gtest it’s good if we can unpack the source of our ‘googletest’
package in place of the bundled copy, but it’s optional (I think there
are cases where we found this wasn’t possible for some reason).

Thank you!

Ludo’.

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

* [bug#40691] [PATCH v3 1/1] gnu: Add gromacs.
  2020-04-23 19:52         ` Ludovic Courtès
@ 2020-05-01 22:30           ` Vincent Legoll
  2020-05-02 13:35             ` Ludovic Courtès
  2020-05-02 13:46           ` [bug#40691] [PATCH v4 0/3] gnu: Add gromacs, tng & lmfit Vincent Legoll
  1 sibling, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-05-01 22:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 40691

Hello,

On 23/04/2020 21:52, Ludovic Courtès wrote:
> However, there’s another issue I hadn’t noticed (apologies!):
> src/external bundles a few things like googletest, tinyxml2, zlib
> (indirectly), etc.
> 
> Could you check if we can use our own dependencies instead of the
> bundled ones?

I'm working on it but it is not trivial, some of the bundled versions
are old enough that guix's are not compatible with the code using them.

I'm trying to get some fixes upstream for that.

> For gtest it’s good if we can unpack the source of our ‘googletest’
> package in place of the bundled copy, but it’s optional (I think there
> are cases where we found this wasn’t possible for some reason).

I'll try to fix this one also.

-- 
Vincent Legoll




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

* [bug#40691] [PATCH v3 1/1] gnu: Add gromacs.
  2020-05-01 22:30           ` Vincent Legoll
@ 2020-05-02 13:35             ` Ludovic Courtès
  0 siblings, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2020-05-02 13:35 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Hi,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> On 23/04/2020 21:52, Ludovic Courtès wrote:
>> However, there’s another issue I hadn’t noticed (apologies!):
>> src/external bundles a few things like googletest, tinyxml2, zlib
>> (indirectly), etc.
>>
>> Could you check if we can use our own dependencies instead of the
>> bundled ones?
>
> I'm working on it but it is not trivial, some of the bundled versions
> are old enough that guix's are not compatible with the code using them.
>
> I'm trying to get some fixes upstream for that.

Awesome, let us know how it goes.

>> For gtest it’s good if we can unpack the source of our ‘googletest’
>> package in place of the bundled copy, but it’s optional (I think there
>> are cases where we found this wasn’t possible for some reason).
>
> I'll try to fix this one also.

Thank you!

Ludo’.




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

* [bug#40691] [PATCH v4 0/3] gnu: Add gromacs, tng & lmfit.
  2020-04-23 19:52         ` Ludovic Courtès
  2020-05-01 22:30           ` Vincent Legoll
@ 2020-05-02 13:46           ` Vincent Legoll
  2020-05-03 10:39             ` Ludovic Courtès
  1 sibling, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 13:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 40691

Hello,

here is my latest work on adding gromacs to guix.

- rebased on latest guix master
- gromacs had a new version
- unbundling 3rdparties
- packaged some 3rdparties to have our own

I unbundled googletest by extracting our tarball in
place of the bundled copy.

Zlib got unbundled via packaging tng and unbundling
it from there.

Unbundled lmfit by packaging it separately and using that.
I put it with gromacs, but its legitimate place may be
elsewhere, like in maths.scm.

Unbundled tinyxml2 to use our version, which is newer and
broke code compatibility, so I added a patch to fix the
fallout. I am trying to get those fixes upstream, but that
may not be always practical, they may want to keep their
well tested version. I'll follow up updating the patch in
case parts of it get applied / released upstream.

The remaining bundled 3rdparties are vmd_molfile & thread_mpi.

Vmd_molfile source is behind a registration-only web form, I'm
not going there.

Thread_mpi looks like it is made to be bundled like that, and
is part of the parallelizing of gromacs which is above my
level of understanding (I'm only trying to package it, I'm not
a user). More info here:
http://www.gromacs.org/Documentation/Acceleration_and_parallelization#Multithreading_with_thread-MPI

Latest license change for tng say "revised bsd", I don't know
which one to choose, I put bsd-3.

https://github.com/gromacs/tng/commit/65443992d81a8845ba3597620d84e8652e83a254

Lmfit is freebsd license, I choose bsd-2.

https://jugit.fz-juelich.de/mlz/lmfit/-/blob/master/COPYING

Gromacs itself is lgpl2.1+ and its copying file has bundled
3parties license explanations.

https://github.com/gromacs/gromacs/blob/master/COPYING

Please advise how to proceed further, this is already quite an
adventure for me.

-- 
Vincent Legoll




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

* [bug#40691] [PATCH 1/3] gnu: Add tng.
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
                   ` (2 preceding siblings ...)
  2020-04-19 22:19 ` [bug#40691] [PATCH 0/1] gnu: Add gromacs Ludovic Courtès
@ 2020-05-02 13:48 ` Vincent Legoll
  2020-05-02 13:48   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
                     ` (2 more replies)
  2020-05-02 16:43 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
                   ` (3 subsequent siblings)
  7 siblings, 3 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 13:48 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/bioinformatics.scm (tng): New variable.
---
 gnu/packages/bioinformatics.scm | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 65b44568e0..f90401a560 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -785,6 +786,41 @@ input/output delimiter.  When the new functionality is not used, bioawk is
 intended to behave exactly the same as the original BWK awk.")
     (license license:x11)))
 
+(define-public tng
+  (package
+    (name "tng")
+    (version "1.8.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/gromacs/tng.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1apf2n8nb34z09xarj7k4jgriq283l769sakjmj5aalpbilvai4q"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-bundled-zlib
+           (lambda _
+             (delete-file-recursively "external")
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "../build/bin/tests/tng_testing")
+             #t)))))
+    (home-page "https://github.com/gromacs/tng")
+    (synopsis "Trajectory Next Generation binary format manipulation library")
+    (description "TRAJNG (Trajectory next generation) is a program library for
+handling molecular dynamics (MD) trajectories.  It can store coordinates, and
+optionally velocities and the H-matrix.  Coordinates and velocities are
+stored with user-specified precision.")
+    (license license:bsd-3)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
-- 
2.26.0





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

* [bug#40691] [PATCH 2/3] gnu: Add lmfit.
  2020-05-02 13:48 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
@ 2020-05-02 13:48   ` Vincent Legoll
  2020-05-02 13:48   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
  2020-05-02 13:53   ` [bug#40691] [PATCH v4 0/3]: " Vincent Legoll
  2 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 13:48 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/bioinformatics.scm (lmfit): New variable.
---
 gnu/packages/bioinformatics.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index f90401a560..02eae3b589 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -821,6 +821,30 @@ optionally velocities and the H-matrix.  Coordinates and velocities are
 stored with user-specified precision.")
     (license license:bsd-3)))
 
+(define-public lmfit
+  (package
+    (name "lmfit")
+    (version "8.2.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("perl" ,perl)))                   ; for pod2man
+    (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
+    (synopsis "C library for Levenberg-Marquardt minimization and least-squares
+fitting.")
+    (description "lmfit is a C library for Levenberg-Marquardt least-squares
+minimization and curve fitting.  It is mature code, based on decades-old
+algorithms from the FORTRAN library MINPACK.")
+    (license license:bsd-2)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
-- 
2.26.0





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

* [bug#40691] [PATCH 3/3] gnu: Add gromacs.
  2020-05-02 13:48 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
  2020-05-02 13:48   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
@ 2020-05-02 13:48   ` Vincent Legoll
  2020-05-02 13:53   ` [bug#40691] [PATCH v4 0/3]: " Vincent Legoll
  2 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 13:48 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/bioinformatics.scm (gromacs): New variable.
* gnu/packages/patches/gromacs-tinyxml2.patch: New file...
* gnu/local.mk (dist_patch_DATA): ...add it here.
---
 gnu/local.mk                                |  1 +
 gnu/packages/bioinformatics.scm             | 84 +++++++++++++++++++++
 gnu/packages/patches/gromacs-tinyxml2.patch | 50 ++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 gnu/packages/patches/gromacs-tinyxml2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 812253b192..70e8879284 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1004,6 +1004,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gpsbabel-qstring.patch     		\
   %D%/packages/patches/grantlee-merge-theme-dirs.patch		\
   %D%/packages/patches/grep-timing-sensitive-test.patch		\
+  %D%/packages/patches/gromacs-tinyxml2.patch			\
   %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch	\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
   %D%/packages/patches/gsl-test-i686.patch			\
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 02eae3b589..0727d1bac8 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -80,6 +80,7 @@
   #:use-module (gnu packages golang)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graph)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
@@ -845,6 +846,89 @@ minimization and curve fitting.  It is mature code, based on decades-old
 algorithms from the FORTRAN library MINPACK.")
     (license license:bsd-2)))
 
+(define-public gromacs
+  (package
+    (name "gromacs")
+    (version "2020.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1wyjgcdl30wy4hy6jvi9lkq53bqs9fgfq6fri52dhnb3c76y8rbl"))
+              (patches (search-patches "gromacs-tinyxml2.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
+             ; Unbundling
+             "-DGMX_USE_LMFIT=EXTERNAL"
+             "-DGMX_EXTERNAL_TNG=on"
+             "-DGMX_EXTERNAL_ZLIB=on"
+             "-DGMX_EXTERNAL_TINYXML2=on"
+             (string-append "-DTinyXML2_DIR="
+               (assoc-ref %build-inputs "tinyxml2"))
+             ;; Workaround for cmake/FindSphinx.cmake version parsing that does
+             ;; not understand the guix-wrapped `sphinx-build --version' answer
+             (string-append "-DSPHINX_EXECUTABLE_VERSION="
+                            ,(package-version python-sphinx)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fixes
+          (lambda* (#:key inputs #:allow-other-keys)
+             ; The following has been submitted upstream
+             (substitute* "src/testutils/CMakeLists.txt"
+               (("target_link_libraries\\(testutils \\$")
+                "target_link_libraries(testutils PRIVATE $"))
+             ; Unbundling
+;             (delete-file-recursively "src/external/vmd_molfile")
+             (delete-file-recursively "src/external/lmfit")
+             (delete-file-recursively "src/external/clFFT")
+             (delete-file-recursively "src/external/fftpack")
+             (delete-file-recursively "src/external/build-fftw")
+;             (delete-file-recursively "src/external/thread_mpi")
+             (delete-file-recursively "src/external/tng_io")
+             (delete-file-recursively "src/external/tinyxml2")
+             (delete-file-recursively "src/external/googletest")
+             (copy-recursively (assoc-ref inputs "googletest-source")
+                               "src/external/googletest")
+             ;; This test warns about the build host hardware, disable
+             (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
+               (("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
+                "void __guix_disabled()"))
+             #t)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("googletest-source" ,(package-source googletest))
+       ("graphviz" ,graphviz)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-pygments" ,python-pygments)
+       ("python-sphinx" ,python-sphinx)))
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("hwloc" ,hwloc-2 "lib")
+       ("imagemagick" ,imagemagick)
+       ("lapack" ,lapack)
+       ("lmfit" ,lmfit)
+       ("openblas" ,openblas)
+       ("openmpi" ,openmpi)
+       ("perl" ,perl)
+       ("tinyxml2" ,tinyxml2)
+       ("tng" ,tng)))
+    (home-page "http://www.gromacs.org/")
+    (synopsis "Molecular dynamics software package")
+    (description "GROMACS is a versatile package to perform molecular dynamics,
+i.e. simulate the Newtonian equations of motion for systems with hundreds to
+millions of particles.  It is primarily designed for biochemical molecules like
+proteins, lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the nonbonded
+interactions (that usually dominate simulations) many groups are also using it
+for research on non-biological systems, e.g. polymers.  GROMACS supports all the
+usual algorithms you expect from a modern molecular dynamics implementation.")
+    (license license:lgpl2.1+)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
diff --git a/gnu/packages/patches/gromacs-tinyxml2.patch b/gnu/packages/patches/gromacs-tinyxml2.patch
new file mode 100644
index 0000000000..3dace595d2
--- /dev/null
+++ b/gnu/packages/patches/gromacs-tinyxml2.patch
@@ -0,0 +1,50 @@
+diff -ruN gromacs-2020.2/src/testutils/CMakeLists.txt gromacs-2020.2-fixed/src/testutils/CMakeLists.txt
+--- gromacs-2020.2/src/testutils/CMakeLists.txt 2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/CMakeLists.txt   2020-05-01 22:52:16.356000000 +0200
+@@ -73,7 +73,7 @@
+ 
+ if(HAVE_TINYXML2)
+     include_directories(SYSTEM ${TinyXML2_INCLUDE_DIR})
+-    target_link_libraries(testutils ${TinyXML2_LIBRARIES})
++    target_link_libraries(testutils PRIVATE ${TinyXML2_LIBRARIES})
+ else()
+     include_directories(BEFORE SYSTEM "../external/tinyxml2")
+ endif()
+diff -ruN gromacs-2020.2/src/testutils/refdata_xml.cpp gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp
+--- gromacs-2020.2/src/testutils/refdata_xml.cpp        2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp  2020-05-01 23:17:09.556000000 +0200
+@@ -206,21 +206,12 @@
+     document.LoadFile(path.c_str());
+     if (document.Error())
+     {
+-        const char* errorStr1 = document.GetErrorStr1();
+-        const char* errorStr2 = document.GetErrorStr2();
++        const char* errorStr = document.ErrorStr();
+         std::string errorString("Error was ");
+-        if (errorStr1)
+-        {
+-            errorString += errorStr1;
+-        }
+-        if (errorStr2)
+-        {
+-            errorString += errorStr2;
+-        }
+-        if (!errorStr1 && !errorStr2)
+-        {
++        if (errorStr)
++            errorString += errorStr;
++        else
+             errorString += "not specified.";
+-        }
+         GMX_THROW(TestException("Reference data not parsed successfully: " + path + "\n."
+                                 + errorString + "\n"));
+     }
+@@ -371,7 +362,7 @@
+     XMLElementPtr rootElement = createRootElement(&document);
+     createChildElements(rootElement, rootEntry);
+ 
+-    if (document.SaveFile(path.c_str()) != tinyxml2::XML_NO_ERROR)
++    if (document.SaveFile(path.c_str()) != tinyxml2::XML_SUCCESS)
+     {
+         GMX_THROW(TestException("Reference data saving failed in " + path));
+     }
-- 
2.26.0





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

* [bug#40691] [PATCH v4 0/3]: Add gromacs.
  2020-05-02 13:48 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
  2020-05-02 13:48   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
  2020-05-02 13:48   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
@ 2020-05-02 13:53   ` Vincent Legoll
  2 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 13:53 UTC (permalink / raw)
  To: 40691

I'll fix the lint warnings (and check indentation) then resend, but
after getting feedback / fixing what's needed.




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

* [bug#40691] [PATCH 1/3] gnu: Add tng.
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
                   ` (3 preceding siblings ...)
  2020-05-02 13:48 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
@ 2020-05-02 16:43 ` Vincent Legoll
  2020-05-02 16:43   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
                     ` (2 more replies)
  2020-05-03 22:32 ` Vincent Legoll
                   ` (2 subsequent siblings)
  7 siblings, 3 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 16:43 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/bioinformatics.scm (tng): New variable.
---
 gnu/packages/bioinformatics.scm | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 65b44568e0..f90401a560 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -785,6 +786,41 @@ input/output delimiter.  When the new functionality is not used, bioawk is
 intended to behave exactly the same as the original BWK awk.")
     (license license:x11)))
 
+(define-public tng
+  (package
+    (name "tng")
+    (version "1.8.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/gromacs/tng.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1apf2n8nb34z09xarj7k4jgriq283l769sakjmj5aalpbilvai4q"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-bundled-zlib
+           (lambda _
+             (delete-file-recursively "external")
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "../build/bin/tests/tng_testing")
+             #t)))))
+    (home-page "https://github.com/gromacs/tng")
+    (synopsis "Trajectory Next Generation binary format manipulation library")
+    (description "TRAJNG (Trajectory next generation) is a program library for
+handling molecular dynamics (MD) trajectories.  It can store coordinates, and
+optionally velocities and the H-matrix.  Coordinates and velocities are
+stored with user-specified precision.")
+    (license license:bsd-3)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
-- 
2.26.0





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

* [bug#40691] [PATCH 2/3] gnu: Add lmfit.
  2020-05-02 16:43 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
@ 2020-05-02 16:43   ` Vincent Legoll
  2020-05-03 10:43     ` Ludovic Courtès
  2020-05-02 16:43   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
  2020-05-03 10:41   ` [bug#40691] [PATCH 1/3] gnu: Add tng Ludovic Courtès
  2 siblings, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 16:43 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/bioinformatics.scm (lmfit): New variable.
---
 gnu/packages/bioinformatics.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index f90401a560..1e3e145500 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -821,6 +821,30 @@ optionally velocities and the H-matrix.  Coordinates and velocities are
 stored with user-specified precision.")
     (license license:bsd-3)))
 
+(define-public lmfit
+  (package
+    (name "lmfit")
+    (version "8.2.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("perl" ,perl)))                   ; for pod2man
+    (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
+    (synopsis "C library for Levenberg-Marquardt minimization and least-squares
+fitting")
+    (description "lmfit is a C library for Levenberg-Marquardt least-squares
+minimization and curve fitting.  It is mature code, based on decades-old
+algorithms from the FORTRAN library MINPACK.")
+    (license license:bsd-2)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
-- 
2.26.0





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

* [bug#40691] [PATCH 3/3] gnu: Add gromacs.
  2020-05-02 16:43 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
  2020-05-02 16:43   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
@ 2020-05-02 16:43   ` Vincent Legoll
  2020-05-03 10:46     ` Ludovic Courtès
  2020-05-03 10:41   ` [bug#40691] [PATCH 1/3] gnu: Add tng Ludovic Courtès
  2 siblings, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-05-02 16:43 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/bioinformatics.scm (gromacs): New variable.
* gnu/packages/patches/gromacs-tinyxml2.patch: New file...
* gnu/local.mk (dist_patch_DATA): ...add it here.
---
 gnu/local.mk                                |  1 +
 gnu/packages/bioinformatics.scm             | 84 +++++++++++++++++++++
 gnu/packages/patches/gromacs-tinyxml2.patch | 50 ++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 gnu/packages/patches/gromacs-tinyxml2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 812253b192..70e8879284 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1004,6 +1004,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gpsbabel-qstring.patch     		\
   %D%/packages/patches/grantlee-merge-theme-dirs.patch		\
   %D%/packages/patches/grep-timing-sensitive-test.patch		\
+  %D%/packages/patches/gromacs-tinyxml2.patch			\
   %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch	\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
   %D%/packages/patches/gsl-test-i686.patch			\
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1e3e145500..13d9c16c10 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -80,6 +80,7 @@
   #:use-module (gnu packages golang)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graph)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
@@ -845,6 +846,89 @@ minimization and curve fitting.  It is mature code, based on decades-old
 algorithms from the FORTRAN library MINPACK.")
     (license license:bsd-2)))
 
+(define-public gromacs
+  (package
+    (name "gromacs")
+    (version "2020.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1wyjgcdl30wy4hy6jvi9lkq53bqs9fgfq6fri52dhnb3c76y8rbl"))
+              (patches (search-patches "gromacs-tinyxml2.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
+             ; Unbundling
+             "-DGMX_USE_LMFIT=EXTERNAL"
+             "-DGMX_BUILD_OWN_FFTW=off"
+             "-DGMX_EXTERNAL_BLAS=on"
+             "-DGMX_EXTERNAL_LAPACK=on"
+             "-DGMX_EXTERNAL_TNG=on"
+             "-DGMX_EXTERNAL_ZLIB=on"
+             "-DGMX_EXTERNAL_TINYXML2=on"
+             (string-append "-DTinyXML2_DIR="
+                            (assoc-ref %build-inputs "tinyxml2"))
+             ;; Workaround for cmake/FindSphinx.cmake version parsing that does
+             ;; not understand the guix-wrapped `sphinx-build --version' answer
+             (string-append "-DSPHINX_EXECUTABLE_VERSION="
+                            ,(package-version python-sphinx)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fixes
+           (lambda* (#:key inputs #:allow-other-keys)
+             ; The following has been submitted upstream
+             (substitute* "src/testutils/CMakeLists.txt"
+               (("target_link_libraries\\(testutils \\$")
+                "target_link_libraries(testutils PRIVATE $"))
+             ; Unbundling
+;             (delete-file-recursively "src/external/vmd_molfile")
+             (delete-file-recursively "src/external/lmfit")
+             (delete-file-recursively "src/external/clFFT")
+             (delete-file-recursively "src/external/fftpack")
+             (delete-file-recursively "src/external/build-fftw")
+;             (delete-file-recursively "src/external/thread_mpi")
+             (delete-file-recursively "src/external/tng_io")
+             (delete-file-recursively "src/external/tinyxml2")
+             (delete-file-recursively "src/external/googletest")
+             (copy-recursively (assoc-ref inputs "googletest-source")
+                               "src/external/googletest")
+             ;; This test warns about the build host hardware, disable
+             (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
+               (("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
+                "void __guix_disabled()"))
+             #t)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("googletest-source" ,(package-source googletest))
+       ("graphviz" ,graphviz)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-pygments" ,python-pygments)
+       ("python-sphinx" ,python-sphinx)))
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("hwloc" ,hwloc-2 "lib")
+       ("lmfit" ,lmfit)
+       ("openblas" ,openblas)
+       ("perl" ,perl)
+       ("tinyxml2" ,tinyxml2)
+       ("tng" ,tng)))
+    (home-page "http://www.gromacs.org/")
+    (synopsis "Molecular dynamics software package")
+    (description "GROMACS is a versatile package to perform molecular dynamics,
+i.e. simulate the Newtonian equations of motion for systems with hundreds to
+millions of particles.  It is primarily designed for biochemical molecules like
+proteins, lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the nonbonded
+interactions (that usually dominate simulations) many groups are also using it
+for research on non-biological systems, e.g. polymers.  GROMACS supports all the
+usual algorithms you expect from a modern molecular dynamics implementation.")
+    (license license:lgpl2.1+)))
+
 (define-public python-pybedtools
   (package
     (name "python-pybedtools")
diff --git a/gnu/packages/patches/gromacs-tinyxml2.patch b/gnu/packages/patches/gromacs-tinyxml2.patch
new file mode 100644
index 0000000000..3dace595d2
--- /dev/null
+++ b/gnu/packages/patches/gromacs-tinyxml2.patch
@@ -0,0 +1,50 @@
+diff -ruN gromacs-2020.2/src/testutils/CMakeLists.txt gromacs-2020.2-fixed/src/testutils/CMakeLists.txt
+--- gromacs-2020.2/src/testutils/CMakeLists.txt 2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/CMakeLists.txt   2020-05-01 22:52:16.356000000 +0200
+@@ -73,7 +73,7 @@
+ 
+ if(HAVE_TINYXML2)
+     include_directories(SYSTEM ${TinyXML2_INCLUDE_DIR})
+-    target_link_libraries(testutils ${TinyXML2_LIBRARIES})
++    target_link_libraries(testutils PRIVATE ${TinyXML2_LIBRARIES})
+ else()
+     include_directories(BEFORE SYSTEM "../external/tinyxml2")
+ endif()
+diff -ruN gromacs-2020.2/src/testutils/refdata_xml.cpp gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp
+--- gromacs-2020.2/src/testutils/refdata_xml.cpp        2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp  2020-05-01 23:17:09.556000000 +0200
+@@ -206,21 +206,12 @@
+     document.LoadFile(path.c_str());
+     if (document.Error())
+     {
+-        const char* errorStr1 = document.GetErrorStr1();
+-        const char* errorStr2 = document.GetErrorStr2();
++        const char* errorStr = document.ErrorStr();
+         std::string errorString("Error was ");
+-        if (errorStr1)
+-        {
+-            errorString += errorStr1;
+-        }
+-        if (errorStr2)
+-        {
+-            errorString += errorStr2;
+-        }
+-        if (!errorStr1 && !errorStr2)
+-        {
++        if (errorStr)
++            errorString += errorStr;
++        else
+             errorString += "not specified.";
+-        }
+         GMX_THROW(TestException("Reference data not parsed successfully: " + path + "\n."
+                                 + errorString + "\n"));
+     }
+@@ -371,7 +362,7 @@
+     XMLElementPtr rootElement = createRootElement(&document);
+     createChildElements(rootElement, rootEntry);
+ 
+-    if (document.SaveFile(path.c_str()) != tinyxml2::XML_NO_ERROR)
++    if (document.SaveFile(path.c_str()) != tinyxml2::XML_SUCCESS)
+     {
+         GMX_THROW(TestException("Reference data saving failed in " + path));
+     }
-- 
2.26.0





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

* [bug#40691] [PATCH v4 0/3] gnu: Add gromacs, tng & lmfit.
  2020-05-02 13:46           ` [bug#40691] [PATCH v4 0/3] gnu: Add gromacs, tng & lmfit Vincent Legoll
@ 2020-05-03 10:39             ` Ludovic Courtès
  2020-05-03 22:31               ` [bug#40691] [PATCH v6 " Vincent Legoll
  0 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2020-05-03 10:39 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Hi Vincent,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> here is my latest work on adding gromacs to guix.
>
> - rebased on latest guix master
> - gromacs had a new version
> - unbundling 3rdparties
> - packaged some 3rdparties to have our own
>
> I unbundled googletest by extracting our tarball in
> place of the bundled copy.
>
> Zlib got unbundled via packaging tng and unbundling
> it from there.
>
> Unbundled lmfit by packaging it separately and using that.
> I put it with gromacs, but its legitimate place may be
> elsewhere, like in maths.scm.
>
> Unbundled tinyxml2 to use our version, which is newer and
> broke code compatibility, so I added a patch to fix the
> fallout. I am trying to get those fixes upstream, but that
> may not be always practical, they may want to keep their
> well tested version. I'll follow up updating the patch in
> case parts of it get applied / released upstream.

Woow, quite an achievement!  Thanks for taking the time to go down this
rabbit hole, I think it’s worth it.

> The remaining bundled 3rdparties are vmd_molfile & thread_mpi.
>
> Vmd_molfile source is behind a registration-only web form, I'm
> not going there.

Sounds reasonable: the headers say it’s part of Gromacs, and it’s
definitely free software, so it’s OK to keep it here.

> Thread_mpi looks like it is made to be bundled like that, and
> is part of the parallelizing of gromacs which is above my
> level of understanding (I'm only trying to package it, I'm not
> a user). More info here:
> http://www.gromacs.org/Documentation/Acceleration_and_parallelization#Multithreading_with_thread-MPI

Sounds good.  Perhaps a comment in the code to state that would be
welcome, for our future selves.

> Latest license change for tng say "revised bsd", I don't know
> which one to choose, I put bsd-3.
>
> https://github.com/gromacs/tng/commit/65443992d81a8845ba3597620d84e8652e83a254
>
> Lmfit is freebsd license, I choose bsd-2.
>
> https://jugit.fz-juelich.de/mlz/lmfit/-/blob/master/COPYING
>
> Gromacs itself is lgpl2.1+ and its copying file has bundled
> 3parties license explanations.
>
> https://github.com/gromacs/gromacs/blob/master/COPYING
>
> Please advise how to proceed further, this is already quite an
> adventure for me.

I’ll look at the individual patches but it looks like we’re close to the
end line!

Ludo’.




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

* [bug#40691] [PATCH 1/3] gnu: Add tng.
  2020-05-02 16:43 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
  2020-05-02 16:43   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
  2020-05-02 16:43   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
@ 2020-05-03 10:41   ` Ludovic Courtès
  2 siblings, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2020-05-03 10:41 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> * gnu/packages/bioinformatics.scm (tng): New variable.

[...]

> +    (description "TRAJNG (Trajectory next generation) is a program library for
> +handling molecular dynamics (MD) trajectories.  It can store coordinates, and

I’d rather put it in chemistry.scm, next to ‘nmoldyn’, which seems to do
a similar job.  WDYT?

Otherwise LGTM!

Ludo’.




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

* [bug#40691] [PATCH 2/3] gnu: Add lmfit.
  2020-05-02 16:43   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
@ 2020-05-03 10:43     ` Ludovic Courtès
  0 siblings, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2020-05-03 10:43 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> * gnu/packages/bioinformatics.scm (lmfit): New variable.

[...]

> +    (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
> +    (synopsis "C library for Levenberg-Marquardt minimization and least-squares
> +fitting")

Perhaps remove “C Library for” to make it more concise.

What about moving it to algebra.scm, next to Eigen & co.?

Otherwise LGTM!

Ludo’.




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

* [bug#40691] [PATCH 3/3] gnu: Add gromacs.
  2020-05-02 16:43   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
@ 2020-05-03 10:46     ` Ludovic Courtès
  0 siblings, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2020-05-03 10:46 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> * gnu/packages/bioinformatics.scm (gromacs): New variable.
> * gnu/packages/patches/gromacs-tinyxml2.patch: New file...
> * gnu/local.mk (dist_patch_DATA): ...add it here.

I wonder if chemistry.scm would be more appropriate, WDYT?

> --- /dev/null
> +++ b/gnu/packages/patches/gromacs-tinyxml2.patch
> @@ -0,0 +1,50 @@

Could you add one or two sentences at the top of the file explaining
what it does and what its upstream status is?  It’s not obvious why the
reference data needs to be adjusted as a consequence of unbundling
tinyxml2.

That’s it!

Could you send updated patches?  I’ll be happy to commit them.  :-)

Thank you for all the work!

Ludo’.




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

* [bug#40691] [PATCH v6 0/3] gnu: Add gromacs, tng & lmfit.
  2020-05-03 10:39             ` Ludovic Courtès
@ 2020-05-03 22:31               ` Vincent Legoll
  2020-05-04  8:40                 ` bug#40691: " Ludovic Courtès
  0 siblings, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-05-03 22:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 40691

Hello Ludo,

I removed the leftover scm code that was duplicating what is now
in the patch, and added a patch header explaining what's going on.

>> Vmd_molfile source is behind a registration-only web form, I'm
>> not going there.
> 
> Sounds reasonable: the headers say it’s part of Gromacs, and it’s
> definitely free software, so it’s OK to keep it here.

Added comment.

>> Thread_mpi looks like it is made to be bundled like that, and
>> is part of the parallelizing of gromacs which is above my
>> level of understanding (I'm only trying to package it, I'm not
>> a user). More info here:
> 
> Sounds good.  Perhaps a comment in the code to state that would be
> welcome, for our future selves.

Added comment.

Put tng & gromacs in chemistry.scm, in fact gromacs sci domain is
chemistry, even if also used in bioinfo. Added more comments for
patch & still bundled 3rdparties.

Moved lmfit to algebra.scm, shortened synopsis.

I think I fixed all review comments.

Thanks, patches follow.

-- 
Vincent Legoll




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

* [bug#40691] [PATCH 1/3] gnu: Add tng.
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
                   ` (4 preceding siblings ...)
  2020-05-02 16:43 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
@ 2020-05-03 22:32 ` Vincent Legoll
  2020-05-03 22:32   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
  2020-05-03 22:32   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
  2020-05-03 22:39 ` [bug#40691] [PATCH] " Vincent Legoll
  2020-05-05 21:27 ` [bug#40691] Upstream patches are being merged Vincent Legoll
  7 siblings, 2 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-03 22:32 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

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

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 855ae2df22..5b21e3309c 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -4,6 +4,7 @@
 ;;; 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>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -300,6 +301,41 @@ is currently not actively maintained and works only with Python 2 and
 NumPy < 1.9.")
     (license license:cecill)))
 
+(define-public tng
+  (package
+    (name "tng")
+    (version "1.8.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/gromacs/tng.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1apf2n8nb34z09xarj7k4jgriq283l769sakjmj5aalpbilvai4q"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-bundled-zlib
+           (lambda _
+             (delete-file-recursively "external")
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "../build/bin/tests/tng_testing")
+             #t)))))
+    (home-page "https://github.com/gromacs/tng")
+    (synopsis "Trajectory Next Generation binary format manipulation library")
+    (description "TRAJNG (Trajectory next generation) is a program library for
+handling molecular dynamics (MD) trajectories.  It can store coordinates, and
+optionally velocities and the H-matrix.  Coordinates and velocities are
+stored with user-specified precision.")
+    (license license:bsd-3)))
+
 (define-public openbabel
   (package
     (name "openbabel")
-- 
2.26.0





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

* [bug#40691] [PATCH 2/3] gnu: Add lmfit.
  2020-05-03 22:32 ` Vincent Legoll
@ 2020-05-03 22:32   ` Vincent Legoll
  2020-05-03 22:32   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
  1 sibling, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-03 22:32 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/algebra.scm (lmfit): New variable.
---
 gnu/packages/algebra.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 34fb9ee4fd..d4f66d2ffd 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -913,6 +914,29 @@ Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
     (license license:bsd-2)))
 
+(define-public lmfit
+  (package
+    (name "lmfit")
+    (version "8.2.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("perl" ,perl)))                   ; for pod2man
+    (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
+    (synopsis "Levenberg-Marquardt minimization and least-squares fitting")
+    (description "lmfit is a C library for Levenberg-Marquardt least-squares
+minimization and curve fitting.  It is mature code, based on decades-old
+algorithms from the FORTRAN library MINPACK.")
+    (license license:bsd-2)))
+
 (define-public eigen
   (package
     (name "eigen")
-- 
2.26.0





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

* [bug#40691] [PATCH 3/3] gnu: Add gromacs.
  2020-05-03 22:32 ` Vincent Legoll
  2020-05-03 22:32   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
@ 2020-05-03 22:32   ` Vincent Legoll
  2020-05-03 22:39     ` Vincent Legoll
  1 sibling, 1 reply; 30+ messages in thread
From: Vincent Legoll @ 2020-05-03 22:32 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/chemistry.scm (gromacs): New variable.
* gnu/packages/patches/gromacs-tinyxml2.patch: New file...
* gnu/local.mk (dist_patch_DATA): ...add it here.
---
 gnu/local.mk                                |  1 +
 gnu/packages/chemistry.scm                  | 86 +++++++++++++++++++++
 gnu/packages/patches/gromacs-tinyxml2.patch | 67 ++++++++++++++++
 3 files changed, 154 insertions(+)
 create mode 100644 gnu/packages/patches/gromacs-tinyxml2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3c9a10b6bc..827e186501 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1006,6 +1006,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gpsbabel-qstring.patch     		\
   %D%/packages/patches/grantlee-merge-theme-dirs.patch		\
   %D%/packages/patches/grep-timing-sensitive-test.patch		\
+  %D%/packages/patches/gromacs-tinyxml2.patch			\
   %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch	\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
   %D%/packages/patches/gsl-test-i686.patch			\
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 5b21e3309c..42368cb482 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -33,6 +33,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gv)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages pkg-config)
@@ -336,6 +337,91 @@ optionally velocities and the H-matrix.  Coordinates and velocities are
 stored with user-specified precision.")
     (license license:bsd-3)))
 
+(define-public gromacs
+  (package
+    (name "gromacs")
+    (version "2020.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1wyjgcdl30wy4hy6jvi9lkq53bqs9fgfq6fri52dhnb3c76y8rbl"))
+              ;; Our version of tinyxml2 is far newer than the bundled one and
+              ;; require fixing `testutils' code. See patch header for more info
+              (patches (search-patches "gromacs-tinyxml2.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
+             ;; Unbundling
+             "-DGMX_USE_LMFIT=EXTERNAL"
+             "-DGMX_BUILD_OWN_FFTW=off"
+             "-DGMX_EXTERNAL_BLAS=on"
+             "-DGMX_EXTERNAL_LAPACK=on"
+             "-DGMX_EXTERNAL_TNG=on"
+             "-DGMX_EXTERNAL_ZLIB=on"
+             "-DGMX_EXTERNAL_TINYXML2=on"
+             (string-append "-DTinyXML2_DIR="
+                            (assoc-ref %build-inputs "tinyxml2"))
+             ;; Workaround for cmake/FindSphinx.cmake version parsing that does
+             ;; not understand the guix-wrapped `sphinx-build --version' answer
+             (string-append "-DSPHINX_EXECUTABLE_VERSION="
+                            ,(package-version python-sphinx)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fixes
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Still bundled: part of gromacs, source behind registration
+             ;; but free software anyways
+             ;;(delete-file-recursively "src/external/vmd_molfile")
+             ;; Still bundled: threads-based OpenMPI-compatible fallback
+             ;; designed to be bundled like that
+             ;;(delete-file-recursively "src/external/thread_mpi")
+             ;; Unbundling
+             (delete-file-recursively "src/external/lmfit")
+             (delete-file-recursively "src/external/clFFT")
+             (delete-file-recursively "src/external/fftpack")
+             (delete-file-recursively "src/external/build-fftw")
+             (delete-file-recursively "src/external/tng_io")
+             (delete-file-recursively "src/external/tinyxml2")
+             (delete-file-recursively "src/external/googletest")
+             (copy-recursively (assoc-ref inputs "googletest-source")
+                               "src/external/googletest")
+             ;; This test warns about the build host hardware, disable
+             (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
+               (("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
+                "void __guix_disabled()"))
+             #t)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("googletest-source" ,(package-source googletest))
+       ("graphviz" ,graphviz)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-pygments" ,python-pygments)
+       ("python-sphinx" ,python-sphinx)))
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("hwloc" ,hwloc-2 "lib")
+       ("lmfit" ,lmfit)
+       ("openblas" ,openblas)
+       ("perl" ,perl)
+       ("tinyxml2" ,tinyxml2)
+       ("tng" ,tng)))
+    (home-page "http://www.gromacs.org/")
+    (synopsis "Molecular dynamics software package")
+    (description "GROMACS is a versatile package to perform molecular dynamics,
+i.e. simulate the Newtonian equations of motion for systems with hundreds to
+millions of particles.  It is primarily designed for biochemical molecules like
+proteins, lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the nonbonded
+interactions (that usually dominate simulations) many groups are also using it
+for research on non-biological systems, e.g. polymers.  GROMACS supports all the
+usual algorithms you expect from a modern molecular dynamics implementation.")
+    (license license:lgpl2.1+)))
+
 (define-public openbabel
   (package
     (name "openbabel")
diff --git a/gnu/packages/patches/gromacs-tinyxml2.patch b/gnu/packages/patches/gromacs-tinyxml2.patch
new file mode 100644
index 0000000000..cc7d7459a8
--- /dev/null
+++ b/gnu/packages/patches/gromacs-tinyxml2.patch
@@ -0,0 +1,67 @@
+Unbundling tinyxml2 from gromacs and using our own, which is newer, broke gromacs
+build.
+
+This patch fixes three issues:
+
+- cmake now errors out if using multiple target_link_libraries with mixed styles
+  of signatures.
+
+- Error handling API changed, fix the testutils/refdata_xml.cpp code by using the
+  new API: document.ErrorStr() & tinyxml2::XML_SUCCESS.
+
+Those fixes will be submitted for inclusion to upstream, but may not be suitable
+there as long as they still keep the old version bundled.
+
+First hunk has already been requested for merging. Third is in discussion. Second
+will only be sent if third is OK'ed.
+
+diff -ruN gromacs-2020.2/src/testutils/CMakeLists.txt gromacs-2020.2-fixed/src/testutils/CMakeLists.txt
+--- gromacs-2020.2/src/testutils/CMakeLists.txt 2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/CMakeLists.txt   2020-05-01 22:52:16.356000000 +0200
+@@ -73,7 +73,7 @@
+ 
+ if(HAVE_TINYXML2)
+     include_directories(SYSTEM ${TinyXML2_INCLUDE_DIR})
+-    target_link_libraries(testutils ${TinyXML2_LIBRARIES})
++    target_link_libraries(testutils PRIVATE ${TinyXML2_LIBRARIES})
+ else()
+     include_directories(BEFORE SYSTEM "../external/tinyxml2")
+ endif()
+diff -ruN gromacs-2020.2/src/testutils/refdata_xml.cpp gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp
+--- gromacs-2020.2/src/testutils/refdata_xml.cpp        2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp  2020-05-01 23:17:09.556000000 +0200
+@@ -206,21 +206,12 @@
+     document.LoadFile(path.c_str());
+     if (document.Error())
+     {
+-        const char* errorStr1 = document.GetErrorStr1();
+-        const char* errorStr2 = document.GetErrorStr2();
++        const char* errorStr = document.ErrorStr();
+         std::string errorString("Error was ");
+-        if (errorStr1)
+-        {
+-            errorString += errorStr1;
+-        }
+-        if (errorStr2)
+-        {
+-            errorString += errorStr2;
+-        }
+-        if (!errorStr1 && !errorStr2)
+-        {
++        if (errorStr)
++            errorString += errorStr;
++        else
+             errorString += "not specified.";
+-        }
+         GMX_THROW(TestException("Reference data not parsed successfully: " + path + "\n."
+                                 + errorString + "\n"));
+     }
+@@ -371,7 +362,7 @@
+     XMLElementPtr rootElement = createRootElement(&document);
+     createChildElements(rootElement, rootEntry);
+ 
+-    if (document.SaveFile(path.c_str()) != tinyxml2::XML_NO_ERROR)
++    if (document.SaveFile(path.c_str()) != tinyxml2::XML_SUCCESS)
+     {
+         GMX_THROW(TestException("Reference data saving failed in " + path));
+     }
-- 
2.26.0





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

* [bug#40691] [PATCH 3/3] gnu: Add gromacs.
  2020-05-03 22:32   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
@ 2020-05-03 22:39     ` Vincent Legoll
  0 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-03 22:39 UTC (permalink / raw)
  To: 40691

Will resend this one, as I forgot to amend the missing module inclusions
due to the move from bioinformatics.scm.




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

* [bug#40691] [PATCH] gnu: Add gromacs.
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
                   ` (5 preceding siblings ...)
  2020-05-03 22:32 ` Vincent Legoll
@ 2020-05-03 22:39 ` Vincent Legoll
  2020-05-05 21:27 ` [bug#40691] Upstream patches are being merged Vincent Legoll
  7 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-03 22:39 UTC (permalink / raw)
  To: 40691; +Cc: Vincent Legoll

* gnu/packages/chemistry.scm (gromacs): New variable.
* gnu/packages/patches/gromacs-tinyxml2.patch: New file...
* gnu/local.mk (dist_patch_DATA): ...add it here.
---
 gnu/local.mk                                |  1 +
 gnu/packages/chemistry.scm                  | 90 +++++++++++++++++++++
 gnu/packages/patches/gromacs-tinyxml2.patch | 67 +++++++++++++++
 3 files changed, 158 insertions(+)
 create mode 100644 gnu/packages/patches/gromacs-tinyxml2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3c9a10b6bc..827e186501 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1006,6 +1006,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gpsbabel-qstring.patch     		\
   %D%/packages/patches/grantlee-merge-theme-dirs.patch		\
   %D%/packages/patches/grep-timing-sensitive-test.patch		\
+  %D%/packages/patches/gromacs-tinyxml2.patch			\
   %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch	\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
   %D%/packages/patches/gsl-test-i686.patch			\
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 5b21e3309c..0540dfceb6 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -30,15 +30,20 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gv)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages mpi)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -336,6 +341,91 @@ optionally velocities and the H-matrix.  Coordinates and velocities are
 stored with user-specified precision.")
     (license license:bsd-3)))
 
+(define-public gromacs
+  (package
+    (name "gromacs")
+    (version "2020.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1wyjgcdl30wy4hy6jvi9lkq53bqs9fgfq6fri52dhnb3c76y8rbl"))
+              ;; Our version of tinyxml2 is far newer than the bundled one and
+              ;; require fixing `testutils' code. See patch header for more info
+              (patches (search-patches "gromacs-tinyxml2.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "-DGMX_DEVELOPER_BUILD=on" ; Needed to run tests
+             ;; Unbundling
+             "-DGMX_USE_LMFIT=EXTERNAL"
+             "-DGMX_BUILD_OWN_FFTW=off"
+             "-DGMX_EXTERNAL_BLAS=on"
+             "-DGMX_EXTERNAL_LAPACK=on"
+             "-DGMX_EXTERNAL_TNG=on"
+             "-DGMX_EXTERNAL_ZLIB=on"
+             "-DGMX_EXTERNAL_TINYXML2=on"
+             (string-append "-DTinyXML2_DIR="
+                            (assoc-ref %build-inputs "tinyxml2"))
+             ;; Workaround for cmake/FindSphinx.cmake version parsing that does
+             ;; not understand the guix-wrapped `sphinx-build --version' answer
+             (string-append "-DSPHINX_EXECUTABLE_VERSION="
+                            ,(package-version python-sphinx)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fixes
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Still bundled: part of gromacs, source behind registration
+             ;; but free software anyways
+             ;;(delete-file-recursively "src/external/vmd_molfile")
+             ;; Still bundled: threads-based OpenMPI-compatible fallback
+             ;; designed to be bundled like that
+             ;;(delete-file-recursively "src/external/thread_mpi")
+             ;; Unbundling
+             (delete-file-recursively "src/external/lmfit")
+             (delete-file-recursively "src/external/clFFT")
+             (delete-file-recursively "src/external/fftpack")
+             (delete-file-recursively "src/external/build-fftw")
+             (delete-file-recursively "src/external/tng_io")
+             (delete-file-recursively "src/external/tinyxml2")
+             (delete-file-recursively "src/external/googletest")
+             (copy-recursively (assoc-ref inputs "googletest-source")
+                               "src/external/googletest")
+             ;; This test warns about the build host hardware, disable
+             (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
+               (("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
+                "void __guix_disabled()"))
+             #t)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("googletest-source" ,(package-source googletest))
+       ("graphviz" ,graphviz)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-pygments" ,python-pygments)
+       ("python-sphinx" ,python-sphinx)))
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("hwloc" ,hwloc-2 "lib")
+       ("lmfit" ,lmfit)
+       ("openblas" ,openblas)
+       ("perl" ,perl)
+       ("tinyxml2" ,tinyxml2)
+       ("tng" ,tng)))
+    (home-page "http://www.gromacs.org/")
+    (synopsis "Molecular dynamics software package")
+    (description "GROMACS is a versatile package to perform molecular dynamics,
+i.e. simulate the Newtonian equations of motion for systems with hundreds to
+millions of particles.  It is primarily designed for biochemical molecules like
+proteins, lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the nonbonded
+interactions (that usually dominate simulations) many groups are also using it
+for research on non-biological systems, e.g. polymers.  GROMACS supports all the
+usual algorithms you expect from a modern molecular dynamics implementation.")
+    (license license:lgpl2.1+)))
+
 (define-public openbabel
   (package
     (name "openbabel")
diff --git a/gnu/packages/patches/gromacs-tinyxml2.patch b/gnu/packages/patches/gromacs-tinyxml2.patch
new file mode 100644
index 0000000000..cc7d7459a8
--- /dev/null
+++ b/gnu/packages/patches/gromacs-tinyxml2.patch
@@ -0,0 +1,67 @@
+Unbundling tinyxml2 from gromacs and using our own, which is newer, broke gromacs
+build.
+
+This patch fixes three issues:
+
+- cmake now errors out if using multiple target_link_libraries with mixed styles
+  of signatures.
+
+- Error handling API changed, fix the testutils/refdata_xml.cpp code by using the
+  new API: document.ErrorStr() & tinyxml2::XML_SUCCESS.
+
+Those fixes will be submitted for inclusion to upstream, but may not be suitable
+there as long as they still keep the old version bundled.
+
+First hunk has already been requested for merging. Third is in discussion. Second
+will only be sent if third is OK'ed.
+
+diff -ruN gromacs-2020.2/src/testutils/CMakeLists.txt gromacs-2020.2-fixed/src/testutils/CMakeLists.txt
+--- gromacs-2020.2/src/testutils/CMakeLists.txt 2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/CMakeLists.txt   2020-05-01 22:52:16.356000000 +0200
+@@ -73,7 +73,7 @@
+ 
+ if(HAVE_TINYXML2)
+     include_directories(SYSTEM ${TinyXML2_INCLUDE_DIR})
+-    target_link_libraries(testutils ${TinyXML2_LIBRARIES})
++    target_link_libraries(testutils PRIVATE ${TinyXML2_LIBRARIES})
+ else()
+     include_directories(BEFORE SYSTEM "../external/tinyxml2")
+ endif()
+diff -ruN gromacs-2020.2/src/testutils/refdata_xml.cpp gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp
+--- gromacs-2020.2/src/testutils/refdata_xml.cpp        2020-04-30 18:33:44.000000000 +0200
++++ gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp  2020-05-01 23:17:09.556000000 +0200
+@@ -206,21 +206,12 @@
+     document.LoadFile(path.c_str());
+     if (document.Error())
+     {
+-        const char* errorStr1 = document.GetErrorStr1();
+-        const char* errorStr2 = document.GetErrorStr2();
++        const char* errorStr = document.ErrorStr();
+         std::string errorString("Error was ");
+-        if (errorStr1)
+-        {
+-            errorString += errorStr1;
+-        }
+-        if (errorStr2)
+-        {
+-            errorString += errorStr2;
+-        }
+-        if (!errorStr1 && !errorStr2)
+-        {
++        if (errorStr)
++            errorString += errorStr;
++        else
+             errorString += "not specified.";
+-        }
+         GMX_THROW(TestException("Reference data not parsed successfully: " + path + "\n."
+                                 + errorString + "\n"));
+     }
+@@ -371,7 +362,7 @@
+     XMLElementPtr rootElement = createRootElement(&document);
+     createChildElements(rootElement, rootEntry);
+ 
+-    if (document.SaveFile(path.c_str()) != tinyxml2::XML_NO_ERROR)
++    if (document.SaveFile(path.c_str()) != tinyxml2::XML_SUCCESS)
+     {
+         GMX_THROW(TestException("Reference data saving failed in " + path));
+     }
-- 
2.26.0





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

* bug#40691: [PATCH v6 0/3] gnu: Add gromacs, tng & lmfit.
  2020-05-03 22:31               ` [bug#40691] [PATCH v6 " Vincent Legoll
@ 2020-05-04  8:40                 ` Ludovic Courtès
  0 siblings, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2020-05-04  8:40 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 40691-done

Hi Vincent,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

>>> Vmd_molfile source is behind a registration-only web form, I'm
>>> not going there.
>>
>> Sounds reasonable: the headers say it’s part of Gromacs, and it’s
>> definitely free software, so it’s OK to keep it here.
>
> Added comment.
>
>>> Thread_mpi looks like it is made to be bundled like that, and
>>> is part of the parallelizing of gromacs which is above my
>>> level of understanding (I'm only trying to package it, I'm not
>>> a user). More info here:
>>
>> Sounds good.  Perhaps a comment in the code to state that would be
>> welcome, for our future selves.
>
> Added comment.
>
> Put tng & gromacs in chemistry.scm, in fact gromacs sci domain is
> chemistry, even if also used in bioinfo. Added more comments for
> patch & still bundled 3rdparties.
>
> Moved lmfit to algebra.scm, shortened synopsis.
>
> I think I fixed all review comments.

Thanks a lot, applied!  (Will push shortly.)

Ludo’.




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

* [bug#40691] Upstream patches are being merged
  2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
                   ` (6 preceding siblings ...)
  2020-05-03 22:39 ` [bug#40691] [PATCH] " Vincent Legoll
@ 2020-05-05 21:27 ` Vincent Legoll
  7 siblings, 0 replies; 30+ messages in thread
From: Vincent Legoll @ 2020-05-05 21:27 UTC (permalink / raw)
  To: 40691

Hello,

the first hunk the the gromacs patch has been merged, and they are
interested in the remaining bits, I'll work with them to that end,
and update guix package accordingly.

https://gitlab.com/gromacs/gromacs/-/merge_requests/153

-- 
Vincent Legoll




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

end of thread, other threads:[~2020-05-05 21:27 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 22:22 [bug#40691] [PATCH 0/1] gnu: Add gromacs Vincent Legoll
2020-04-17 22:24 ` [bug#40691] [PATCH] " Vincent Legoll
2020-04-17 22:48 ` [bug#40691] gromacs - WIP, submitted Vincent Legoll
2020-04-19 22:19 ` [bug#40691] [PATCH 0/1] gnu: Add gromacs Ludovic Courtès
2020-04-20 22:15   ` [bug#40691] [PATCH v2 1/1] " Vincent Legoll
2020-04-22 15:38     ` Ludovic Courtès
2020-04-23 13:07       ` [bug#40691] [PATCH v3 " Vincent Legoll
2020-04-23 19:52         ` Ludovic Courtès
2020-05-01 22:30           ` Vincent Legoll
2020-05-02 13:35             ` Ludovic Courtès
2020-05-02 13:46           ` [bug#40691] [PATCH v4 0/3] gnu: Add gromacs, tng & lmfit Vincent Legoll
2020-05-03 10:39             ` Ludovic Courtès
2020-05-03 22:31               ` [bug#40691] [PATCH v6 " Vincent Legoll
2020-05-04  8:40                 ` bug#40691: " Ludovic Courtès
2020-05-02 13:48 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
2020-05-02 13:48   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
2020-05-02 13:48   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
2020-05-02 13:53   ` [bug#40691] [PATCH v4 0/3]: " Vincent Legoll
2020-05-02 16:43 ` [bug#40691] [PATCH 1/3] gnu: Add tng Vincent Legoll
2020-05-02 16:43   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
2020-05-03 10:43     ` Ludovic Courtès
2020-05-02 16:43   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
2020-05-03 10:46     ` Ludovic Courtès
2020-05-03 10:41   ` [bug#40691] [PATCH 1/3] gnu: Add tng Ludovic Courtès
2020-05-03 22:32 ` Vincent Legoll
2020-05-03 22:32   ` [bug#40691] [PATCH 2/3] gnu: Add lmfit Vincent Legoll
2020-05-03 22:32   ` [bug#40691] [PATCH 3/3] gnu: Add gromacs Vincent Legoll
2020-05-03 22:39     ` Vincent Legoll
2020-05-03 22:39 ` [bug#40691] [PATCH] " Vincent Legoll
2020-05-05 21:27 ` [bug#40691] Upstream patches are being merged Vincent Legoll

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.