[Chimera-users] Looping with Chimera commands

Eric Pettersen pett at cgl.ucsf.edu
Tue Jan 12 17:36:57 PST 2010


On Jan 7, 2010, at 2:30 PM, Yasser Almeida Hernández wrote:

> Hi...
> It's possible run a Chimera's command iteratively?
> I have loaded several structures (more than 300) and i want to  
> superimposed them to a reference structure. How i perform the  
> matching command for every structure iteratively?
>
> Thanks

Hi Yasser,
	You will need to resort to Python, though a simple script would do  
it.  Assuming you are using the matchmaker command to do the matching,  
and that the reference structure is open as model 0, then...

from chimera import runCommand
numModels = 350
for modelNum in range(1, numModels+1):
	runCommand("mmaker #0 #" + str(modelNum))

Put the above in a .py file and open it using File...Open or the  
"open" command.  Change "350" in the script to however models you have.

--Eric

                         Eric Pettersen
                         UCSF Computer Graphics Lab
                         http://www.cgl.ucsf.edu



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20100112/f5b7d898/attachment.html>


More information about the Chimera-users mailing list