From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Mar 31 2011 - 15:39:01 CDT

Mark,
  instead of "incr $i", you should have "incr i".

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Mar 31, 2011 at 04:32:33PM -0400, Mark M Huntress wrote:
> 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

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078