-r Specify Receptor file path (PDBQT Format Only!)
-l Specify Ligand file path (PDBQT Format Only!)
-c Specify AutoDock Vina Configuration File (TXT Format Only!)
-h Show the help
-v Get the tool version
Examples:
./main.sh -v
./main.sh -v
EOF
}
whilegetopts"r:l:s:n:c:vhdip" opt;do
case"$opt" in
\?)echo"Invalid option: -$OPTARG" >&2
exit1
;;
h) usage
exit0
;;
v)echo"Version $currentVersion"
exit0
;;
u)
getConfiguredClient ||exit1
checkInternet ||exit1
update
exit0
;;
d)
docking="true"
;;
i)
interactions="true"
;;
p)
visualisations="true"
;;
s)
smile="$OPTARG"
;;
n)
name="$OPTARG"
;;
r)
proteinPath="$OPTARG"
;;
l)
ligandPath="$OPTARG"
;;
c)
config="$OPTARG"
;;
a)
artist="true"
if[["$(echo"$@"| grep -Eo "\-s")"=="-s"]];thensong="true";fi# wont go through both options if arg spaced and not quoted this solves that issue (dont need this but once had bug on system where it was necessary)
if[["$(echo"$@"| grep -Eo "\-f")"=="-f"]];thenfilePath=$(echo"$@"| grep -Eo "\-f [ a-z A-Z / 0-9 . \ ]*[ -]?"| sed s/-f//g | sed s/-//g | sed s/^" "//g);fi
;;
#s)
# song="true"
# if [[ "$(echo "$@" | grep -Eo "\-a")" == "-a" ]];then artist="true";fi # wont go through both options if arg spaced and not quoted this solves that issue (dont need this but once had bug on system where it was necessary)
# if [[ "$(echo "$@" | grep -Eo "\-f")" == "-f" ]];then filePath=$(echo "$@" | grep -Eo "\-f [ a-z A-Z / 0-9 . \ ]*[ -]?" | sed s/-f//g | sed s/-//g | sed s/^" "//g);fi
# ;;
:)echo"Option -$OPTARG requires an argument." >&2
exit1
;;
esac
done
if[[$#=="0"]];then
usage ## if calling the tool with no flags and args chances are you want to return usage