#!/usr/local/bin/perl -w # this is a single-use filter script to move # residues L12-V35 #in an attempt to get helix on the right side # move-residues17.perl < decoys/T0148.try17-try15.5.80.pdb > decoys/T0148-moved17.pdb while($line=) { if ($line!~/ATOM/) { print $line; next; } $resnum=substr($line,22,4); if ($resnum <12 || $resnum >35) { print $line; next; } $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+16, $y-15, $z-15, substr($line,54); } }