<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi, Bingding, <br><br></div>try this:<br><br></div><span style="font-family:courier new,monospace">from Bio.PDB.PDBParser import PDBParser<br><br></span></div><span style="font-family:courier new,monospace">p = PDBParser()<br></span></div><span style="font-family:courier new,monospace">s = p.get_structure('pdbid', YOURPDBFILE)<br></span></div><span style="font-family:courier new,monospace">for m in s: # iterate over each model<br></span></div><span style="font-family:courier new,monospace"> for c in m: </span><span style="font-family:courier new,monospace"># iterate over each chain</span></div><span style="font-family:courier new,monospace"> for r in c: # </span><span style="font-family:courier new,monospace">iterate over each residue</span></div><span style="font-family:courier new,monospace"> if <a href="http://r.id">r.id</a>[0] != ' ' and <a href="http://r.id">r.id</a>[0] != 'W': # non-water HETATM record<br></span></div><span style="font-family:courier new,monospace"> print <a href="http://m.id">m.id</a>, <a href="http://c.id">c.id</a>, r.resname<br></span></div><span style="font-family:courier new,monospace"> for a in r:<br></span></div><span style="font-family:courier new,monospace"> print <a href="http://a.name">a.name</a>, a.coord</span><br><br></div>cheers,<br></div>Hongbo<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 2:07 PM, Bingding Huang <span dir="ltr"><<a href="mailto:bdhuang@gmail.com" target="_blank">bdhuang@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Dear All,<br></div> Is that a way to get getting all the
ligands residue name and their corresponding coordinates from a PDB File
using Bio.PDB.PDBParser ?<br>For example, for PDB ID 1F86, the ligand name is T44.<br></div><br>Many thanks<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Bingding<br></font></span></div>
<br>_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br></blockquote></div><br><br clear="all"><br>-- <br>Hongbo
</div>