aboutsummaryrefslogtreecommitdiff
path: root/academic/gromacs
diff options
context:
space:
mode:
authorWilliam PC <w_calandrini[at]hotmail[dot]com>2022-09-30 12:51:20 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-10-01 09:01:15 +0700
commit2daec929f00ec7142a57b3775a347cc6a836a69e (patch)
tree59c705c903bae15ae36daaa6daba2e69fd165ded /academic/gromacs
parent668a715290ccfebc5dc0827b1dafe841f61f7012 (diff)
academic/gromacs: Added (gromacs project)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/gromacs')
-rw-r--r--academic/gromacs/README20
-rw-r--r--academic/gromacs/gromacs.SlackBuild145
-rw-r--r--academic/gromacs/gromacs.info10
-rw-r--r--academic/gromacs/slack-desc19
4 files changed, 194 insertions, 0 deletions
diff --git a/academic/gromacs/README b/academic/gromacs/README
new file mode 100644
index 0000000000000..a49f531bd490a
--- /dev/null
+++ b/academic/gromacs/README
@@ -0,0 +1,20 @@
+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 and is a community-driven project.
+
+It is primarily designed for biochemical molecules like proteins,
+lipids and nucleic acids that have a lot of complicated bonded
+interactions, but since GROMACS is extremely fast at calculating the
+nonbonded interactions (that usually dominate simulations) many groups
+are also using it for research on non-biological systems, e.g.
+polymers and fluid dynamics.
+
+
+Optional dependences:
+For run-time detection of hardware capabilities set HWLOC=yes. This
+requires hwloc.
+To enable MPI set PARALLEL=yes. This requires a MPI implementation
+either openmpi or mpich.
+For enabling CUDA set CUDA=yes. This requires the CUDA SDK.
+To enable OpenCL set OPENCL=yes. This requires a OpenCL
+implementation.
diff --git a/academic/gromacs/gromacs.SlackBuild b/academic/gromacs/gromacs.SlackBuild
new file mode 100644
index 0000000000000..9d7bcf0ea0248
--- /dev/null
+++ b/academic/gromacs/gromacs.SlackBuild
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Slackware build script for gromacs
+
+# Copyright 2022 William PC - Seattle (USA)
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=gromacs
+VERSION=${VERSION:-2021.6}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION-Source
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+
+# Enable run-time detection of hardware capabilities
+if [ "${HWLOC:-no}" == "yes" ]; then
+ OPT_DEPS="$OPT_DEPS -DGMX_HWLOC=ON"
+fi
+
+# Use CUDA SDK.
+if [ "${CUDA:-no}" == "yes" ]; then
+ OPT_DEPS="$OPT_DEPS -DGMX_GPU=CUDA"
+fi
+
+# Use an OpenCL implementation.
+if [ "${OPENCL:-no}" == "yes" ]; then
+ OPT_DEPS="$OPT_DEPS -DGMX_GPU=OpenCL"
+fi
+
+CFGSERIAL="-DGMX_MPI=OFF"
+
+CFGPARALLEL="-DGMX_MPI=ON"
+
+CFGGROMACS=$CFGSERIAL
+BUILDDIR=build-serial
+
+if [ "${PARALLEL:-no}" == "yes" ]; then
+ CFGGROMACS=$CFGPARALLEL
+ BUILDDIR=build-parallel
+fi
+
+ rm -fr $BUILDDIR
+ mkdir -p $BUILDDIR
+ cd $BUILDDIR
+
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/opt/$PRGNAM \
+ $CFGGROMACS \
+ $OPT_DEPS \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_BUILD_TYPE=RELEASE ..
+
+ make
+# make check
+ make install DESTDIR=$PKG
+cd ..
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a {AUTHORS,COPYING,README} $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/academic/gromacs/gromacs.info b/academic/gromacs/gromacs.info
new file mode 100644
index 0000000000000..f800414e54cfe
--- /dev/null
+++ b/academic/gromacs/gromacs.info
@@ -0,0 +1,10 @@
+PRGNAM="gromacs"
+VERSION="2021.6"
+HOMEPAGE="https://www.gromacs.org"
+DOWNLOAD="https://ftp.gromacs.org/gromacs/gromacs-2021.6.tar.gz"
+MD5SUM="ed1bdc2a634413dfdd5a7c0be82f6a9d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="William PC"
+EMAIL="w_calandrini[at]hotmail[dot]com"
diff --git a/academic/gromacs/slack-desc b/academic/gromacs/slack-desc
new file mode 100644
index 0000000000000..606601ed62134
--- /dev/null
+++ b/academic/gromacs/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gromacs: gromacs (gromacs project)
+gromacs:
+gromacs: GROMACS is a versatile package to perform molecular dynamics, i.e.
+gromacs: simulate the Newtonian equations of motion for systems with hundreds
+gromacs: to millions of particles and is a community-driven project.
+gromacs:
+gromacs:
+gromacs:
+gromacs:
+gromacs:
+gromacs: