Skip to content

Instantly share code, notes, and snippets.

@machakann
Last active September 16, 2018 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machakann/522be6db6d29393d2701ce186a4891d4 to your computer and use it in GitHub Desktop.
Save machakann/522be6db6d29393d2701ce186a4891d4 to your computer and use it in GitHub Desktop.
Bash script to run a new GAMESS process
#!/bin/bash
# Version string of gamess to use
if [ -z "$GAMESS_PATH" ]; then
GAMESS_PATH="/opt/gamess/rungms"
fi
# Version string of gamess to use
if [ -z "$GAMESS_VER" ]; then
GAMESS_VER="00"
fi
# Number of cpu core to use
if [ -z "$GAMESS_CORE" ]; then
GAMESS_CORE="4"
fi
# clear the last cache files if exist
filename=$(basename -- "$1")
rm -f "$HOME/.gamess/${filename%.*}".*
if [ $# = 1 ]; then
# if only an input file name is assigned, use defaults
echo "${GAMESS_PATH} $1 ${GAMESS_VER} ${GAMESS_CORE}"
${GAMESS_PATH} $1 ${GAMESS_VER} ${GAMESS_CORE}
else
echo "${GAMESS_PATH} $@"
${GAMESS_PATH} $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment