From 86869d6c9bcce6c6c227d940386da28fa5d82954 Mon Sep 17 00:00:00 2001
From: "Jan H. Meinke" <j.meinke@fz-juelich.de>
Date: Tue, 20 Dec 2022 12:12:17 +0100
Subject: [PATCH] GROMACS 2022.4 w/ and w/o PLUMED.

This commit contains easyconfig files for GROMACS 2022.4 and
PLUMED 2.8.1. We provide GROMACS modules with and without the
PLUMED patch.
---
 .../g/GROMACS/GROMACS-2022.4-gpsmkl-2022a.eb  | 60 ++++++++++++++++
 .../GROMACS-2022.4-plumed-gpsmkl-2022a.eb     | 71 +++++++++++++++++++
 .../p/PLUMED/PLUMED-2.8.1-gpsmkl-2022a.eb     | 43 +++++++++++
 3 files changed, 174 insertions(+)
 create mode 100644 Golden_Repo/g/GROMACS/GROMACS-2022.4-gpsmkl-2022a.eb
 create mode 100644 Golden_Repo/g/GROMACS/GROMACS-2022.4-plumed-gpsmkl-2022a.eb
 create mode 100644 Golden_Repo/p/PLUMED/PLUMED-2.8.1-gpsmkl-2022a.eb

