#
#################################################################### test19.job
# C-shell script for ch4 test run using G98 output for orbitals
echo "test19 - CH4, G98 output,model exchange polarization potential"
#
set ver = s # version
#
#
date
time
#
setenv wrkdir tst$$
#
source $pdc/SetUp.com
#
rm *.kmat
#
RmData
#
AddData
 PtGrp  'Td'   # point group to use
 DoSym  'yes'  # compute the blms
 LMax   20     # maximum l to be used for wave functions
 LMaxI  40     # maximum l value used to determine numerical angular grids
 LMaxA  12     # maximum l included at large r
 LMax2  40     # maximum l to be used for potentials
 PrintFlag 0   # no extra printing
 MMax   -1     # maximum m to use (-1 means use LMax)
 MMaxI  -1     # maximum m to use in angular integrations (-1 means us LMaxI)
 ECenter  0.0 0.0 0.0 # center for exapnding about
 RMax   8.5    # maximum R in inner grid
 EMax  50.0    # EMax, maximum asymptotic energy in eV
  EngForm      # Energy formulas
   0 2         # charge, formula type
   3           # number of terms in the formulas
   2.0 -1.0 1  # orbital occupation and coefficient for the K operators
   2.0 -1.0 1
   2.0 -1.0 1
  End
  PCutRd  1.0e-8  # cutoff factor used in the radial grids
  VCorr 'PN'
  AsyPol
 0.25  # SwitchD, distance where switching function is down to 0.1
 1     # nterm, number of terms needed to define asymptotic potential
 1     # center for polarization term 1 is for C atom
 1     # ittyp type of polarization term, = 1 for spherically symmetric
       # = 2 for reading in the full tensor
 17.50 # value of the spherical polarizability
 3     # icrtyp, flag to determine where r match is, 3 for second crossing
       # or at nearest approach
 0     # ilntyp, flag to determine what matching line is used, 0 - use
       # l = 0 radial function as matching function
 End
 ScatEng     # list of scattering energies
  5
  0.1 0.5 2.0 10.0 20.0
 End
 FegeEng 0.477398   # Energy correction used in the fege potential
 LMaxK   10     # Maximum l in the K matirx
IterMax  -1    # 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/test19.g98 g98
GetBlms
ExpOrb
GetPot
#
AddDataRec LocExchg 'fege'
setenv SaveItStem $cwd/fege
#
AddDataRec ScatContSym 'A1'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'A2'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'E'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'T1'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'T2'  # Scattering symmetry
Scat
#
cp fege.kmat fort.72
$pde/ver$ver/xsec.exe <<eoi || exit 1
0 72 1 0 -1 -1 0 40 73 'CH4 total cross section using fege exchange'
eoi
echo "Partial cross sections"
cat fort.73
$pde/ver$ver/xsctot.exe <<eoi || exit 1
  73 0
  0
eoi
rm fort.72 fort.73
#
AddDataRec LocExchg 'msce'
setenv SaveItStem $cwd/msce
#
AddDataRec ScatContSym 'A1'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'A2'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'E'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'T1'  # Scattering symmetry
Scat
#
AddDataRec ScatContSym 'T2'  # Scattering symmetry
Scat
#
cp msce.kmat fort.72
$pde/ver$ver/xsec.exe <<eoi || exit 1
0 72 1 0 -1 -1 0 40 73 'CH4 total cross section using msce exchange'
eoi
echo "Partial cross sections"
cat fort.73
$pde/ver$ver/xsctot.exe <<eoi || exit 1
  73 0
  0
eoi
rm fort.72 fort.73
#
date
time
#
rm *
cd ..
rmdir $wrkdir
exit