Autodesk / Autodesk/molecular-design-toolkit

Wrong bonding between residues surrounding missing ones

Open
#137 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
174
Forks
37
PR merge metrics
No merged PRs in 30d

Description

This is a residue that appears right before several missing residues:

```python
mol = mdt.from_pdb('3p3k')
res = mol.residues[46]
```

MDT currently shows a bond between this and the next available residue, which is clearly wrong:
```python
>>> res.bonded_residues
[,
]
>>> res.distance(res.next_residue)
3.88332344777 ang
```

Also `res.next_residue` returns `''`, but should raise something along the lines of `StopIteration`, or maybe `MissingResidue` or maybe `PrematureTerminus`

I suppose it could also just return a `MissingResidue` object or something

Contributor guide

Open the contributing guide

Research direction

Reproduce the case with mdt.from_pdb('3p3k') and residue 46, then trace how bonded_residues and next_residue handle gaps in the residue sequence. Confirm the intended missing-residue boundary behavior before changing it; done means no bond spans the missing residues and next_residue reports that boundary consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.