From: Mark M Huntress (markmh_at_bgsu.edu)
Date: Thu Mar 31 2011 - 15:32:33 CDT

Hi, I wrote a script to center my molecule (resid 1) in the middle of a solvent box for every frame of a trajectory. I was very happy with myself, and proud of writing a good script, until it didn't work, and I can't figure out why it doesn't work. It seems to go on an infinite loop, and not change the frame from 1. Any ideas?

set nf [molinfo top get numframes]
for { set i 1 } { $i <= $nf } { incr $i } {
molinfo top set frame $i
pbc wrap -centersel {resid 1} -center com -compound res
}

Thanks,
Mark