| 1 |
# csh/tcsh configuration file for Gromacs. |
| 2 |
# First we remove previous Gromacs stuff from paths |
| 3 |
# by selecting everything else. |
| 4 |
# Removal is not 100% necessary, but very useful when we |
| 5 |
# repeatedly switch between gmx versions in a shell. |
| 6 |
|
| 7 |
# zero possibly unset vars to avoid warnings |
| 8 |
if (! $?@LD_LIBRARY_PATH@) setenv @LD_LIBRARY_PATH@ "" |
| 9 |
if (! $?PKG_CONFIG_PATH) setenv PKG_CONFIG_PATH "" |
| 10 |
if (! $?PATH) setenv PATH "" |
| 11 |
if (! $?MANPATH) setenv MANPATH "" |
| 12 |
if (! $?GMXLDLIB) setenv GMXLDLIB "" |
| 13 |
if (! $?GMXBIN) setenv GMXBIN "" |
| 14 |
if (! $?GMXMAN) setenv GMXMAN "" |
| 15 |
|
| 16 |
# remove previous gromacs part from ld_library_path |
| 17 |
set tmppath = "" |
| 18 |
foreach i ( `echo $@LD_LIBRARY_PATH@ | sed "s/:/ /g"` ) |
| 19 |
if ( "$i" != "$GMXLDLIB" ) then |
| 20 |
if ("${tmppath}" == "") then |
| 21 |
set tmppath = "$i" |
| 22 |
else |
| 23 |
set tmppath = "${tmppath}:$i" |
| 24 |
endif |
| 25 |
endif |
| 26 |
end |
| 27 |
setenv @LD_LIBRARY_PATH@ $tmppath |
| 28 |
|
| 29 |
# remove previous gromacs part from PKG_CONFIG_PATH |
| 30 |
set tmppath = "" |
| 31 |
foreach i ( `echo $PKG_CONFIG_PATH | sed "s/:/ /g"` ) |
| 32 |
if ( "$i" != "$GMXLDLIB/pkgconfig" ) then |
| 33 |
if ("${tmppath}" == "") then |
| 34 |
set tmppath = "$i" |
| 35 |
else |
| 36 |
set tmppath = "${tmppath}:$i" |
| 37 |
endif |
| 38 |
endif |
| 39 |
end |
| 40 |
setenv PKG_CONFIG_PATH $tmppath |
| 41 |
|
| 42 |
# remove gromacs stuff from binary path |
| 43 |
set tmppath = "" |
| 44 |
foreach i ( `echo $PATH | sed "s/:/ /g"` ) |
| 45 |
if ( "$i" != "$GMXBIN" ) then |
| 46 |
if ("${tmppath}" == "") then |
| 47 |
set tmppath = "$i" |
| 48 |
else |
| 49 |
set tmppath = "${tmppath}:$i" |
| 50 |
endif |
| 51 |
endif |
| 52 |
end |
| 53 |
setenv PATH $tmppath |
| 54 |
|
| 55 |
# and remove stuff from manual path |
| 56 |
set tmppath = "" |
| 57 |
foreach i ( `echo $MANPATH | sed "s/:/ /g"` ) |
| 58 |
if ( "$i" != "$GMXMAN" ) then |
| 59 |
if ("${tmppath}" == "") then |
| 60 |
set tmppath = "$i" |
| 61 |
else |
| 62 |
set tmppath = "${tmppath}:$i" |
| 63 |
endif |
| 64 |
endif |
| 65 |
end |
| 66 |
setenv MANPATH $tmppath |
| 67 |
|
| 68 |
########################################################## |
| 69 |
# This is the real configuration part. We save the Gromacs |
| 70 |
# things in separate vars, so we can remove them later. |
| 71 |
# If you move gromacs, change the first line. |
| 72 |
########################################################## |
| 73 |
setenv GMXPREFIX @CMAKE_INSTALL_PREFIX@ |
| 74 |
setenv GMXBIN ${GMXPREFIX}/@CMAKE_INSTALL_BINDIR@ |
| 75 |
setenv GMXLDLIB ${GMXPREFIX}/@CMAKE_INSTALL_LIBDIR@ |
| 76 |
setenv GMXMAN ${GMXPREFIX}/@CMAKE_INSTALL_MANDIR@ |
| 77 |
setenv GMXDATA ${GMXPREFIX}/@GMX_INSTALL_GMXDATADIR@ |
| 78 |
setenv GMXTOOLCHAINDIR ${GMXPREFIX}/@GMX_INSTALL_CMAKEDIR@ |
| 79 |
setenv GROMACS_DIR ${GMXPREFIX} |
| 80 |
|
| 81 |
#make them begin with : |
| 82 |
if ($?@LD_LIBRARY_PATH@) setenv @LD_LIBRARY_PATH@ ":${@LD_LIBRARY_PATH@}" |
| 83 |
if ($?PKG_CONFIG_PATH) setenv PKG_CONFIG_PATH ":${PKG_CONFIG_PATH}" |
| 84 |
|
| 85 |
#path is never empty |
| 86 |
setenv PATH ${GMXBIN}:${PATH} |
| 87 |
setenv @LD_LIBRARY_PATH@ ${GMXLDLIB}${@LD_LIBRARY_PATH@} |
| 88 |
setenv PKG_CONFIG_PATH ${GMXLDLIB}/pkgconfig${PKG_CONFIG_PATH} |
| 89 |
#debian/ubuntu needs a : at the end |
| 90 |
setenv MANPATH ${GMXMAN}:${MANPATH} |
| 91 |
|
| 92 |
setenv GMX_FONT 10x20 |
| 93 |
|
| 94 |
# Read completions if we understand it (i.e. have tcsh) |
| 95 |
# Currently disabled, since the completions don't work with the new |
| 96 |
# gmx binary with subcommands. |
| 97 |
# Contributions to get the functionality back are welcome. |
| 98 |
#if { complete >& /dev/null } then |
| 99 |
# if ( -f $GMXBIN/completion.csh ) source $GMXBIN/completion.csh |
| 100 |
#endif |