Hi,<div><br></div><div>Attached is my mol2 file. It is the DOCK result containing 10 conformations of docked ligand. It does show 10 conformations using GUI Chimera (they're sub-model, aint they?), but when I run the piece of code below (just for testing), the result was an empty list (i.e. []).</div>
<div><br></div><div><i>import chimera</i></div><div><i>confor = chimera.openModels.list()</i></div><div><i>print confor</i></div><div><br></div><div>>>> []</div><div><br></div><div>""" if I used <i>print confor[0]</i></div>
<div><br></div><div>>>> IndexError: list index out of range"""</div><div> <br>Thank you.</div><div><br></div><div>Chinh<br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 2:12 AM, Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="im"><div><div>On Mar 20, 2013, at 2:28 AM, Chinh Su Tran To wrote:</div><br>
<blockquote type="cite">Hello,<div><br></div><div>I managed to get the torsion angles from scripting, but I encountered one problem that my code works for pdb file ONLY.</div><div>When I ran it for Mol2 input, I could not get the angles I want. </div>
<div><br></div><div>With the piece of code:</div><div><i>confor = chimera.openModels.list()</i></div><div><br></div><div>it shows an empty list of models (for mol2 file)???</div><div><br></div><div>Please anyone help show me some hints how to convert Mol2 back to PDB or anyway that I can directly deal with mol2 format)? </div>
<div><br></div><div>I greatly appreciate if you please show me references about how chimera works with Models. I guess I have not understood yet the differences between pdb and mol2. It seems to me that mol2 contains the same info (in terms of ATOM and coordinates), but an extra column of charges. </div>
<div><br></div><div>Does that MODEL here mean conformations? Why the docked_conformer (results from DOCK with various conformations) contains NO models according to chimera? I am sorry that I did not mean questioning, but curious.</div>
</blockquote><br></div></div><div>As far as Chimera is concerned, there is very little difference between a model opened from a PDB file and one opened from a Mol2 file. chimera.openModels.list() cannot be empty if Chimera is actually showing any structures. Is it? (when you open the Mol2 file normally)? Maybe you need to send along your Mol2 file and your script...</div>
<div class="im"><div><br></div><div>--Eric</div><br><div>
<span style="border-spacing:0px 0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:16px;white-space:normal;font-family:Helvetica;word-spacing:0px"><p style="margin:0.0px 0.0px 0.0px 0.0px">
<font face="Helvetica" size="5" style="font:16.0px Helvetica"><span> <span> </span></span>Eric Pettersen</font></p><p style="margin:0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font:16.0px Helvetica"><span> <span> </span></span>UCSF Computer Graphics Lab</font></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font:16.0px Helvetica"><span> </span><a href="http://www.cgl.ucsf.edu" target="_blank">http://www.cgl.ucsf.edu</a></font></p>
<br></span>
</div>
<br></div></div></blockquote></div><br></div>