Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{bio}[foss/2020a] GROMACS v2020.1 w/ Python 3.8.2 #10026

Merged
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
##
# 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>
# * Ake Sandgren <ake.sandgren@hpc2n.umu.se>
# License:: MIT/GPL
# 2019.3 version
# Contribution from the Crick HPC team
# uploaded by J. Sassmannshausen
#

name = 'GROMACS'
version = '2020.1'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://www.gromacs.org'
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.

This is a CPU only build, containing both MPI and threadMPI builds
for both single and double precision.
It also contains the gmxapi extension for the single precision MPI build.
"""

toolchain = {'name': 'foss', 'version': '2020a'}
toolchainopts = {'openmp': True, 'usempi': True}

source_urls = [
'https://ftp.gromacs.org/pub/gromacs/',
'ftp://ftp.gromacs.org/pub/gromacs/',
]
sources = [SOURCELOWER_TAR_GZ]
patches = [
'GROMACS-2019_fix_omp_num_threads_and_google_test_death_style_in_tests.patch',
'GROMACS-2018_dont_do_gpu_tests_on_cpu_build.patch',
'GROMACS-%(version)s_dont_override_pythonpath_in_tests.patch',
'GROMACS-2020_fix_gmxapi_gmx_allowed_cmd_name.patch',
]
checksums = [
'e1666558831a3951c02b81000842223698016922806a8ce152e8f616e29899cf', # gromacs-2020.1.tar.gz
# GROMACS-2019_fix_omp_num_threads_and_google_test_death_style_in_tests.patch
'406f5edd204be812f095a6f07ebc2673c5f6ddf1b1c1428fd336a80b9c629275',
# GROMACS-2018_dont_do_gpu_tests_on_cpu_build.patch
'727cc1afd9061002390e474b01aeb40efd984e6b7febd1cfe5e69a0a82b21f06',
# GROMACS-2020.1_dont_override_pythonpath_in_tests.patch
'dffcafefeb594864c452cbeea3ee13091168c7ab9cd1f63dc8e9d1663dcb928e',
# GROMACS-2020_fix_gmxapi_gmx_allowed_cmd_name.patch
'564c4e97e0dd05df1f45415ab5cc755c6b157880b26a816f7d6f7f98b318c900',
]

builddependencies = [
('CMake', '3.16.4'),
('scikit-build', '0.10.0', versionsuffix),
]

dependencies = [
('Python', '3.8.2'),
('SciPy-bundle', '2020.03', versionsuffix),
('networkx', '2.4', versionsuffix),
]

exts_defaultclass = 'PythonPackage'

exts_default_options = {
'source_urls': [PYPI_SOURCE],
'use_pip': True,
'download_dep_fail': True,
'sanity_pip_check': True,
}

exts_list = [
('gmxapi', '0.1.0.1', {
'patches': ['gmxapi-0.1.0.1_drop_cmake_requirement.patch'],
'preinstallopts': "export GMXTOOLCHAINDIR=%(installdir)s/share/cmake/gromacs_mpi && ",
'checksums': [
'3371075975117a32ffe44e8972a4a9330da416f0054e00ee587cdffb217497a0', # gmxapi-0.1.0.1.tar.gz
# gmxapi-0.1.0.1_drop_cmake_requirement.patch
'c58f1d94e7681bb2931ac90929445dc90f1709a9d8d3be78e55adbda797a2e8c',
],
}),
]

modextrapaths = {
'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages',
}

moduleclass = 'bio'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Don't overwrite PYTHONPATH when executing tests, add to it instead.

Åke Sandgren, 20200309
diff -ru gromacs-2020.1.orig/python_packaging/sample_restraint/tests/CMakeGROMACS.txt gromacs-2020.1/python_packaging/sample_restraint/tests/CMakeGROMACS.txt
--- gromacs-2020.1.orig/python_packaging/sample_restraint/tests/CMakeGROMACS.txt 2020-03-03 17:24:49.000000000 +0100
+++ gromacs-2020.1/python_packaging/sample_restraint/tests/CMakeGROMACS.txt 2020-03-09 09:18:42.707693465 +0100
@@ -22,7 +22,7 @@
get_target_property(GMXAPI_PYTHON_STAGING_DIR _gmxapi staging_dir)
get_target_property(PLUGINPATH gmxapi_extension LIBRARY_OUTPUT_DIRECTORY)
add_custom_target(gmxapi_extension_pytest
- COMMAND ${CMAKE_COMMAND} -E env GMXBIN=${GMXBIN} PYTHONPATH=${GMXAPI_PYTHON_STAGING_DIR}
+ COMMAND ${CMAKE_COMMAND} -E env GMXBIN=${GMXBIN} PYTHONPATH=$ENV{PYTHONPATH}:${GMXAPI_PYTHON_STAGING_DIR}
${PYTHON_EXECUTABLE} -m pytest --log-cli-level ERROR ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS gmxapi_extension _gmxapi
WORKING_DIRECTORY ${PLUGINPATH})
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Fix search for "gmx" binary to allow for double precision builds.

Åke Sandgren, 20200318
diff -ru gromacs-2020.1.orig/python_packaging/sample_restraint/tests/conftest.py gromacs-2020.1/python_packaging/sample_restraint/tests/conftest.py
--- gromacs-2020.1.orig/python_packaging/sample_restraint/tests/conftest.py 2020-03-03 17:24:49.000000000 +0100
+++ gromacs-2020.1/python_packaging/sample_restraint/tests/conftest.py 2020-03-18 07:19:09.611507575 +0100
@@ -156,7 +156,7 @@
# TODO: (#2896) Find a more canonical way to identify the GROMACS commandline wrapper binary.
# We should be able to get the GMXRC contents and related hints from a gmxapi
# package resource or from module attributes of a ``gromacs`` stub package.
- allowed_command_names = ['gmx', 'gmx_mpi']
+ allowed_command_names = ['gmx%s%s' % (m, p) for m in ['', '_mpi'] for p in ['', '_d']]
command = None
for command_name in allowed_command_names:
if command is not None:
diff -ru gromacs-2020.1.orig/python_packaging/src/test/conftest.py gromacs-2020.1/python_packaging/src/test/conftest.py
--- gromacs-2020.1.orig/python_packaging/src/test/conftest.py 2020-03-03 17:24:49.000000000 +0100
+++ gromacs-2020.1/python_packaging/src/test/conftest.py 2020-03-18 07:19:27.535301581 +0100
@@ -156,7 +156,7 @@
# TODO: (#2896) Find a more canonical way to identify the GROMACS commandline wrapper binary.
# We should be able to get the GMXRC contents and related hints from a gmxapi
# package resource or from module attributes of a ``gromacs`` stub package.
- allowed_command_names = ['gmx', 'gmx_mpi']
+ allowed_command_names = ['gmx%s%s' % (m, p) for m in ['', '_mpi'] for p in ['', '_d']]
command = None
for command_name in allowed_command_names:
if command is not None:
diff -ru gromacs-2020.1.orig/python_packaging/test/conftest.py gromacs-2020.1/python_packaging/test/conftest.py
--- gromacs-2020.1.orig/python_packaging/test/conftest.py 2020-03-03 17:24:49.000000000 +0100
+++ gromacs-2020.1/python_packaging/test/conftest.py 2020-03-18 07:19:03.967572439 +0100
@@ -156,7 +156,7 @@
# TODO: (#2896) Find a more canonical way to identify the GROMACS commandline wrapper binary.
# We should be able to get the GMXRC contents and related hints from a gmxapi
# package resource or from module attributes of a ``gromacs`` stub package.
- allowed_command_names = ['gmx', 'gmx_mpi']
+ allowed_command_names = ['gmx%s%s' % (m, p) for m in ['', '_mpi'] for p in ['', '_d']]
command = None
for command_name in allowed_command_names:
if command is not None:
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Drop the cmake requirement from gmxapi, we take that from the dependencies list.

Åke Sandgren, 20200308
diff -ru gmxapi-0.1.0.1.orig/setup.py gmxapi-0.1.0.1/setup.py
--- gmxapi-0.1.0.1.orig/setup.py 2019-12-30 12:08:34.000000000 +0100
+++ gmxapi-0.1.0.1/setup.py 2020-03-08 17:00:54.456270981 +0100
@@ -152,8 +152,7 @@
# TODO: (pending infrastructure and further discussion) Replace with CMake variables from GMXAPI version.
version='0.1.0.1',
python_requires='>=3.5, <3.9',
- setup_requires=['cmake>=3.12',
- 'setuptools>=28',
+ setup_requires=['setuptools>=28',
'scikit-build>=0.7'],

packages=['gmxapi', 'gmxapi.simulation'],