# # This awk script will take the optimized cartesian coordinates from an ADF geometry optimization and make a car file # # This script was created by Lisa M. Perez at the Laboratory for Molecular Simulation and is provided as is. This script # has not been fully tested. Use at your own risk. # # Please e-mail Lisa M. Perez at mouse@mail.chem.tamu.edu with problems. # # To use this script you should make an alias in your .cshrc or .login file: # # alias adftocar 'awk -f /home/mouse/adf_to_car.awk \!*.adfout > \!*.car' # # This alias implies that you put adftocar.awk in your home directory and that your ADF output files end in .adflog # You will type car filename to execute. The script will create a file named filename.car # # last updated 03/30/04 # BEGIN{i=0} # find the final geometry /Geometry Converged/,/>>>>/ { i=i+1 #{print "i "i} if (i>3) { a[i-3]=$1 x[i-3]=$2 y[i-3]=$3 z[i-3]=$4 } } # print the results END { print "!BIOSYM archive 3" print "PBC=OFF" print "" print "!DATE "c[9] for (k=1;k<=i-3;k++) { #extract the atomic symbol split(a[k],c,FS=".") as[k]=c[2] {printf "%-2.2s%18.9f%15.9f%15.9f XXX ND ? %-2.2s 0.000\n",as[k],x[k],y[k],z[k],as[k]} } print "end" print "end" }