<html>
<head>
<style>
body {
  font-family: Verdana, sans-serif;
  font-size: 0.8em;
  color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
fieldset.attachments {border-width: 1px 0 0 0;}
hr {
  width: 100%;
  height: 1px;
  background: #ccc;
  border: 0;
}
span.footer {
  font-size: 0.8em;
  font-style: italic;
}
</style>
</head>
<body>
Issue #3379 has been updated by Travis Wrightsman.

<ul>
  <li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li>
  <li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li>
</ul>

<p>Pull request closed.</p>
<hr />
<h1><a href="https://redmine.open-bio.org/issues/3379#change-15314">Bug #3379: PDBParser fails to parse PDBs produced by PatchDock</a></h1>

<ul><li>Author: David Cain</li>
<li>Status: Closed</li>
<li>Priority: Low</li>
<li>Assignee: Biopython Dev Mailing List</li>
<li>Category: Main Distribution</li>
<li>Target version: 1.57</li>
<li>URL: </li></ul>

<p>I apoligize in advance if this technically doesn't count as a bug, as the problem is arising out of improperly formatted PDBs.</p>


        <a name="Background"></a>
<h3 >Background<a href="#Background" class="wiki-anchor">¶</a></h3>


        <p>Protein docking utilities can generally create a complex PDB from two input files. Depending on the rotation algorithm, at least one of the PDB files is rotated (its ATOM coordinates modified in-place), then the two files are concatenated to create a protein complex file.</p>


        <a name="Why-PDBParser-fails"></a>
<h3 >Why PDBParser fails<a href="#Why-PDBParser-fails" class="wiki-anchor">¶</a></h3>


        <p>Utilities like ZDOCK strip a lot of data from the input files, creating a poorly-formed PDB file that raises PDBConstructionWarnings, but PDBParser can ultimately parse. PatchDock, however, preserves the input PDB files as they were- the only thing that changes is ATOM coordinates. This is problematic when the receptor PDB has an <code>END</code> record or <code>CONECT</code> records: PDBParser's current behavior is to consider anything after an <code>END</code> or <code>CONECT</code> to be trailer data, and cease parsing when they're encountered. This means that many complexes parse cleanly, but completely exclude the ligand.</p>


        <a name="How-to-fix-the-problem"></a>
<h3 >How to fix the problem<a href="#How-to-fix-the-problem" class="wiki-anchor">¶</a></h3>


        <p>Now, in an ideal world- the responsibility would be on the creators of the docking utilities to create well-formed complex PDB files. However, this quick concatenation seems to be pretty common (complexes are often created by very short, hackish Perl scripts). Should PDBParser be able to parse these badly formed PDB files?</p>


        <a name="Potential-change-to-PDBParser_parse_coordinates"></a>
<h3 >Potential change to <code>PDBParser._parse_coordinates</code>?<a href="#Potential-change-to-PDBParser_parse_coordinates" class="wiki-anchor">¶</a></h3>


        <p>If a modification to PDBParser is on the table, my thought would be to still consider anything after <code>END</code> or <code>CONECT</code> to be part of the trailer, but make an attempt to parse extra coordinate data from this trailer before returning (probably through a recursive call). If records are found in the trailer, a PDBConstructionWarning is raised, but they're added to the structure.</p>


        <p>If this approach is reasonable, let me know and I'd be happy to mock something up and push it to my branch on GitHub. Otherwise, I'll just write scripts to clean ugly complexes for parsing.</p>


        <p>My only thought is that most users of docking software are probably not able or willing to write such a script, and thus can't use BioPython to parse the PDB output.</p>

  <fieldset class="attachments"><legend>Files</legend>
    <a href="https://redmine.open-bio.org/attachments/download/1738/complex.1.pdb">complex.1.pdb</a>
    (380 KB)<br />
  </fieldset>


<hr />
<span class="footer"><p>You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here and login: <a class="external" href="http://redmine.open-bio.org">http://redmine.open-bio.org</a></p></span>
</body>
</html>