[Chimera-users] batch production of images

Benjamin SCHWARZ schwarz.ben at gmail.com
Mon Apr 22 06:00:24 PDT 2013


Hi Tom, and thanks a lot for the answer,

   With your suggestions I managed to do all I wanted, so everything is fine. 
Still, there are a few points I'd like to dig a bit deeper. When loading a markerSets file, I have a model created per MarkerSet object, and thus, several models to close prior to open the next file from which I want to shoot a picture. Is there a way to get the Model-Ids that were created from the last open call ? And by the way, is there a notion of 'variable' in chimera commands ?

    --Ben

>  You can use the Mac Chimera to run a batch job rendering images.  Just start the normal graphical Chimera, open your batch script, iconify Chimera, and maybe your images are ready later in the day or the next day.  Chimera needs to have a window on the display in order to render and save images using the OpenGL graphics.
>  So you can't log out before it is done.  You would use the "headless" Linux Chimera when you need the processing to run when you are not logged in, or you need it to run on a server that has no display.
> 
>  Yep, just use runCommand("copy ...") in your Python batch processing script to save the images.
> 
>  To get the same view point for every image I would open the first model and by hand get the view point you want, then undisplay that model (using Model Panel, or command ~modeldisp #0).  Save this session so you will be able to retrieve the exact view point used in the future if you need to create more images. Now load your Python batch processing script which should load a model, save an image, then close that one model, and iterate over all models.  All the while, the original model you opened by hand is still open and undisplayed.  The reason you keep it open and undisplayed is because as long as one model stays open Chimera keeps the current view point.  If you close all models, then open one, it resets the view to show that one.
> 
>  There is a basic primer on Chimera Python scripts in the Programmer's Guide that shows batch image saving
> 
> http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html
> 
>  Tom
> 
> 
> -------- Original Message --------
> Subject: [Chimera-users] batch production of images
> From: Benjamin SCHWARZ
> To: UCSF Chimera Mailing List
> Date: 4/19/13 7:52 AM
>> Dear list,
>> 
>>    I am considering to use chimera to render (a tons of) pictures of models that I generated and issued in nice markerSet (.cmm) files.
>> 
>> 1. If I understand well, the only way to do that is through the linux headless version, and there is no way to do that under MacOS X for the moment
>> 
>> 2. I should then use the "copy" command. Something like : chimera --nogui --script "myscript.py"
>>   where myscript.py should contain something like  "from chimera import runCommand; runCommand('copy file pipo.png')"
>> 
>> 3. All my models were produced in a same cartesian, and I'd like to keep the orientation and "picture frame" similar for all pictures. What I mean here, is that I'd like to be able to set my camera somewhere, looking in a specified direction, which I would probably do under the chimera GUI; and then, shoot all my pictures from that point of view on a batch mode.
>> How shall I do that (set a point of view for the camera and use it on a batchmode) ?
>> 
>>           Thanks a lot again for your great job, and your constant answers
>> 
>> 		--Ben
>> _______________________________________________
>> Chimera-users mailing list
>> Chimera-users at cgl.ucsf.edu
>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>> 
> 

---
  Benjamin SCHWARZ  
  Email : schwarz at igbmc.fr
  Voice : +33 (0)3 68 85 47 30
  FAX : +33 (0)3 68 85 47 18

Biocomputing group -- Integrated Structural Biology -- IGBMC 
1 rue Laurent Fries, BP 10142
F - 67404 Illkirch CEDEX
FRANCE




More information about the Chimera-users mailing list