#!/bin/sh
set -x

#   4.  Get results for n=3,4 (or n=3,4,5 for large calculation
#       To make this test run short, the loop is terminated with 
#       n = 4.  To continue remove the "#" from the next line

for n in 3 4 # 5 
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
*
2
*
S5

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

100
S6

$GRASP/bin/rsave odd${n}

   echo)
done


#  Perform Breit-correction using CI for n=4 (for small calculation)

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


