From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Feb 05 2008 - 13:48:02 CST

Jim,
  Where's the code for your "phi" proc? I don't see it below.
Most likely your "phi" proc is incorrectly written.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Feb 05, 2008 at 06:26:47PM +0100, Jim Pfaendtner wrote:
> Dear VMD-L,
>
> I am trying to calculate several angles for each frame in my
> trajectory. I'm using the geometry.tcl script posted on the vmd
> website.
>
> This code:
>
> animate read dcd $dcdf beg 0 end $nf waitfor all
> animate goto start
>
> puts [phi 0 PRO 35]
> animate next
> puts [phi 0 PRO 35]
> animate next
> puts [phi 0 PRO 35]
> animate next
>
> works fine. It prints out the phi angle or the first three frames in
> the trajectory with no problem. When I put this same code in a loop,
> it doesn't work at all:
>
> animate read dcd $dcdf beg 0 end $nf waitfor all
> animate goto start
>
> for { set j 0 } { $j < 3} { incr j } {
> puts [phi 0 PRO 35]
> animate next
> }
>
> this code just prints out the value from frame 0 three times.
>
> Does anyone have any suggestions as to why this doesn't work? There
> are a number of different ways to code this problem, but this way is
> convenient. Also, it's really puzzling to me why this simple loop
> isn't working right.
>
> Any suggestions are greatly appreciated.
>
> Jim

-- 
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