Last active
September 16, 2018 13:46
-
-
Save machakann/522be6db6d29393d2701ce186a4891d4 to your computer and use it in GitHub Desktop.
Bash script to run a new GAMESS process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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