biopython / biopython/biopython

PDB file HETATMs cannot be alternative location of a residue that is an ATOM

Open
#991 0 comments 0 reactions 0 assignees View on GitHub
From Redmine
Dominant language
Python
Stars
5.2k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
11

Description

Bug submitted by Klaus Kopec

https://redmine.open-bio.org/issues/2780

In PDB files where HETATMs and ATOMs are altlocs of each other (e.g. 1RR2, residue 184), they are treated as two separate residues.

A obvious solution is to add an "else" case to the "if" in StructureBuilder.py line 115 (method init_residue(...)) that introduces some kind of mixed (HETATM as well as ATOM) DisorderedResidue.

The Main problem with that: the hetero field of the residue ids will differ between the residues, therefore the whole access-over-ids mechanism will most likely not work with these MixedDisorderedResidues as straight forward as it does so far.

Sadly, I could not come up with a good solution for this. Maybe some getattr magic that alters the way Chains access their residues might work by allowing access to residues by only using the second and third component of the id 3-tuple?!

Attachment: PDB file slice with 2 residues, that can be used to see the bug.
slice of PDB file 1RR2 (example mentioned in my bug submission) showing two altloc residues where one is a HETATM and the other an ATOM. They are treated as two residues in Biopython.

[1rr2_residues184AB.pdb.zip](https://github.com/biopython/biopython/files/587413/1rr2_residues184AB.pdb.zip)

PDB IDs of some more occurances (simply search the file for "HETATM" and look for a HETATM record that is followed by a ATOM with the same residue number and a different altloc).

1din
1k4q
1k55 - multiple occurances
1k56
1rqh
1rr2
1xpk
1xpl - multiple occurances
1xpm - multiple occurances

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.