Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problematic residue indices #91

Open
aozalevsky opened this issue Oct 7, 2024 · 2 comments
Open

Problematic residue indices #91

aozalevsky opened this issue Oct 7, 2024 · 2 comments

Comments

@aozalevsky
Copy link
Contributor

ID: 9a0j
crosslinking restraint is assigned to a residue beyond sequence

ERROR:root:Missing residue
ERROR:root:Residue 493 out of range for <ihm.Entity(fancF)> (1-350)
ERROR:root:Missing residue
ERROR:root:Residue 493 out of range for <ihm.Entity(fancF)> (1-350)
ERROR:root:Missing residue
ERROR:root:Residue 367 out of range for <ihm.Entity(fancF)> (1-350)
ERROR:root:Missing residue
ERROR:root:Residue 362 out of range for <ihm.Entity(fancF)> (1-350)
352 353 4 F 314 LYS 5 F 493 LYS . . 'upper bound' . by-residue 29 . . . NO 
353 354 4 F 317 LYS 5 F 493 LYS . . 'upper bound' . by-residue 29 . . . NO 
354 355 4 F 345 LYS 6 F 367 LYS . . 'upper bound' . by-residue 29 . . . NO 
<...>
356 357 4 F 345 LYS 6 F 362 LYS . . 'upper bound' . by-residue 29 . . . NO 

IDs: 9a1z, 9a21, 9a22, 9a23, 9a24, 9a26, 9a27, 9a28, 9a29, 9a3u
water molecules are assigned residue indices pointing outside of the entity seq range. Other non-polymeric entities (like SODIUM ION in 9a3u) work fine.
code:

for a in system.state_groups[0][0][0][0].get_atoms():
    try:
        a.asym_unit.residue(a.seq_id)
    except IndexError as e:
        print(e)

output:

Residue 2 out of range for <ihm.Entity(water)> (1-1)
Residue 3 out of range for <ihm.Entity(water)> (1-1)
Residue 4 out of range for <ihm.Entity(water)> (1-1)
Residue 5 out of range for <ihm.Entity(water)> (1-1)
@aozalevsky
Copy link
Contributor Author

@benmwebb The first issue is probably related to the data (how did ihm.dumper let it pass, though?), but the water issue is pure python-ihm.

@benmwebb
Copy link
Member

python-ihm is only supposed to do range checks for polymeric entities, since seq_id is not as well defined for non-polymers and waters, but it looks like I missed a check when referencing individual residues. That's an easy fix.

Alternatively, you can disable residue range checks entirely by setting e._range_check = False for every Entity e.

benmwebb added a commit to ihmwg/python-ihm that referenced this issue Oct 14, 2024
We currently only check seq_id of residue
*ranges* for polymers, but for individual
residues we check for non-polymers too.
This causes issues with read-in files, where
we might not have the correct range for
water entities. To be consistent, skip this
check for all entity types other than polymer.
Relates salilab/IHMValidation#91.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants