#!/bin/sh
if [ ! -f $1.dat ]; then 
	echo "No such file - $1.dat - exiting!!"
	exit
fi
#if -e FOR006 goto warning
cp $1.dat FOR005
echo "Mopac job $1 started"
MOPAC7
mv FOR006 $1.out
mv FOR012 $1.arc
rm FOR0* SHUTDOWN
if [ -f DICTNRY ]; then
   rm DICTNRY
fi
echo "Mopac job $1 has finished"
exit

warning:
#  there are already some FOR0?? files in the working directory
#
echo ' There are some FOR0?? files in the working directory.'
echo ' It is possible, that you are trying to run several Mopac jobs'
echo ' in the same directory simultaneously. This is not possible however.'
echo ' If it's not the case remove existing FOR0?? files. Good luck!'
exit








