#
#################################################################### test15.job
# C-shell script for N2 test run using ND Gamess output for orbitals
echo " N2, ND Gamess output, static exchange"
echo " In the region of the pi-g shape resonance"
echo " Do all symmetries and calculate DCS"
#
set ver = s # version
#
# $pdc/comp.job $ver >& $TMPPRG/comp$ver.out || exit 1
#
date
time
#
setenv wrkdir tst$$
#
source $pdc/SetUp.com
#
# cat <<eoi >test15.inp
#  \$CONTRL TIMLIM=3000 MEMORY=800000 \$END
#  \$CONTRL SCFTYP=RHF MAXIT=60   RUNTYP=ENERGY   UNITS=BOHR \$END
#  \$SCF DAMP=.TRUE. NPUNCH=1 \$END
#  \$BASIS  GBASIS=TZV POLAR=HONDO7 NDFUNC=1 NPFUNC=1 \$END
#  \$DATA
# N2 TZV SCF basis set
# DNH      4
#
# NITROGEN   7.0    0.0       0.0            1.034
#  \$END
#  \$GUESS GUESS=HCORE \$END
# eoi
# ndgams test15 >test15.ndg
#
AddData
 PtGrp 'Dinfh' # point group to use
 DoSym  'yes'  # compute the blms
 LMax   15     # maximum l to be used for wave functions
 LMaxI  30     # maximum l value used to determine numerical angular grids
 LMaxA  12     # maximum l included at large r
 LMax2  30     # maximum l to be used for potentials
 PrintFlag 0   # no extra printing
 MMax    8     # maximum m to use (-1 means use LMax)
 MMaxI  16     # maximum m to use in angular integrations (-1 means us LMaxI)
 ECenter  0.0 0.0 0.0 # center for exapnding about
 RMax  12.0    # maximum R in inner grid
 EMax  50.0    # EMax, maximum asymptotic energy in eV
  EngForm      # Energy formulas
   0 0
  End
  PCutRd  1.0e-8  # cutoff factor used in the radial grids
 ScatEng  4 3.0 4.0  5.0 6.0  # list of scattering energies
 FegeEng 0.477398   # Energy correction used in the fege potential
 LMaxK    4    # Maximum l in the K matirx
IterMax  15    # Maximum Number of iterations
GrnType  0     # type of Green function (0 -> K matrix, 1 -> T matrix)
CnvgKMat 1.0e-6 # Convergence of the K matrix
NIntReg  10    # Number of integration regions, number needed is controlled
               # by the instability in the integrator
LMaxEx   -1    # -1 implies all terms (2*LMax) alternatively one can use just
               # LMax to save computer time
eoi
#
Convert $pdt/test15.ndg ndg
GetBlms
ExpOrb
GetPot
#
setenv SaveItStem $cwd/finalkmats
rm finalkmats*.kmat
#
AddData
 ScatContSym 'SG'  # Scattering symmetry
eoi
Scat
#
AddData
 ScatContSym 'SU'  # Scattering symmetry
eoi
ScatM 3.0 4.0  5.0 6.0
#
AddData
 ScatContSym 'PG'  # Scattering symmetry
eoi
ScatN 3.0 1.0 4
#
AddData
 ScatContSym 'PU'  # Scattering symmetry
eoi
ScatN 3.0 1.0 4
#
AddData
 ScatContSym 'DG'  # Scattering symmetry
eoi
ScatN 3.0 1.0 4
#
AddData
 ScatContSym 'DU'  # Scattering symmetry
eoi
ScatN 3.0 1.0 4
#
AddData
 ScatContSym 'FG'  # Scattering symmetry
eoi
ScatN 3.0 1.0 4
#
AddData
 ScatContSym 'FU'  # Scattering symmetry
eoi
ScatN 3.0 1.0 4
#
AddData
 ScatContSym 'GG'  # Scattering symmetry
eoi
ScatN 3.0 1.0 4
#
cat finalkmats*.kmat > fort.72
#
$pde/ver$ver/edcs.exe << eoi || exit 1
 40 - # iuins, unit with full symmetry information
 72 - # iukmat, unit with k matrices
 73   # iuplt, output unit for final DCS
  0   # iprint, print flag
'Elastic differential cross section N2'   # title
  4   # lmax, maximum l to use from k matrices
  8   # lbig, maximum l in expansion of DCS
181   # nang, number of angles to compute the cross section at
  4  - # NEng, number of energies to compute the DCS at
 3.0 4.0 5.0 6.0
eoi
#
date
time
#
rm *
cd ..
rmdir $wrkdir
exit