#
#################################################################### test09.job
# C-shell script for SF6 test run using CADPAC output for orbitals
echo "test09 - sf6, CADPAC output, polarization potential"
echo "       - view virtual orbitals"
#
set ver = s # version
#
# $pdc/comp.job $ver >& $TMPPRG/comp$ver.out || exit 1
#
date
time
#
setenv wrkdir tst09.$$
#
source $pdc/SetUp.com
#
# cadpac  << eoi >test08.cad
# TITLE
# SF6 SCF CALCULATION. Minimum basis
# ANGSTROM
# VARIABLES
# RSF 1.5602262 A
# END
# SYMMETRY
# OH
# END
# ATOMS
# S1  16.0 0.0 0.0 0.0
# LIBRARY SSTO3G
# LIBRARY S*
# END
# Z1 -1.0    0.0          0.0          -1.0
# F1 9.0 LC S1 Z1 RSF
# LIBRARY FSTO3G
# END
# END
# PRINT ALLVECTORS
# START
# FINISH
# eoi
#
AddData
 PtGrp  'Oh'   # point group to use
 DoSym  'yes'  # compute the blms
 LMax   15     # 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  30     # 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   14.0   # maximum R in inner grid
 EMax  50.0    # EMax, maximum asymptotic energy in eV
 PCutRd  1.0e-8  # cutoff factor used in the radial grids
 CnvOrbSel -1  # get all orbitals
 ExpOrbSel 17 20 # get orbital groups 17 through 20
eoi
#
Convert $pdt/test09.cad cad
GetBlms
ExpOrb
#
$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
 -55 - # iuxorb, unit with expanded orbitals, read in symmetry type translations (see output of anggct)
 70 - # iuvorb, output unit for orbitals on cartesian grid
 -1   # iujorb, output unit for orbitals on cartesian grid
  2    - # map two symmetries to other types
  3 4  - # from EG-1 to EG-2
  8 10   # from T2G-1 to T2G-3
 0.0 0.0 0.0  - # center of the grid
 1.0 0.0 0.0  - # first direction
 0.0 1.0 0.0    # second direction
 -4.5 4.5 1.0   # cmin, cmax, cstep in x direction
 -4.5 4.5 1.0   # cmin, cmax, cstep in y direction
  0.0 0.0 1.0   # cmin, cmax, cstep in z direction
  4 1 2 3 4     # plot four orbitals, the first orbitals from groups 1 to 4
eoi
date
time
# write out the expanded orbitals
sed  's/^ /VRes /' fort.70
#
date
time
#
#
$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
 -55 - # iuxorb, unit with expanded orbitals, read in symmetry type translations (see output of anggct)
 70 - # iuvorb, output unit for orbitals on cartesian grid
 -1   # iujorb, output unit for orbitals on cartesian grid
  2    - # map two symmetries to other types
  3 4  - # from EG-1 to EG-2
  8 10   # from T2G-1 to T2G-3
 0.0 0.0 0.0  - # center of the grid
 1.0 0.0 0.0  - # first direction
 0.0 1.0 0.0    # second direction
 -4.5 4.5 0.5   # cmin, cmax, cstep in x direction
 -4.5 4.5 0.5   # cmin, cmax, cstep in y direction
 -4.5 4.5 0.5   # cmin, cmax, cstep in z direction
  2 1 2     # plot two orbitals, the first orbitals from groups 1 and 2
eoi
date
time
setenv curwork $cwd
setenv ensightwork $TMPDIR/ensight$$
mkdir $ensightwork
cd $ensightwork
rm fort.70 fort.51
ln -s $curwork/fort.70 fort.70
ln -s $curwork/fort.51 fort.51
#
$pde/ver$ver/ensight.exe << eoi || exit 1
  70 0  51
eoi
cat <<eoi >vieworb.cmds
VERSION 7.10
connect: backend
connect: machine terminator.tamu.edu
connect: executable ensight7.server
connect: type manual
connect: connect
data: native_binary ON
data: format ensight
data: path /tmp/rrl581a/ensight
data: geometry geometry.dat
data: result result.dat
data: measured nuclei.dat
data: start_time 1
data: read
data_partbuild: begin
data_partbuild: data_type unstructured
data_partbuild: select_all
data_partbuild: description
data_partbuild: create
data_partbuild: end
part: select_begin
 2
part: select_end
part: modify_begin
part: visible OFF
part: modify_end
variables: activate real
part: select_begin
 2
part: select_end
isos: begin
isos: variable real
isos: value 1.0000e-01
isos: type isosurface
isos: end
isos: create
part: select_begin
 3
part: select_end
part: select_begin
 2
part: select_end
isos: begin
isos: variable real
isos: value -1.0000e-01
isos: type isosurface
isos: end
isos: create
part: select_begin
 4
part: select_end
part: select_begin
 3
part: select_end
part: modify_begin
part: colorby_rgb 1.0000e+00 0.0000e+00 0.0000e+00
part: modify_end
part: select_begin
 4
part: select_end
part: modify_begin
part: colorby_rgb 0.0000e+00 1.0000e+00 0.0000e+00
part: modify_end
view: hidden_surface ON
eoi
#
rm fort.70 fort.51 fort.96
cd $curwork
time
date
rm *
cd ..
rmdir $wrkdir
exit