Modified pdb2gmx to automatically pick the force field from the current directory
[gromacs.git] / scripts / GMXRC.zsh.cmakein
blobfef40840b0f6c99a79f9bc742f41332bef1359ea
1 # zsh configuration file for Gromacs
2 # First we remove old gromacs stuff from the paths
3 # by selecting everything else.
4 # This is not 100% necessary, but very useful when we
5 # repeatedly switch between gmx versions in a shell.
7 # First remove gromacs part of ld_library_path
8 tmppath=""
9 for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
10   if test "$i" != "$GMXLDLIB"; then
11     tmppath=${tmppath}:$i
12   fi
13 done
14 LD_LIBRARY_PATH=$tmppath
16 # First remove gromacs part of PKG_CONFIG_PATH
17 tmppath=""
18 for i in `echo $PKG_CONFIG_PATH | sed "s/:/ /g"`; do
19   if test "$i" != "$GMXLDLIB/pkgconfig"; then
20     tmppath=${tmppath}:$i
21   fi
22 done
23 PKG_CONFIG_PATH=$tmppath
25 # remove gromacs part of path
26 tmppath=""
27 for i in `echo $PATH | sed "s/:/ /g"`; do
28   if test "$i" != "$GMXBIN"; then
29     tmppath=${tmppath}:$i
30   fi
31 done
32 PATH=$tmppath
34 # and remove the gmx part of manpath
35 tmppath=""
36 for i in `echo $MANPATH | sed "s/:/ /g"`; do
37   if test "$i" != "$GMXMAN"; then
38     tmppath=${tmppath}:$i
39   fi
40 done
41 MANPATH=$tmppath
43 ##########################################################
44 # This is the real configuration part. We save the Gromacs
45 # things in separate vars, so we can remove them later.
46 # If you move gromacs, change the next four line.
47 ##########################################################
48 export GMXBIN=@BIN_INSTALL_DIR@
49 export GMXLDLIB=@LIB_INSTALL_DIR@
50 export GMXMAN=@MAN_INSTALL_DIR@
51 export GMXDATA=@DATA_INSTALL_DIR@
52         
53 # NB: The variables already begin with ':' now, or are empty
54 export LD_LIBRARY_PATH=${GMXLDLIB}${LD_LIBRARY_PATH}
55 export PKG_CONFIG_PATH=${GMXLDLIB}/pkgconfig${PKG_CONFIG_PATH}
56 export PATH=${GMXBIN}${PATH}
57 export MANPATH=${GMXMAN}${MANPATH}
59 # read zsh completions if understand how to use them
60 if compctl >& /dev/null; then
61   if [ -f $GMXBIN/completion.zsh ]; then
62     source $GMXBIN/completion.zsh; 
63   fi