#!/bin/bash

######################################
#
# you might have to change the following variables
#
######################################
#
# Name of the input file
#
Job=CSMe6_Syn
#
# Where is Path.exe ??
#
PathExe=~/Programs/Chemin/OpenPath/src/Path.exe
#
### MOPAC Stuff
# In fact, this is useless as they are defined again in the mopac script
cat << EOF > ./mopac
#!/bin/bash

set -x
## You might have to change MOPAC_ROOT and/or MOPAC_LICENSE
export MOPAC_ROOT=~/Programs/MOPAC2009
export MOPAC_LICENSE=\${MOPAC_ROOT}
export mopac=\${MOPAC_ROOT}/MOPAC2009.exe

echo "Running \${mopac} \$1"
\${mopac} \$1
Out=\`basename \$1 .mop\`.out

EOF
chmod u+x ./mopac
#
# Some libraries... that might need to be adapted to your system
#
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/fc/9.1.037/lib/:/opt/intel/cc/9.1.045/lib:/usr/lib:/opt/intel/mkl/8.1/lib/32
export PATH=/opt/intel/fc/9.1.037/bin/:/opt/intel/cc/9.1.045/bin/:$PATH:$HOME/bin:/usr/local/mpich-intel9/bin
export LD_RUN_PATH=$LD_RUN_PATH:/opt/intel/fc/9.1.037/lib/:/opt/intel/cc/9.1.045/lib
export MANPATH=$MANPATH:/opt/intel/fc/9.1.037/man/:/opt/intel/cc/9.1.045/man
export LANG=C
#
#Usually nothing has to be changed after this line
#
#################################################

###############################
#
# We launch PATH
#
###############################
ln -fs ${PathExe} .

./Path.exe ${Job}.path &> ${Job}.out



