#! /usr/bin/awk -f # pdbamb v.1.0 # # gawk script to convert coordinate files in PDB format to Amber format # for UHBD calculations. # # written by Terence P. Lo # DEC/96 # TSRI #modified by M.Nelson, 11/20/97 # # run with 'pdbamb xxx.pdb > xxx.amb' { third_field = $3 count++ first_char = substr($3,1,1) if (first_char ~ /[^A-Z]/){ rest_field = substr($3,2) third_field = rest_field first_char } printf ("ATOM %5d %-4s %-4s %4d %8.3f%8.3f%8.3f 1.00 %5.2f\n", \ count, third_field, $4, $5, $6, $7, $8, $10) } # *** FINIS *** T.P. Lo ***