[Biopython] PDBparser question
Hongbo Zhu 朱宏博
macrozhu at gmail.com
Fri Sep 19 13:00:03 UTC 2014
Hi, Bingding,
try this:
from Bio.PDB.PDBParser import PDBParser
p = PDBParser()
s = p.get_structure('pdbid', YOURPDBFILE)
for m in s: # iterate over each model
for c in m: # iterate over each chain
for r in c: # iterate over each residue
if r.id[0] != ' ' and r.id[0] != 'W': # non-water HETATM record
print m.id, c.id, r.resname
for a in r:
print a.name, a.coord
cheers,
Hongbo
On Wed, Sep 17, 2014 at 2:07 PM, Bingding Huang <bdhuang at gmail.com> wrote:
> Dear All,
> Is that a way to get getting all the ligands residue name and their
> corresponding coordinates from a PDB File using Bio.PDB.PDBParser ?
> For example, for PDB ID 1F86, the ligand name is T44.
>
> Many thanks
> Bingding
>
> _______________________________________________
> Biopython mailing list - Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython
>
--
Hongbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20140919/844bb7e6/attachment.html>
More information about the Biopython
mailing list