[Chimera-users] drawing ribbon

Elaine Meng meng at cgl.ucsf.edu
Fri Apr 3 14:44:31 PDT 2015


Hi Criss,
It’s just “remembering” that the ribbon was previously set to transparent…  i.e. if you just hid ribbon before rerunning the script, it wasn’t destroyed in between, just undisplayed.  You can just set it back to 0% transparent at the top of the command file. Quitting and starting a fresh Chimera should also do it, but that’s more trouble.

I was able to get the desired appearance (if I understood you correctly) on my test protein 4enl with 436 amino acids.  First I entered these commands manually

open 4enl
rainbow

… and then I opened a command file test.com with the contents:

~ribbon; transparency 0,r
perframe "ribbon #0:$1" range 1,200
wait 200
transparency 70,r #0:1-200
perframe "ribbon #0:$1" range 201,436

… the first line being merely cleanup/reset if you are running that command file repeatedly.  You don’t need semicolons unless you are putting more than one command on the same line.

The slowdown was because you did not include a “wait” during drawing of the second half of the ribbon before stopping recording the movie, so the fast second half of ribbon display was not recording any more.  The slowdown is saving the supersampled images.  This won’t affect the movie playback, it’s just that it takes a while to save each image frame when you are recording.  When I add in the recording as well as the needed waiting, the whole thing is slow (as it has to be, to get the whole thing into your saved movie).   :-)

So my test command file with the recording was:

movie record supersample 4
perframe "ribbon #0:$1" range 1,200
wait 200
transparency 70,r #0:1-200
perframe "ribbon #0:$1" range 201,436
wait 236
movie stop
movie encode ~/Desktop/test.mp4 ~/Desktop/test.mov

… and example output movie test.mp4 is attached below. 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 Apr 3, 2015, at 1:38 PM, Hartzell Jr., Criss <criss.hartzell at emory.edu> wrote:

> I have a protein with 10 transmembrane domains and would like to make a movie in which the ribbon is drawn in time from the N- to the C- terminus. I wrote a script that does that. But, the 10 transmembrane domains become hard see because they overlap one another. To solve this problem, I wanted to make the first 600 amino acids become 70% transparent after they had been drawn. Then the drawing would continue with the second half of the protein with no transparency. The problem is that the script that I have written to do this draws the first 600 amino acids 70% transparent immediately as they are drawn. Then the second half of the protein is drawn with 0 transparency. I set the wait time to 600 because I want to execute the transparecny command after the first 600 amino acids were drawn. But, instead, the drawing of the first 600 amino acids is tremendously slowed down by this command as if a wait of some duration occurs after each amino acid rather than after all 600 amino acids. I would appreciate your help. Thanks.
> 
> movie record supersample 4;
> 
> perframe "ribbon #2:$1" range 1,600;
> 
> wait 600;
> 
> transparency 70,r #2:1-600;
> 
> perframe "ribbon #2:$1" range 601,959;
> 
> movie stop;
> 
> movie encode “d:\Dropbox\Chimera_files\movie1.mp4”;
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.mp4
Type: video/mp4
Size: 192351 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150403/c41e1c99/attachment.mp4>
-------------- next part --------------




More information about the Chimera-users mailing list