1#!/bin/sh 2# 3# This is the script for generating files for a specific Dalton test job. 4# 5# For the .check file ksh or bash is preferred, otherwise use sh 6# (and hope it is not the old Bourne shell, which will not work) 7# 8if [ -x /bin/ksh ]; then 9 CHECK_SHELL='#!/bin/ksh' 10elif [ -x /bin/bash ]; then 11 CHECK_SHELL='#!/bin/bash' 12else 13 CHECK_SHELL='#!/bin/sh' 14fi 15 16 17####################################################################### 18# TEST DESCRIPTION 19####################################################################### 20cat > prop_hf_nacme.info <<%EOF% 21 prop_hf_nacme 22 ---------- 23 Molecule: H2 24 Wave Function: B3-LYP / 6-31G** 25 Test Purpose: Calculation of vibrational g-factor as sum 26 over all first order non-adiabatic coupling elements 27%EOF% 28 29####################################################################### 30# MOLECULE INPUT 31####################################################################### 32cat > prop_hf_nacme.mol <<%EOF% 33BASIS 34cc-pVTZ 35N2 HF NACME; basis set : cc-pVTZ 36 37 1 0 38 7.00 2 39N_a 0.000000000000000 0.000000000000000 1.037572100000000 * 40N_b 0.000000000000000 0.000000000000000 -1.037572100000000 * 41FINISH 42%EOF% 43 44####################################################################### 45# DALTON INPUT 46####################################################################### 47cat > prop_hf_nacme.dal <<%EOF% 48**DALTON INPUT 49.RUN PROPERTIES 50**WAVE FUNCTIONS 51.hf 52**PROPERTIES 53.EXCITA 54.NACME 55*RESPON 56.THRESH 57 1.0D-09 58*TROINV 59.SKIP 60*EXCITA 61.FNAC 62.NEXCITA 63 10 64.THRESH 65 1.0D-9 66**END OF DALTON INPUT 67%EOF% 68####################################################################### 69 70 71 72####################################################################### 73 74####################################################################### 75# CHECK SCRIPT 76####################################################################### 77echo $CHECK_SHELL >prop_hf_nacme.check 78cat >>prop_hf_nacme.check <<'%EOF%' 79log=$1 80 81if [ `uname` = Linux ]; then 82 GREP="egrep -a" 83else 84 GREP="egrep" 85fi 86 87if $GREP -q "not implemented for parallel calculations" $log; then 88 echo "TEST ENDED AS EXPECTED" 89 exit 0 90fi 91 92# Basis set 93CRIT1=`$GREP "H * 2 * 1\.0000 * 7 * 5 * \[4s1p\|2s1p\]" $log | wc -l` 94CRIT2=`$GREP "total\: * 2 * 2\.0000 * 14 * 10" $log | wc -l` 95TEST[1]=`expr $CRIT1 \+ $CRIT2` 96CTRL[1]=2 97ERROR[1]="BASIS SET NOT READ CORRECTLY" 98 99# Geometry 100CRIT1=`$GREP "Total number of coordinates\: * 6" $log | wc -l` 101CRIT2=`$GREP "H * \/ * 1 \: * 1 * x * (0| )\.0000000000 * 2 * y * (0| )\.0000000000 * 3 * z * 1\.5000000000" $log | wc -l` 102CRIT3=`$GREP "H * \/ * 2 \: * 4 * x * (0| )\.0000000000 * 5 * y * (0| )\.0000000000 * 6 * z * \-1\.5000000000" $log | wc -l` 103TEST[2]=`expr $CRIT1 \+ $CRIT2 \+ $CRIT3` 104ECHO[2]="$CRIT1 $CRIT2 $CRIT3" 105CTRL[2]=3 106ERROR[2]="GEOMETRY NOT READ CORRECTLY" 107 108# Symmetry 109CRIT1=`$GREP "Number of coordinates in each symmetry\: * 1 * 1 * 1 * 0 * 1 * 1 * 1 * 0" $log | wc -l` 110CRIT2=`$GREP "Number of orbitals in each symmetry\: * 3 * 1 * 1 * 0 * 3 * 1 * 1 * 0" $log | wc -l` 111TEST[3]=`expr $CRIT1 \+ $CRIT2` 112CTRL[3]=2 113ERROR[3]="SYMMETRY NOT CORRECT" 114 115# Energies 116CRIT1=`$GREP "Final MCSCF energy\: * \-1\.04697084862[0-9]" $log | wc -l` 117TEST[4]=`expr $CRIT1` 118CTRL[4]=1 119ERROR[4]="ENERGIES NOT CORRECT" 120 121# Properties setup 122CRIT1=`$GREP "The molecular gradient" $log | wc -l` 123CRIT2=`$GREP "The molecular Hessian" $log | wc -l` 124CRIT3=`$GREP "Electronic excitation energies" $log | wc -l` 125CRIT4=`$GREP "First order nonadiabatic coupling elements" $log | wc -l` 126TEST[5]=`expr $CRIT1 \+ $CRIT2 \+ $CRIT3 \+ $CRIT4` 127ECHO[5]="$CRIT1 $CRIT2 $CRIT3 $CRIT4" 128CTRL[5]=4 129ERROR[5]="CALCULATION OF VIBRATIONAL G-FACTOR NOT SET UP CORRECTLY" 130 131# Vibrational g-factor 132CRIT1=`$GREP "Vibrational g\-factor\: * H * z\[ * 3 * \- * 6\]\/2 * 1\.337[12]" $log | wc -l` 133# Vibrational g-factor: H z[ 3 - 6]/2 1.337202 ! no d-states included /hjaaj 134# Vibrational g-factor: H z[ 3 - 6]/2 1.337165 ! with 2 d-states included /hjaaj 135CRIT2=`$GREP "Vibrational g\-factor\: * H * x\[ * 1 * \+ * 4\]\/2 * (0| )\.413557" $log | wc -l` 136CRIT3=`$GREP "Vibrational g\-factor\: * H * y\[ * 2 * \+ * 5\]\/2 * (0| )\.413557" $log | wc -l` 137CRIT4=`$GREP "Vibrational g\-factor\: * H * z\[ * 3 * \+ * 6\]\/2 * 1\.438462" $log | wc -l` 138CRIT5=`$GREP "Vibrational g\-factor\: * H * x\[ * 1 * \- * 4\]\/2 * (0| )\.302475" $log | wc -l` 139CRIT6=`$GREP "Vibrational g\-factor\: * H * y\[ * 2 * \- * 5\]\/2 * (0| )\.302475" $log | wc -l` 140TEST[6]=`expr $CRIT1 \+ $CRIT2 \+ $CRIT3 \+ $CRIT4 \+ $CRIT5 \+ $CRIT6` 141ECHO[6]="$CRIT1 $CRIT2 $CRIT3 $CRIT4 $CRIT5 $CRIT6" 142CTRL[6]=6 143ERROR[6]="VIBRATIONAL G-FACTOR NOT CORRECT" 144 145PASSED=1 146for i in 1 2 3 4 5 6 147do 148 if [ ${TEST[i]} -ne ${CTRL[i]} ]; then 149 echo "${ERROR[i]} ( test = ${TEST[i]}; control = ${CTRL[i]} ); " 150 echo ${ECHO[i]} 151 PASSED=0 152 fi 153done 154 155if [ $PASSED -eq 1 ] 156then 157 echo TEST ENDED PROPERLY 158 exit 0 159else 160 echo THERE IS A PROBLEM 161 exit 1 162fi 163%EOF% 164####################################################################### 165