blob: 53833fd5d1061ee832d3211364bab39b7d18e4c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# $Id: PKGBUILD 57440 2011-10-27 20:16:15Z lcarlier $
# Maintainer: Hector <hsearaDOTatDOTgmailDOTcom>
# Maintainer: Vedran Miletic <vedran AT miletic DOT net>
pkgname=gromacs
pkgver=2024.4
pkgrel=2
pkgdesc='A versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.'
url='http://www.gromacs.org/'
license=(LGPL-2.1-only)
arch=('x86_64')
depends=('lapack' 'fftw' 'zlib' 'hwloc' 'gcc13-libs' 'tinyxml2')
optdepends=('cuda: Nvidia GPU support'
'vmd: Accesibility to other trajectory formats (ONLY WHEN COMPILING)'
'perl: needed for demux.pl and xplor2gmx.pl'
'opencl-clover-mesa: OpenCL support for AMD/Intel GPU'
'opencl-rusticl-mesa: OpenCL support for AMD/Intel GPU'
'opencl-nvidia: OpenCL support for Nvidia GPU')
makedepends=('cmake' 'gcc13')
options=('!libtool')
source=(https://gitlab.com/gromacs/gromacs/-/archive/v${pkgver}/gromacs-v${pkgver}.tar.gz)
sha256sums=('c2d6697f694670254dfdd1f313101e0e18803be06080472f7bd1e9b5a23d299e')
export VMDDIR=/usr/lib/vmd/ #If vmd is available at compilation time
#Gromacs will have the ability to read any
#trajectory file format that can be read by
#VMD installation (e.g. AMBER's DCD format).
# For CUDA (12+) support, compiling with GCC 13 is required.
# If you not need CUDA support, uncomment the next two lines
# and install cuda and gcc12 packages.
export CC=gcc-13
export CXX=g++-13
build() {
mkdir -p ${srcdir}/{single,double}
msg2 "Building the double precision files"
cd ${srcdir}/double
cmake ../gromacs-v${pkgver}/ \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DGMX_DOUBLE=ON \
-DGMX_HWLOC=ON \
-DREGRESSIONTEST_DOWNLOAD=ON
# For AVX2 and AVX512 support, add the following line
#-DGMX_BUILD_OWN_FFTW=ON
make
msg2 "Building the single precision files"
cd ${srcdir}/single
cmake ../gromacs-v${pkgver}/ \
-DCMAKE_INSTALL_PREFIX=/usr/ \
-DCMAKE_INSTALL_LIBDIR=lib \
-DGMX_HWLOC=ON \
-DREGRESSIONTEST_DOWNLOAD=ON
# For GPU acceleration support, add the following line and pick one of: OFF, CUDA, OpenCL, SYCL
#-DGMX_GPU=CUDA
# For AVX2 and AVX512 support, add the following line
#-DGMX_BUILD_OWN_FFTW=ON
make
}
check () {
msg2 "Testing double precision compilation"
cd ${srcdir}/double
#make check
msg2 "Testing single precision compilation"
cd ${srcdir}/single
#make check
}
package() {
msg2 "Making the single precision executables"
cd ${srcdir}/single
make DESTDIR=${pkgdir} install
# Cleaning up, kept the csh completion at default location
msg2 "Making the double precision executables"
cd ${srcdir}/double
make DESTDIR=${pkgdir} install
# installing completions in correct location and environment setup script
# msg2 "Installing completion and environment setup script"
msg2 "Installing environment setup script"
mkdir -p ${pkgdir}/etc/profile.d/
# mkdir -p ${pkgdir}/usr/share/bash-completion/completions
# install -D -m755 ${srcdir}/gromacs-v${pkgver}/src/programs/completion/gmx-completion.bash "${pkgdir}/usr/share/bash-completion/completions/gromacs"
mv ${pkgdir}/usr/bin/GMXRC.* ${pkgdir}/etc/profile.d/
sed "s:/usr/bin:/etc/profile.d:" ${pkgdir}/usr/bin/GMXRC > ${pkgdir}/etc/profile.d/GMXRC
chmod 755 ${pkgdir}/etc/profile.d/GMXRC
# rm -f ${pkgdir}/usr/bin/completion.*
rm -f ${pkgdir}/usr/bin/GMXRC
}
|