[Chimera-users] Scripting to write / save multiple models into single pdf file

Elaine Meng meng at cgl.ucsf.edu
Sun Mar 7 10:13:02 PST 2010


On Mar 7, 2010, at 5:12 AM, Sumitro Harjanto wrote:

> Hi Meng,
> I would like to use chimera to help me with a process of combining  
> receptors and ligands that were modelled separately (in separate  
> files)
>
> So here is my intended framework:
>
> For each iteration:
> 	• open “template.pdb” template file (which contains the receptor/ 
> ligand complex) I used to model the receptor and ligand
> 	• open the receptor_model.pdb
> 	• open the ligand_model.pdb
> 	• match receptor to template
> 	• match ligand to template
> 	• close template.pdb
> 	• save the models in their current position into a single new pdb  
> file.
>
> I was exploring the feasibility of using the command “write” but I  
> am not too sure if it will allow me to save the complex as a single  
> pdb file..?
>
> On a side note, if it’s possible, any suggestion on how to optimise  
> the run time since I might be running this for a large number of  
> iterations ..? I read somewhere about switching off the GUI to save  
> time, does it help..?
>
> Thanks!
> Cheers,
> Sumitro

Hi Sumitro,
You can't save multiple models in one file with the "write" command,  
but you can use "write"  multiple times, one for each model you want  
to save.  If you make sure to save each model "relative" to the same  
model, they will be in the correct positions with respect to each  
other when you reopen the files.  See the "relative" keyword:
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/write.html>

Or, if you really need to have them in a single file, you can use the  
"combine" command to create a new single model from multiple models.   
You would do that after the matching, but before saving the PDB file.
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/combine.html>

I can't answer about how to script for multiple models, or how much  
faster it might be to use noGUI, so I'm sending this to the chimera- 
users list.

In the future, please send Chimera questions to the chimera-users at cgl.ucsf.edu 
  list, because I might be away from work or (like now) others may be  
better able to answer the question.

I hope this helps,
-----
Elaine C. Meng, Ph.D.                          meng at cgl.ucsf.edu
UCSF Computer Graphics Lab and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco
                      http://www.cgl.ucsf.edu/home/meng/index.html






More information about the Chimera-users mailing list