#!/usr/bin/perl # # nv_hnha2tbl Perl script # converts J coupling data file output by nmrView hnha analysis # into CNS/Aria format tbl restraint file. # Reads standard input and writes to standard output # Usage: # nv_hnha2tbl outputfile # # Note: set error variable to J coupling error # $error = .05; while () { chop; ($num,$res,$h1,$h2,$coupl,$err) = split; printf "assign (resid %4i and name C ) (resid %4i and name N )\n", $num-1, $num; printf " (resid %4i and name CA) (resid %4i and name C ) %7.2f %7.2f\n", $num,$num,$coupl,$error; }