From: Jim Pfaendtner (jpfaendt_at_hec.utah.edu)
Date: Tue Feb 05 2008 - 13:55:29 CST

Hi John,

the phi proc came from geometry.tcl (http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/geometry/geometry.tcl
)

I guess I have to do some re-writing to make it compatible with the
loop. It just seemed really strange to me that when I typed out the
three commands manually it worked, but it didn't work within the loop
itself. The loop I wrote doesn't do anything except run the phi proc
and animate next 3 times.

Thanks,
Jim

On Feb 5, 2008, at 8:48 PM, John Stone wrote:

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