<div dir="ltr">Thanks for the help everyone, works like a charm now. <div>I made a pull request featuring the updated imports.<br><div class="gmail_extra"><br><div class="gmail_quote">On 23 May 2016 at 23:53, Peter Cock <span dir="ltr"><<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.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">Well spotted Markus,<div><br></div><div>Sorry, I forgot about the confusing import - something<div>PEP8 guidelines would prevent with new modules.</div><div>You can probably do this as a one line change:</div><div><br></div><div>from Bio.PDB.Residue import Residue</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Peter</div></font></span><div><div class="h5"><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 23, 2016 at 10:08 PM, Markus <span dir="ltr"><<a href="mailto:Markus.Piotrowski@ruhr-uni-bochum.de" target="_blank">Markus.Piotrowski@ruhr-uni-bochum.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Dries Van Rompaey <dries.vanrompaey <at> <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>> writes:<br>
<br>
><br>
> Hi everyone,<br>
><br>
> I'm using biopython to parse some MD files for further processing. I'm<br>
> using the SloppyStructureBuilder from xpdb.py (as described in<br>
> <a href="http://biopython.org/wiki/Reading_large_PDB_files" rel="noreferrer" target="_blank">http://biopython.org/wiki/Reading_large_PDB_files</a>), as I have quite a lot<br>
> of residues and the standard class doesn't support that very well.<br>
> Unfortunately, I get the following error:<br>
><br>
> File "/Users/dvr/Dropbox/Work/xpdb.py", line 76, in init_residue<br>
> residue = Residue(res_id, resname, self.segid)<br>
> NameError: global name 'Residue' is not defined<br>
><br>
> Does anyone know what's going on here?<br>
><br>
> Thanks,<br>
> Kind regards,<br>
><br>
> Dries<br>
><br>
<br>
</div></div>As Peter has written, add this import in the xpdb file:<br>
<br>
from Bio.PDB import Residue<br>
<br>
Then in the class<br>
<br>
SloppyStructureBuilder(...)<br>
<br>
in<br>
<br>
def init_residue(...)<br>
<br>
replace<br>
<br>
residue = Residue(...)<br>
<br>
with:<br>
<br>
residue = Residue.Residue(...)<br>
<br>
Hope this helps.<br>
<span><font color="#888888"><br>
-Markus<br>
</font></span><div><div><br>
<br>
<br>
_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</div></div></blockquote></div><br></div></div></div></div></div></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" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br></blockquote></div><br></div></div></div>