You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prevent PDBIO from writing large structures not supported in PDB format #1085
The PDB format specification imposes several limits on the number of atoms, residues, and chains that can be written to file. This is one of the reasons behind the move to the mmCIF format as the default structural data storage format.
Since we have the ability to read both PDB and mmCIF structures, but only to write PDB files, there should be a check to prevent writing very large structures that break the format specifications: > 99.999 atoms, >9999 residues, >1 character chains, etc.
This is still an issue in Biopython 1.79. I have an input PDB file with >100k atoms (some of them with non-unique numbers). After reading it in via Bio.PDB.PDBParser and writing with PDB.PDBIO I get a PDB file with 6-digit atom numbers which break the PDB format. It would be great at least see a warning and, even better, having atoms with IDs >=100k somehow fitted into 5-digit field (maybe loosing excess left hand side digits).
Edit: Aforementioned problem might be circumvented by using:
Activity
peterjc commentedon Mar 8, 2017
Good idea.
merkys commentedon Mar 17, 2022
This is still an issue in Biopython 1.79. I have an input PDB file with >100k atoms (some of them with non-unique numbers). After reading it in via
Bio.PDB.PDBParserand writing withPDB.PDBIOI get a PDB file with 6-digit atom numbers which break the PDB format. It would be great at least see a warning and, even better, having atoms with IDs >=100k somehow fitted into 5-digit field (maybe loosing excess left hand side digits).Edit: Aforementioned problem might be circumvented by using:
Preserving input atom numbering in bin/pdb_renumber_S1 to work around b…
JoaoRodrigues commentedon Mar 17, 2022
Good point indeed, this was sort of forgotten... thanks!