<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Mateusz Dobrych³op</b> <span dir="ltr"><<a href="mailto:dobry@g.pl">dobry@g.pl</a>></span><br>Date: 2012/5/9<br>
Subject: Re: [chimera-dev] Dividing a model into seperate models - one for each chain<br>To: Chimera BB <<a href="mailto:chimera-users@cgl.ucsf.edu">chimera-users@cgl.ucsf.edu</a>><br><br><br>Hi Tom,<div><br></div><div>
Thank you very much for your response.<div><br></div><div>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:</div>
<div><br></div><div><font face="'courier new', monospace">opened=openModels.list()</font></div><div><font face="'courier new', monospace">howmany=len(opened)</font></div><div><font face="'courier new', monospace">while howmany>=0:</font></div>
<div><font face="'courier new', monospace"> command="write "+str(howmany)+" "+o_path+"/"+str(howmany)+".pdb"</font></div><div><font face="'courier new', monospace"> runCommand(command)</font></div>
<div><font face="'courier new', monospace"> howmany-=1</font></div><div><br></div><div>Unfortunately, when I split, let's say, #0 that contains 3 chains, and then use the above code, I get an error:</div>
<div>
<br></div><div><font face="'courier new', monospace">MidasError: 3 model ids match "0"</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">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.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Thank you for your time once again,</font></div><div><font face="arial, helvetica, sans-serif">Mateusz</font></div>
<div><div class="h5">
<div><br><div class="gmail_quote">2012/5/9 Tom Goddard <span dir="ltr"><<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Mateusz,<br>
<br>
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.<span><font color="#888888"><br>
<br>
Tom</font></span><div><div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
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.<br>
<br>
Mateusz<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div></div></div>
</div><br>