#!/usr/bin/perl -w # convert talls output(good) to dyanal aco file # command: perl talos2dyana.pl input(talos) output(dyana) open(FILE1, "<$ARGV[0]"); open(FILE2, ">$ARGV[1]"); #print FILE2 "#File Generated at " . localtime . "\n"; #print FILE2 "#Command used is " %s3 = ( 'P', "PRO", 'G', "GLY", 'A', "ALA", 'R', "ARG", 'N', "ASN", 'D', "ASP", 'C', "CYS", 'Q', "GLN", 'E', "GLU", 'H', "HIS", 'I', "ILE", 'L', "LEU", 'K', "LYS", 'M', "MET", 'F', "PHE", 'S', "SER", 'T', "THR", 'W', "TRP", 'Y', "TYR", 'V', "VAL" ); print FILE2 "#Talos contraints =10 only\n"; while () { chop; next if (($_ =~ /REMARK/)||($_ =~ /DATA/)||($_ =~ /VARS/)||($_ =~ /FORMAT/)); # if (($_ =~ /Good/) || ($_ =~ /New/)) # { # print FILE2 "$_\n"; ($aa, $id, $r, $phi, $psi, $dp, $ds, $d, $s2, $c, $class) = split(/[ \t\n]+/); # print FILE2 "*$id*$r*$phi*$psi*\n"; if ($c ==10) { if ($r eq "P") {} else { print FILE2 "$id\t" . $s3{$r} . "\tPHI\t" . ($phi-$dp) . "\t\t", ($phi+$dp) . "\n"; } print FILE2 "$id\t" . $s3{$r} . "\tPSI\t" . ($psi-$ds) . "\t\t", ($psi+$ds) . "\n"; } }