#!/bin/sh
set -x

#   4.  Get results for odd n=3,4,5,6 

for n in 3 4 5 6
do 
   (cp odd${n}.c rcsl.inp

#  Get angular data
$GRASP/bin/mcp3 <<S4
y
S4

# Get initial estimates of wave functions
m=`expr $n - 1`
echo m=$m n=$n
$GRASP/bin/erwf <<S5
y
1
odd${m}.w
*
3
*
S5

# Perform self-consistent field calculations
$GRASP/bin/rscf2 > out_rscf2_${n} <<S6
y
y
1
1
5
${n}*

100
S6

$GRASP/bin/rsave odd${n}

   echo)
done


#  Perform Breit-correction using CI for n=6 

n=6
$GRASP/bin/rci3  <<S7
y
odd${n}
y
y
1.d-6
y
n
n
y
4
1
1
S7

#   4.  Get results for even n=3,4,5,6 

for n in 3 4 5 6
do 
   (cp even${n}.c rcsl.inp

#  Get angular data
$GRASP/bin/mcp3 <<S4
y
S4

# Get initial estimates of wave functions
m=`expr $n - 1`
echo m=$m n=$n
$GRASP/bin/erwf <<S5
y
1
even${m}.w
*
3
*
S5

# Perform self-consistent field calculations
$GRASP/bin/rscf2 > out_rscf2_${n} <<S6
y
y
1,2,3
1,2,3
1,2
5
${n}*

100
S6

$GRASP/bin/rsave even${n}

   echo)
done


#  Perform Breit-correction using CI for n=6 

n=6
$GRASP/bin/rci3  <<S7
y
even${n}
y
y
1.d-6
y
n
n
y
4
1,2,3
1,2,3
1,2
S7



