molecular-design-toolkit
molecular-design-toolkit copied to clipboard
Wrong bonding between residues surrounding missing ones
This is a residue that appears right before several missing residues:
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:
>>> res.bonded_residues
[<Residue HIS71 (index 47, chain A) in Molecule: 3p3k>,
<Residue ILE46 (index 45, chain A) in Molecule: 3p3k>]
>>> res.distance(res.next_residue)
3.88332344777 ang
Also res.next_residue returns '<Residue HIS71 (index 47, chain A) in Molecule: 3p3k>', 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
It would appear that a distance-based cutoff for bonds would work well, even when just looking at alpha-carbon distances.

Obviously C-N bond lengths would work fine too, but it gets tricky when they are missing