From: Vincent Legoll <vincent.legoll@gmail.com>
To: 40691@debbugs.gnu.org
Cc: Vincent Legoll <vincent.legoll@gmail.com>
Subject: [bug#40691] [PATCH 3/3] gnu: Add gromacs.
Date: Sat, 2 May 2020 15:48:15 +0200 [thread overview]
Message-ID: <20200502134815.13390-3-vincent.legoll@gmail.com> (raw)
In-Reply-To: <20200502134815.13390-1-vincent.legoll@gmail.com>
* 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
next prev parent reply other threads:[~2020-05-02 13:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Vincent Legoll [this message]
2020-05-02 13:53 ` [bug#40691] [PATCH v4 0/3]: Add gromacs 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200502134815.13390-3-vincent.legoll@gmail.com \
--to=vincent.legoll@gmail.com \
--cc=40691@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.