One more suggestion about how to convert frame numbers to seconds in the perframe command for showing a label.  You can use the perframe "range" option with floating point values, for example,

perframe "echo $1" range 0,0.4 frames 11

0
0.04
0.08
0.12
0.16
0.2
0.24
0.28
0.32
0.36
0.4

So you would use the range option to specify the time interval corresponding to the specified number of frames (minus one).

tom


On Jun 26, 2019, at 6:02 AM, CLARA BLANES MIRA <c.blanes@goumh.umh.es> wrote:

Dear chimera users,

I have two doubts regarding per-frame actions:

1) I am trying to add a counter in my script (commands script, no python script). 

It works when I do it as a per-frame action in the MD Movie window (just as Elaine does in the’Trajectory and ensemble Analysis Tutorial’)  but I am not able to do insert it in my command script: 

Something like this:



movie record
2dlabels create timer text “frame 0" size 40 color white
alias ^actions 2dlabels change timer text "frame <FRAME>"

perframe actions; coordset #0 1,216000,1000 load false; wait 216; ~perframe  
movie encode movie.mp4


2) What I really want is to show nanoseconds, not frames. In my case 1000 frames = 1 ns. When I write frame <FRAME>/1000 in MD Movie window, obviously, it does not work. Any suggestion to make it work and insert it in the commands script?

Thank you very much!,
Clara

_______________________________________________
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu
Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users