biopython/biopython — pull request #60 by DavidCain (2012-08-27 04:20:08+00:00)
Title: Pdbparser

### Summary

Currently, `PDBParser` ceases parsing as soon as a `CONECT` or `END` record is encountered in the PDB file. Anything afterward the first `CONECT`/`END` line is returned as the trailer. In malformed PDB files, some structural records may follow the first `CONECT` record, or even `END`. This does not change the parser's end result (such lines are still ignored), but introduces warnings in the case of such malformed files.

This pull request comes as a follow-up to [Issue #3379][redmine-bug].

### Current behavior
* END: "Each file should terminate with a line containing only the word END." [[PDB Format Specification][pdbspec]] The parser tolerates blank lines after END, but anything else raises an exception (only one such warning/exception is given).

* CONECT : Header records (e.g. `REMARK`) are tolerated after `CONECT` records, but each line containing a structural record will raise an exception.

I've refrained from creating unit tests, as the current behavior was my own interpretation. if a behavior is agreed upon, I'll write some tests to accompany this pull request.

[pdbspec]: http://deposit.rcsb.org/adit/docs/pdb_atom_format.html
[redmine-bug]: https://redmine.open-bio.org/issues/3379