#!/usr/local/bin/perl -w # this is a single-use filter script to move # residues 161-171 #to get this piece out of the way # move-try19.perl < decoys/T0162.try17-try6.0.120.pdb > decoys/T0162.try17-try6.0.120-moved.pdb while($line=) { if ($line!~/ATOM/) { print $line; next; } $resnum=substr($line,22,4); if ($resnum <161) { print $line; next; } if ($resnum<172) { $x= substr($line,30,8); $y= substr($line,38,8); $z= substr($line,46,8); printf "%s%8.3f%8.3f%8.3f%s", substr($line,0,30), $x-10, $y-1, $z-4, substr($line,54); } else { print $line; } }