#!/usr/local/bin/perl -w # this is a single-use filter script to move # residues 170-182 #to get this piece out of the way # move-try47.perl < decoys/T0129.try46-opt.pdb > decoys/T0129-try46-opt-moved.pdb while($line=) { if ($line!~/ATOM/) { print $line; next; } $resnum=substr($line,22,4); if ($resnum <170) { print $line; next; } if ($resnum<182) { $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, $y, $z+20, substr($line,54); } else { print $line; } }