From 8d7e1481e08b56442edae646a3cac3f8e1a6c87d Mon Sep 17 00:00:00 2001
From: Carlo Camilloni <carlo.camilloni@gmail.com>
Date: Tue, 20 Sep 2016 10:19:04 +0200
Subject: [PATCH] gmx patches: added notes on how to compile gromacs with
 plumed static libraries

---
 patches/gromacs-2016.config  | 6 ++++++
 patches/gromacs-5.1.4.config | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/patches/gromacs-2016.config b/patches/gromacs-2016.config
index 03f65f9e1..ef1f89565 100644
--- a/patches/gromacs-2016.config
+++ b/patches/gromacs-2016.config
@@ -11,6 +11,12 @@ cat << EOF
 PLUMED can be incorporated into gromacs using the standard patching procedure.
 Patching must be done in the gromacs root directory  _before_ the cmake command is invoked.
 
+On clusters you may want to patch gromacs using the static version of plumed, in this case
+building gromacs can result in multiple errors. One possible solution is to configure gromacs
+with these additional options:
+
+cmake -DBUILD_SHARED_LIBS=OFF -DGMX_PREFER_STATIC_LIBS=ON
+
 To enable PLUMED in a gromacs simulation one should use
 mdrun with an extra -plumed flag. The flag can be used to
 specify the name of the PLUMED input file, e.g.:
diff --git a/patches/gromacs-5.1.4.config b/patches/gromacs-5.1.4.config
index 97adeda47..ae65d400e 100644
--- a/patches/gromacs-5.1.4.config
+++ b/patches/gromacs-5.1.4.config
@@ -10,6 +10,12 @@ cat << EOF
 PLUMED can be incorporated into gromacs using the standard patching procedure.
 Patching must be done in the gromacs root directory  _before_ the cmake command is invoked.
 
+On clusters you may want to patch gromacs using the static version of plumed, in this case
+building gromacs can result in multiple errors. One possible solution is to configure gromacs
+with these additional options:
+
+cmake -DBUILD_SHARED_LIBS=OFF -DGMX_PREFER_STATIC_LIBS=ON
+
 To enable PLUMED in a gromacs simulation one should use
 mdrun with an extra -plumed flag. The flag can be used to
 specify the name of the PLUMED input file, e.g.:
-- 
GitLab