[Biopython] Problem writing a PDB with multiple models

João Rodrigues j.p.g.l.m.rodrigues at gmail.com
Tue Oct 27 14:07:14 UTC 2015


Hi all,




Hongbo is right, but the problem persists. I think the issue is that the logic that write the ‘END’ statement is misplaced in the code (one indentation too much). A simple dedent fixes this issue. 




Interestingly, this happened when reading/writing a simple multi-model PDB file (e.g. 1ggr) so it must have been a recent change otherwise we should/would have noticed before? There doesn’t seem to be much in the history though..




I placed a pull request to fix this. Thanks for bring it it up Claudia.




Cheers,




João

On Tue, Oct 27, 2015 at 1:42 PM, Hongbo Zhu 朱宏博 <macrozhu at gmail.com>
wrote:

> if you look at PDBIO.py :
> if model_flag:
>     fp.write("MODEL      %s\n" % model.serial_num)
>> so model.serial_num is written, not model.id.
> Although the BioPython FAQ says:
> What is a model id?
> The model id is an integer which denotes the rank of the model in the
> PDB/mmCIF file. The model is starts at 0. Crystal structures generally have
> only one model (with id 0), while NMR files usually have several models.
> So perhaps one of them should be updated?
> hongbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20151027/1ca8b733/attachment.html>


More information about the Biopython mailing list