Vibrational Animation

# This is a script to produce vibrational pdb file to be animated

 

This is a script to produce vibrational pdb file to be animated by Xmol. It requires the
 ef.dump file it is initiated by typing tclsh X_ef.ani > X_ef.log & at the prompt

set env(GRACE_LIB) /users/organic/guiseppe/temp

source $env(GRACE_LIB)/grace.tcl

init i n

START GRACE PROCESS

tell the script were grace is situated and get it going

source ef.dump

Now source the ef file from a ts searching script

set symbols "C H H H O C H H O H H Cl"

Now we must tell grace what the atomic symbols are as they are not stored in the ef.dump file

list>array list=symbols array=atsy

Set symbols into an array atsy

la symm matrix=h

la eign matrix=h

Diagonalise the Hessian, putting the vectors into roots and values into values

pmatrix matrix=values

print out the values

Define a procedure for writing out pdb file

proc pdb_write {pos atsy outf}{

call by reference

upvar $pos posv $atsy atsyv

p>xyz p=posv x=xv y=yv z=zv

convert position vector into xyz

 

 

set c 0

foreach i [array names xv] {

incr c

puts $outf [format {%-4s %5i %2s%2s %-4s%5i %8.3f%8.3f%8.3f%6.2f%6.2f} ATOM $c $atsyv($c) "" REAC 1 $xv($c) $yv($c) $zv($c) 0.0 0.0]

}

puts $outf END

}

 

send out section to pdb file

set c 0

foreach i [array names roots] {

incr c

loop through all eign values and vectors and make an animation of each

 

 

if {$c == 2} break

c = the number of pdb files required minus one

list>array list=roots($c) array=move

make the root into a veticle vector

la mplm matrixl=move matrixr=x result=plus

add it to the position vector

la mbys matrix=move scale=-1.0 result=mmove

la mplm matrixl=mmove matrixr=x result=minus

subtract it to the position vector

set file [open X_ts_vib[set c].pdb w]

Open the pdb file and name it

pdb_write minus atsy $file

write out minus

pdb_write x atsy $file

write out start

pdb_write plus atsy $file

write out plus

pdb_write x atsy $file

write out start

close $file

}

close file

# EOF