gromacs-chain-coordinate: inherit from gromacs package (#27246)
This commit is contained in:
parent
62f0c70a8c
commit
8f59707f04
@ -3,18 +3,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
# This is a partial copy of Spack Gromacs package
|
from spack.pkg.builtin.gromacs import Gromacs
|
||||||
# - modified URL and versions
|
|
||||||
# - removed Plumed patches
|
|
||||||
# - calling original patch and cmake-related procedures to not duplicate them
|
|
||||||
# - simplified variants/dependencies because this fork starts at Gromacs 2021
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from spack.pkg.builtin.gromacs import Gromacs as BuiltinGromacs
|
|
||||||
|
|
||||||
|
|
||||||
class GromacsChainCoordinate(CMakePackage):
|
class GromacsChainCoordinate(Gromacs):
|
||||||
"""
|
"""
|
||||||
A modification of GROMACS that implements the "chain coordinate", a reaction
|
A modification of GROMACS that implements the "chain coordinate", a reaction
|
||||||
coordinate for pore formation in membranes and stalk formation between membranes.
|
coordinate for pore formation in membranes and stalk formation between membranes.
|
||||||
@ -26,57 +18,27 @@ class GromacsChainCoordinate(CMakePackage):
|
|||||||
maintainers = ['w8jcik']
|
maintainers = ['w8jcik']
|
||||||
|
|
||||||
version('main', branch='main')
|
version('main', branch='main')
|
||||||
|
|
||||||
version('2021.2-0.1', sha256="879fdd04662370a76408b72c9fbc4aff60a6387b459322ac2700d27359d0dd87",
|
version('2021.2-0.1', sha256="879fdd04662370a76408b72c9fbc4aff60a6387b459322ac2700d27359d0dd87",
|
||||||
url="https://gitlab.com/cbjh/gromacs-chain-coordinate/-/archive/release-2021.chaincoord-0.1/gromacs-chain-coordinate-release-2021.chaincoord-0.1.tar.bz2",
|
url="https://gitlab.com/cbjh/gromacs-chain-coordinate/-/archive/release-2021.chaincoord-0.1/gromacs-chain-coordinate-release-2021.chaincoord-0.1.tar.bz2",
|
||||||
preferred=True)
|
preferred=True)
|
||||||
|
|
||||||
variant('mpi', default=True,
|
conflicts('+plumed')
|
||||||
description='Activate MPI support (disable for Thread-MPI support)')
|
|
||||||
variant('shared', default=True,
|
|
||||||
description='Enables the build of shared libraries')
|
|
||||||
variant(
|
|
||||||
'double', default=False,
|
|
||||||
description='Produces a double precision version of the executables')
|
|
||||||
variant('cuda', default=False, description='Enable CUDA support')
|
|
||||||
variant('opencl', default=False, description='Enable OpenCL support')
|
|
||||||
variant('sycl', default=False, description='Enable SYCL support')
|
|
||||||
variant('nosuffix', default=False, description='Disable default suffixes')
|
|
||||||
variant('build_type', default='RelWithDebInfo',
|
|
||||||
description='The build type to build',
|
|
||||||
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel',
|
|
||||||
'Reference', 'RelWithAssert', 'Profile'))
|
|
||||||
variant('openmp', default=True,
|
|
||||||
description='Enables OpenMP at configure time')
|
|
||||||
variant('hwloc', default=True,
|
|
||||||
description='Use the hwloc portable hardware locality library')
|
|
||||||
variant('lapack', default=False,
|
|
||||||
description='Enables an external LAPACK library')
|
|
||||||
variant('blas', default=False,
|
|
||||||
description='Enables an external BLAS library')
|
|
||||||
variant('cycle_subcounters', default=False,
|
|
||||||
description='Enables cycle subcounters')
|
|
||||||
|
|
||||||
depends_on('mpi', when='+mpi')
|
def remove_parent_versions(self):
|
||||||
depends_on('fftw-api@3')
|
"""
|
||||||
depends_on('cmake@3.16.0:3', type='build')
|
By inheriting GROMACS package we also inherit versions.
|
||||||
depends_on('cuda', when='+cuda')
|
They are not valid, so we are removing them.
|
||||||
depends_on('sycl', when='+sycl')
|
"""
|
||||||
depends_on('lapack', when='+lapack')
|
|
||||||
depends_on('blas', when='+blas')
|
|
||||||
depends_on('hwloc', when='+hwloc')
|
|
||||||
|
|
||||||
filter_compiler_wrappers(
|
for version_key in Gromacs.versions.keys():
|
||||||
'*.cmake',
|
if version_key in self.versions:
|
||||||
relative_root=os.path.join('share', 'cmake', 'gromacs_mpi'))
|
del self.versions[version_key]
|
||||||
filter_compiler_wrappers(
|
|
||||||
'*.cmake',
|
|
||||||
relative_root=os.path.join('share', 'cmake', 'gromacs'))
|
|
||||||
|
|
||||||
def patch(self):
|
def __init__(self, spec):
|
||||||
BuiltinGromacs.patch(self)
|
super(GromacsChainCoordinate, self).__init__(spec)
|
||||||
|
|
||||||
def cmake_args(self):
|
self.remove_parent_versions()
|
||||||
return super(GromacsChainCoordinate, self).cmake_args()
|
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
"""The default 'test' targets does not compile the test programs"""
|
"""The default 'test' targets does not compile the test programs"""
|
||||||
|
Loading…
Reference in New Issue
Block a user