if grep -q 'CONVERGED' ReportFile; then
echo "MECP optimization has converged at Step $num"
date >> ReportFile
exit
else
echo "Step Number $num -- MECP not yet converged"
fi
if grep -q 'ERROR' ReportFile; then
echo 'An error has occurred, possibly in the Gaussian Job'
exit
fi