[chimera-dev] Fwd: Dividing a model into seperate models - one for each chain

Mateusz Dobrychłop dobry at g.pl
Wed May 9 11:46:43 PDT 2012


---------- Forwarded message ----------
From: Mateusz Dobrychłop <dobry at g.pl>
Date: 2012/5/9
Subject: Re: [chimera-dev] Dividing a model into seperate models - one for
each chain
To: Chimera BB <chimera-users at cgl.ucsf.edu>


Hi Tom,

Thank you very much for your response.

My exact problem is that I'm trying to find a way to automatically save all
the models (and submodels) that are opened in Chimera at a time. It's easy
when models are numbered #0, #1, #2 etc - then, I use:

opened=openModels.list()
howmany=len(opened)
while howmany>=0:
     command="write "+str(howmany)+" "+o_path+"/"+str(howmany)+".pdb"
     runCommand(command)
     howmany-=1

Unfortunately, when I split, let's say, #0 that contains 3 chains, and then
use the above code, I get an error:

MidasError: 3 model ids match "0"

So maybe there's a different way to do it? I'd like to save #0.1, #0.2 and
#0.3 to seperate files. I know it's possible from Chimera's interface, but
I have no idea how to do it when my script doesn't have any info about the
number of submodels etc.

Thank you for your time once again,
Mateusz

2012/5/9 Tom Goddard <goddard at sonic.net>

> Hi Mateusz,
>
>  The "split #0" command produces separate models for each chain.  They are
> numbered #0.1, #0.2, #0.3, ... with the same primary id number (0) and
> different secondary id numbers.  You can use these two-part id numbers in
> any Chimera command (e.g. color blue #0.2), or you can refer to all the
> models using #0.  There is currently not a way to change the id numbers of
> models.
>
>    Tom
>
>
>  Hello,
>>
>> Is there a command / a way to split a model into seperate models (one for
>> each chain)? I know there is the "split" command, but it divides the model
>> into submodels.
>>
>> Mateusz
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20120509/5e45a7b1/attachment.html>


More information about the Chimera-dev mailing list