diff --git a/Golden_Repo/g/GROMACS/GROMACS-2022.4-gpsmkl-2022a.eb b/Golden_Repo/g/GROMACS/GROMACS-2022.4-gpsmkl-2022a.eb
new file mode 100644
index 000000000..79cdb655f
--- /dev/null
+++ b/Golden_Repo/g/GROMACS/GROMACS-2022.4-gpsmkl-2022a.eb
@@ -0,0 +1,60 @@
+##
+# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
+#
+# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC,
+#                                 Ghent University / The Francis Crick Institute
+# Authors::
+# * Wiktor Jurkowski <wiktor.jurkowski@gmail.com>
+# * Fotis Georgatos <fotis@cern.ch>
+# * George Tsouloupas <g.tsouloupas@cyi.ac.cy>
+# * Kenneth Hoste <kenneth.hoste@ugent.be>
+# * Adam Huffman <adam.huffman@crick.ac.uk>
+# License::   MIT/GPL
+##
+
+name = 'GROMACS'
+version = '2022.4'
+
+homepage = 'http://www.gromacs.org'
+docurls = ['http://manual.gromacs.org/documentation/current/user-guide/index.html']
+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 and lipids that have a lot of complicated bonded interactions,
+but since GROMACS is extremely fast at calculating the non-bonded interactions (that usually
+dominate simulations) many groups are also using it for research on non-biological systems, e.g.
+polymers.
+"""
+usage = """
+Use `gmx` to execute GROMACS commands on a single node, for example, to prepare your run. Use
+`gmx_mpi mdrun` in your job scripts with `srun`.
+"""
+
+toolchain = {'name': 'gpsmkl', 'version': '2022a'}
+toolchainopts = {'openmp': True, 'usempi': True}
+
+source_urls = ['ftp://ftp.gromacs.org/pub/gromacs/']
+sources = [SOURCELOWER_TAR_GZ]
+checksums = ['ff2ff92badd74c27ad6ab1aad7e48a59']
+
+builddependencies = [
+    ('CMake', '3.23.1'),
+    ('libxml2', '2.9.13')
+]
+
+dependencies = [
+    ('hwloc', '2.7.1'),
+    ('CUDA', '11.7', '', SYSTEM),
+]
+
+configopts = '-DCMAKE_PREFIX_PATH=$EBROOTHWLOC -DMPIEXEC_MAX_NUMPROCS="24" '
+configopts += '-DMKL_LIBRARIES="${MKLROOT}/lib/intel64/libmkl_intel_ilp64.so;'
+configopts += '${MKLROOT}/lib/intel64/libmkl_sequential.so;${MKLROOT}/lib/intel64/libmkl_core.so" '
+
+mpiexec = 'srun'
+mpiexec_numproc_flag = '"--gres=gpu:1 -n"'
+mpi_numprocs = 24
+
+runtest = False
+
+moduleclass = 'bio'
diff --git a/Golden_Repo/g/GROMACS/GROMACS-2022.4-plumed-gpsmkl-2022a.eb b/Golden_Repo/g/GROMACS/GROMACS-2022.4-plumed-gpsmkl-2022a.eb
new file mode 100644
index 000000000..76ccdf763
--- /dev/null
+++ b/Golden_Repo/g/GROMACS/GROMACS-2022.4-plumed-gpsmkl-2022a.eb
@@ -0,0 +1,71 @@
+##
+# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
+#
+# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC,
+#                                 Ghent University / The Francis Crick Institute
+# Authors::
+# * Wiktor Jurkowski <wiktor.jurkowski@gmail.com>
+# * Fotis Georgatos <fotis@cern.ch>
+# * George Tsouloupas <g.tsouloupas@cyi.ac.cy>
+# * Kenneth Hoste <kenneth.hoste@ugent.be>
+# * Adam Huffman <adam.huffman@crick.ac.uk>
+# License::   MIT/GPL
+##
+
+name = 'GROMACS'
+version = '2022.4'
+versionsuffix = '-plumed'
+
+homepage = 'http://www.gromacs.org'
+docurls = ['http://manual.gromacs.org/documentation/current/user-guide/index.html',
+           'https://www.plumed.org/doc-v2.7/user-doc/html/index.html']
+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 and lipids that have a lot of complicated bonded interactions,
+but since GROMACS is extremely fast at calculating the non-bonded interactions (that usually
+dominate simulations) many groups are also using it for research on non-biological systems, e.g.
+polymers.
+"""
+usage = """
+Use `gmx` to execute GROMACS commands on a single node, for example, to prepare your run. Use
+`gmx_mpi mdrun` in your job scripts with `srun`. Add `-plumed plumed.dat` to your call to `mdrun`
+to use PLUMED.
+"""
+
+toolchain = {'name': 'gpsmkl', 'version': '2022a'}
+toolchainopts = {'openmp': True, 'usempi': True}
+
+source_urls = ['ftp://ftp.gromacs.org/pub/gromacs/']
+sources = [SOURCELOWER_TAR_GZ]
+
+checksums = [
+    'ff2ff92badd74c27ad6ab1aad7e48a59',
+]
+
+builddependencies = [
+    ('CMake', '3.23.1'),
+    ('libxml2', '2.9.13')
+]
+
+dependencies = [
+    ('PLUMED', '2.8.1'),
+    ('hwloc', '2.7.1'),
+    ('CUDA', '11.7', '', SYSTEM),
+]
+
+configopts = '-DCMAKE_PREFIX_PATH=$EBROOTHWLOC -DMPIEXEC_MAX_NUMPROCS="24" '
+configopts += '-DMKL_LIBRARIES="${MKLROOT}/lib/intel64/libmkl_intel_ilp64.so;'
+configopts += '${MKLROOT}/lib/intel64/libmkl_sequential.so;${MKLROOT}/lib/intel64/libmkl_core.so" '
+
+
+mpiexec = 'srun'
+mpiexec_numproc_flag = '"--gres=gpu:1 -n"'
+mpi_numprocs = 24
+
+runtest = False
+
+# Applies PLUMED patch even if version does not match exactly. Use with caution!
+ignore_plumed_version_check = True
+
+moduleclass = 'bio'
diff --git a/Golden_Repo/p/PLUMED/PLUMED-2.8.1-gpsmkl-2022a.eb b/Golden_Repo/p/PLUMED/PLUMED-2.8.1-gpsmkl-2022a.eb
new file mode 100644
index 000000000..924177909
--- /dev/null
+++ b/Golden_Repo/p/PLUMED/PLUMED-2.8.1-gpsmkl-2022a.eb
@@ -0,0 +1,43 @@
+# by Ward Poelmans <wpoely86@gmail.com>
+
+easyblock = 'ConfigureMake'
+
+name = 'PLUMED'
+version = '2.8.1'
+
+homepage = 'http://www.plumed.org'
+description = """PLUMED is an open source library for free energy calculations in molecular systems which
+ works together with some of the most popular molecular dynamics engines. Free energy calculations can be 
+ performed as a function of many order parameters with a particular  focus on biological problems, using
+ state of the art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD.
+ The software, written in C++, can be easily interfaced with both fortran and C/C++ codes.
+"""
+
+toolchain = {'name': 'gpsmkl', 'version': '2022a'}
+toolchainopts = {'usempi': 'True'}
+
+source_urls = ['https://github.com/plumed/plumed2/archive/']
+sources = ['v%(version)s.tar.gz']
+checksums = ['f56bc9266c8a47241385c595717c2734a9b67148a7f4122b808bc0733710173e']
+
+dependencies = [
+    ('zlib', '1.2.12'),
+    ('GSL', '2.7'),
+    ('libmatheval', '1.1.11'),
+]
+
+preconfigopts = 'env FC=$MPIF90 LIBS="$LIBLAPACK $LIBS" '
+configopts = ' --exec-prefix=%(installdir)s --enable-gsl --enable-modules=all'
+prebuildopts = 'source sourceme.sh && '
+
+sanity_check_paths = {
+    'files': ['bin/plumed', 'lib/libplumedKernel.%s' % SHLIB_EXT, 'lib/libplumed.%s' % SHLIB_EXT],
+    'dirs': ['lib/plumed']
+}
+
+modextrapaths = {
+    'PLUMED_KERNEL': 'lib/libplumedKernel.%s' % SHLIB_EXT,
+    'PLUMED_ROOT': 'lib/plumed',
+}
+
+moduleclass = 'chem'
-- 
GitLab