/usr/share/gromacs/shell-specific/GMXRC.bash is in gromacs-data 5.0.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # sh/bash/zsh configuration file for Gromacs
# First we remove old gromacs stuff from the paths
# by selecting everything else.
# This is not 100% necessary, but very useful when we
# repeatedly switch between gmx versions in a shell.
#we make use of IFS, which needs shwordsplit in zsh
test -n "${ZSH_VERSION+set}" && setopt shwordsplit
old_IFS="$IFS"
IFS=":"
# First remove gromacs part of ld_library_path
tmppath=""
for i in $LD_LIBRARY_PATH; do
if test "$i" != "$GMXLDLIB"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
LD_LIBRARY_PATH=$tmppath
# remove gromacs part of PKG_CONFIG_PATH
tmppath=""
for i in $PKG_CONFIG_PATH; do
if test "$i" != "$GMXLDLIB/pkgconfig"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
PKG_CONFIG_PATH=$tmppath
# remove gromacs part of path
tmppath=""
for i in $PATH; do
if test "$i" != "$GMXBIN"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
PATH=$tmppath
# and remove the gmx part of manpath
tmppath=""
for i in $MANPATH; do
if test "$i" != "$GMXMAN"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
MANPATH=$tmppath
##########################################################
# This is the real configuration part. We save the Gromacs
# things in separate vars, so we can remove them later.
# If you move gromacs, change the first line.
##########################################################
GMXPREFIX=/usr
GMXBIN=${GMXPREFIX}/bin
GMXLDLIB=${GMXPREFIX}/lib/i386-linux-gnu
GMXMAN=${GMXPREFIX}/share/man
GMXDATA=${GMXPREFIX}/share/gromacs
LD_LIBRARY_PATH=${GMXLDLIB}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}
PKG_CONFIG_PATH=${GMXLDLIB}/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}
PATH=${GMXBIN}${PATH:+:}${PATH}
#debian/ubuntu needs a : at the end
MANPATH=${GMXMAN}:${MANPATH}
# export should be separate, so /bin/sh understands it
export GMXBIN GMXLDLIB GMXMAN GMXDATA LD_LIBRARY_PATH PATH MANPATH PKG_CONFIG_PATH
IFS="$old_IFS"
unset old_IFS
# read bash completions if understand how to use them
# and this shell supports extended globbing
if test -n "${BASH_VERSION+set}" && (complete) > /dev/null 2>&1; then
if (shopt -s extglob) > /dev/null 2>&1; then
if [ -f $GMXBIN/gmx-completion.bash ]; then
source $GMXBIN/gmx-completion.bash
for cfile in $GMXBIN/gmx-completion-*.bash ; do
source $cfile
done
fi
fi
# read zsh completions if understand how to use them
# Currently disabled, since the completions don't work with the new
# gmx binary with subcommands.
# Contributions to get the functionality back are welcome.
#elif test -n "${ZSH_VERSION+set}" && compctl >& /dev/null; then
# if [ -f $GMXBIN/gmx-completion.zsh ]; then
# source $GMXBIN/gmx-completion.zsh;
# fi
fi
|