# IT4Innovations
# LK 2021

#nvcc fatal   : Unsupported gpu architecture 'compute_1'

name = 'GROMACS'
version = '2020.4'
versionsuffix = '-PLUMED-2.7.0-patch'

homepage = 'https://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 GPU enabled build, containing both MPI and threadMPI builds.

It also contains the gmxapi extension for the single precision MPI build.
"""

toolchain = {'name': 'fosscuda', 'version': '2020b'}
toolchainopts = {'openmp': True, 'usempi': True}

source_urls = [
    'https://ftp.gromacs.org/pub/gromacs/',
    'ftp://ftp.gromacs.org/pub/gromacs/',
]
sources = ['gromacs-%(version)s-plumed-2.7.0.tar.gz']
patches = [
    'GROMACS-2019_fix_omp_num_threads_and_google_test_death_style_in_tests.patch',
    'GROMACS-2019_increase_test_timeout_for_GPU.patch',
#    'GROMACS-2021_fix_gmxapi_gmx_allowed_cmd_name.patch',
#    'GROMACS-2020.5_fix_threads_gpu_Gmxapitests.patch',
]
checksums = [
    'adfecf6b60414cdb722e6f4165818cf0',  # gromacs-2020.4-plumed-2.7.0.tar.gz
    # GROMACS-2019_fix_omp_num_threads_and_google_test_death_style_in_tests.patch
    '406f5edd204be812f095a6f07ebc2673c5f6ddf1b1c1428fd336a80b9c629275',
    # GROMACS-2019_increase_test_timeout_for_GPU.patch
    '0d16f53d428155197a0ed0b0974ce03422f199d7c463c4a9156a3b99e3c86234',
    # GROMACS-2021_fix_gmxapi_gmx_allowed_cmd_name.patch
    'b7ffb292ec362e033db1bedd340353f0644dbaae872127750f3dda1ac7e87d49',
    # GROMACS-2020.5_fix_threads_gpu_Gmxapitests.patch
    '89fbb7e2754de45573632c74f53563bb979df9758c949238a35865391d6b53fb',
]

builddependencies = [
    ('CMake', '3.18.4'),
    ('scikit-build', '0.11.1'),
]

dependencies = [
    ('Python', '3.8.6'),
    ('SciPy-bundle', '2020.11'),
    ('networkx', '2.5'),
    ('PLUMED', '2.7.0', '-patch'),
]

exts_defaultclass = 'PythonPackage'

cuda_compute_capabilities = '11.6'

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

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

moduleclass = 'bio'
