[Biopython] Numbering MODEL sections in PDBIO?

João Rodrigues anaryin at gmail.com
Wed May 12 03:38:18 UTC 2010


Hello all,

I am using Bio.PDB to parse some PDB files and some have multiple MODEL
records. I only want to keep the first one so I created a Select class that
accepts models for model.get_id() == 0. It works :)

However, I'm feeding this result to a particularly picky program for
structure refinement and it rejects my structures. I hacked back and forth
in the text editor and found out that the problem is that Bio.PDB writes the
following header for the structure:

MODEL
ATOM .....
ATOM .....
....
TER
ENDMDL

I guess this is fine for pretty much all the non-picky structure-dealing
software out there, but it utterly crashes the one I'm working with.. I
noticed that adding the model number in front of the MODEL string did the
trick and my structure got refined. So, since the guidelines for PDB
format<http://www.wwpdb.org/documentation/format32/sect9.html>say that
after MODEL there should come an integer, I added an enumerate call
to line 127 of PDBIO and a model_number var that is called and written in
line 137.

I'd say this is harmless to include and would perhaps solve problems such as
mine to someone else?

Best!

João [...] Rodrigues
@ http://stanford.edu/~joaor/




More information about the Biopython mailing list