#
#################################################################### test10.job
# C-shell script for N2 resonance test run using NDG output for orbitals
echo "test10 - N2 resonance, NDG output, polarization potential"
#
set ver = s # version
#
# $pdc/comp.job $ver >& $TMPPRG/comp$ver.out || exit 1
#
date
time
#
setenv wrkdir tst$$
#
source $pdc/SetUp.com
#
#
AddData
 PtGrp 'DinfhG' # point group to use
 DoSym  'yes'  # compute the blms
 LMax   30     # maximum l to be used for wave functions
 LMaxI  60     # maximum l value used to determine numerical angular grids
 LMaxA  12     # maximum l included at large r
 LMax2  60     # maximum l to be used for potentials
 PrintFlag 0   # no extra printing
 MMax    2     # maximum m to use (-1 means use LMax)
 MMaxI   4     # 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
  VCorr 'PZ'
  AsyPol
 0.25  # SwitchD, distance where switching function is down to 0.1
 1     # nterm, number of terms needed to define asymptotic potential
 0     # center for polarization term, 0 is for read in center
 0.0 0.0 0.0   # use molecular center for polarization term
 2     # ittyp type of polarization term, = 1 for spherically symmetric
       # = 2 for reading in the full tensor
 10.204 10.204 14.824 0.0 0.0 0.0 # axx, ayy, azz, axy, axz, ayz
 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
 DPotEng  1 2.3   # list of scattering energies
 FegeEng  0.5732847   # Energy correction used in the fege potential
 DPotSym 'PIG'  # Scattering symmetry
 NAbPw    5     # number of adibatic partial waves
 NIntReg  30    # Number of integration regions, number needed is controlled
                # by the instability in the integrator
 DPotRMax     11.5  # maximum R in the DPot potential
 RdbIntEng  1.0 50.0 1.0 # energies for RdbInt
 ResSearchEng         # energy region to search
  1                   # nengrb - number of energy step regions
  9.187255E-3 9.187255E-3
   .22049412        - # final ending point, engrb(nengrb+1)
   .2               - # eendzi, largest imaginary part
  0.04                # estpzi, imaginary energy step
 End
 RdbRMax  11.6        # Maximum R used in the search for resonances
eoi
#
Convert $pdt/test10.ndg ndg
GetBlms
ExpOrb
GetPot
GetDPot
RdbInt
ResSearch
ResWvFun
ResWvFun  1  0.13148983706054E+00  -0.17239502778766E-01
#
rm fort.70 fort.71
$pde/ver$ver/vieworb.exe <<eoi || exit 1
 41 - # iuang, unit with angular grid
 54 - # iugrd, unit with grid information
 62 - # iuanrd, unit with angular cutoff information
 -82 - # iuxorb, unit with expanded orbitals
 70 - # iuvorb, output unit for orbitals on cartesian grid
 -1   # iujorb, output unit for flux on cartesian grid
 1 5 6      # read in ktype translations, swap PIG X and Y
 0.0 0.0 0.0  - # center of the grid
 0.0 0.0 1.0  - # first direction
 1.0 0.0 0.0    # second direction
 -2.0 2.0 1.0  # cmin, cmax, cstep in x direction
 -2.0 2.0 1.0  # cmin, cmax, cstep in y direction
 -2.0 2.0 1.0  # cmin, cmax, cstep in z direction
  0             # plot all orbitals
eoi
date
time
# write out the expanded orbitals
sed  's/^ /VRes /' fort.70
#
date
time
#
rm *
cd ..
rmdir $wrkdir
exit