#!/usr/bin/perl #perl script to take exported spin systems from Felix (Felix97) and #convert them to the GAENXPK four column format #user must supply the column number from which to take the #assignments-- which experiment is in which column will depend on #the order in which experiments were added to the project. To #determine the correct column, use the "Report Spin System" command #in the Assign menu pulldown. The order of columns in this report is #the same as the order of columns in the exported spin systems file #Melanie Nelson #3/26/99 if ($#ARGV != 1) { $prg_name = $0; $prg_name = `basename $prg_name`; chomp ($prg_name); die<outputfile] input_column = the number of the column from which the assignments should be read. Columns are numbered from "1" from the left: i.e., the column with the residue name and atom name is column 0, the first column of assignments is column 1, etc. Use the "Report Spin System command is the "Assign" pulldown menu to determine the correct column. The order of columns in this report is the same as the order in the exported spin systems file. EODIE } $colnum = $ARGV[1]; open (PATFILE, $ARGV[0]) || die "Could not open $ARGV[0]!\n"; while (){ chomp; next if /PATTERN/; @line = split; ($junk, $res, $atom) = split (/:/, $line[0]); ($resname, $resnum) = split (/_/, $res); $assign = $line[$colnum]; #fix naming of atoms if ($atom eq "N"){ $atom = "NN" } printf "%4d %3s %4s %7.3f\n", $resnum, $resname, $atom, $assign; }