[Chimera-users] Chimera movie with simulation time labels ?
pett at cgl.ucsf.edu
Wed Jun 15 10:44:19 PDT 2011
To expand a little on the details, I think that outside the trajectory
script you would create a 2D label for the script to work with,
2dlabels create timer text "0 ns"
which would create a label that can be referred to with the name
"timer" in subsequent commands. Then just use the 2D Labels tool to
position, color, and size the label as you like. Then your trajectory
script would be something like:
from chimera import runCommand
runCommand("2dlabels change timer text '%.1f ns'" % (mdInfo['frame'] *
The '%.1f' part means show a floating point number with one decimal
place. You can change the label text surrounding that as
appropriate. Change 27.5 to whatever conversion factor is
appropriate, possibly adding an offset if your time doesn't start at
On Jun 15, 2011, at 10:08 AM, Elaine Meng wrote:
> Hello Marek,
> It may be possible using per-frame scripting in MD Movie (in that
> tool's menu: Per-Frame... Define script). I've definitely shown
> frame number as a label for a trajectory, details below.
> The process would be something like:
> - figure out equation to convert frame number to time
> - per-frame script would use that equation and show result as a 2D
> - record movie while the per-frame script is active
> I think it would be necessary to do it in Python, to include the
> equation part, but the script dialog provides a way to use frame
> number in the script. The only part I am concerned about is whether
> the equation output (simulation time) has to be converted to a
> character string to be used as label contents.
> I have definitely used this process to simply show the frame number
> as a label during the trajectory. That is done with a per-frame
> script of Chimera commands in the "Trajectory and Ensemble Analysis"
> tutorial, part 1:
> I hope this helps,
> Elaine C. Meng, Ph.D.
> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> On Jun 15, 2011, at 9:37 AM, Marek Maly wrote:
>> Hello all,
>> Is it possible to create Chimera movie (MD trajectory animation) with
>> simulation time labeled on the corner ? (Of course after I provide
>> some appropriate
>> dialogue the time interval between two consequent frames).
>> Thanks in advance for any hint !
>> Best wishes,
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
More information about the Chimera-users