[Chimera-users] Chimera movie with simulation time labels ?
Marek Maly
marek.maly at ujep.cz
Wed Jun 15 10:42:30 PDT 2011
Dear Eric,
thanks a lot for providing all the necessary details !
Best wishes,
Marek
Dne Wed, 15 Jun 2011 19:44:19 +0200 Eric Pettersen <pett at cgl.ucsf.edu>
napsal/-a:
> 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,
> something like:
>
> 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'] *
> 27.5))
>
> 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 zero.
>
> --Eric
>
> 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.
>>
>> <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/movie/framemovie.html>
>> <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/movie/movie.html#per-frame>
>>
>> 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 label
>> - 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:
>> <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ensembles2.html>
>>
>> I hope this helps,
>> Elaine
>> -----
>> 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
>>> through
>>> some appropriate
>>> dialogue the time interval between two consequent frames).
>>> Thanks in advance for any hint !
>>> Best wishes,
>>> Marek
>>
>>
>> _______________________________________________
>> Chimera-users mailing list
>> Chimera-users at cgl.ucsf.edu
>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>
--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:
http://www.opera.com/mail/
More information about the Chimera-users
mailing list