#!/usr/local/bin/bash
#   start 
./a162cgGS1 
#   energy 
#
cat a162poig.dat > a162PointAll
cat obena162 a162poig.dat > a162.input 
#
# call guassian03
#
./subg3a162 
#
cat a162.output >> a162All
grep  'SCF Done'  a162.output >> a162EnergyAll
grep  'SCF Done'  a162.output > a162energy   
tr -s ' ' < a162energy > a162entr 
cut -d' ' -f6 a162entr > a162energy
cp  a162energy a162ener.dat 
cp  a162energy a162keten.weg
grep 'SCF Done' a162.output >> a162proto.txt
#
grep D176 a162.output |grep estimate >>a162D176All
grep D187 a162.output |grep estimate >>a162D187All
#
export num=5
grep -n 'Axes restored to original set' a162.output | head -n 1 >a162Noline
cut -d':' -f1 a162Noline > a162Noli
./numa162
export num=$?
export num=$[$num+2500+166]
head -n $num a162.output |tail -162  >a162gradfile 
cat a162gradfile >> a162GradAll
cp  a162gradfile a162grad.dat
#
# projector by hand only once
###     ./a162cg2rcm 
# predictor by its own scratch file after first corrector
###     ./a162cgGS5
exit
#     to      GS  cycle 
