<span id="mailbox-conversation"><div>Hi all,</div>
<div><br></div>
<div>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. </div>
<div><br></div>
<div>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..</div>
<div><br></div>
<div>I placed a pull request to fix this. Thanks for bring it it up Claudia.</div>
<div><br></div>
<div>Cheers,</div>
<div><br></div>
<div>João</div></span><div class="mailbox_signature">
<br><br></div>
<br><br><div class="gmail_quote"><p>On Tue, Oct 27, 2015 at 1:42 PM, Hongbo Zhu 朱宏博 <span dir="ltr"><<a href="mailto:macrozhu@gmail.com" target="_blank">macrozhu@gmail.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div dir="ltr">if you look at PDBIO.py :<div><br></div>
<div>
<div><font face="monospace, monospace">if model_flag:</font></div>
<div><font face="monospace, monospace"> fp.write("MODEL %s\n" % model.serial_num)</font></div>
</div><div>so model.serial_num is written, not <a href="http://model.id">model.id</a>. </div>
<div><br></div>
<div>Although the BioPython FAQ says:</div>
<div><br></div>
<div>
<h4 style="color:rgb(0,0,0);margin:0px 0px 0.3em;overflow:hidden;padding-top:0.5em;padding-bottom:0.17em;border-bottom-style:none;width:auto;font-size:14.848px;font-family:sans-serif;line-height:19.2px;background-image:none;background-repeat:initial"><span class="" id="What_is_a_model_id.3F">What is a model id?</span></h4>
<p style="margin:0.4em 0px 0.5em;line-height:19.2px;color:rgb(0,0,0);font-family:sans-serif;font-size:12.8px">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.</p>
<p style="margin:0.4em 0px 0.5em;line-height:19.2px;color:rgb(0,0,0);font-family:sans-serif;font-size:12.8px"><br></p>
<p style="margin:0.4em 0px 0.5em;line-height:19.2px;color:rgb(0,0,0);font-family:sans-serif;font-size:12.8px">So perhaps one of them should be updated?</p>
<p style="margin:0.4em 0px 0.5em;line-height:19.2px;color:rgb(0,0,0);font-family:sans-serif;font-size:12.8px">hongbo</p>
</div>
</div></div></blockquote></div><br>