Opened 10 years ago
Closed 10 years ago
#147 closed defect (fixed)
Ribbon: list index out of range
Reported by: | Tom Goddard | Owned by: | Conrad Huang |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Depiction | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | chimera |
Description
Error showing ribbon produced by the following two commands.
open 5a5b
ribbon
graphics update callback raised error
Traceback (most recent call last):
File "/Users/goddard/ucsf/chimera2/Chimera2.app/Contents/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/chimera/core/graphics/view.py", line 600, in _call_callbacks
cb()
File "/Users/goddard/ucsf/chimera2/Chimera2.app/Contents/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/chimera/core/atomic/structure.py", line 183, in _update_graphics_if_needed
self._create_ribbon_graphics()
File "/Users/goddard/ucsf/chimera2/Chimera2.app/Contents/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/chimera/core/atomic/structure.py", line 392, in _create_ribbon_graphics
back_c, back_t, back_n = ribbon.segment(i, ribbon.FRONT, seg)
File "/Users/goddard/ucsf/chimera2/Chimera2.app/Contents/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/chimera/core/atomic/ribbon.py", line 120, in segment
xc = self.coefficients[0][seg]
IndexError: list index out of range
Change History (6)
comment:3 by , 10 years ago
Fixed! The problem was that the ribbon code was not ignoring unused residues in a ribboned chain. The mmcif version of 5a5b has an MSE which has not CA and therefore is not used for the ribbon; the pdb version must not have that residue, or it was not grouped as part of the same chain. The code now properly regenerates a residue list from the list of atoms used for the ribbon. As a side effect, I found the bug that caused the infinite loop on traceback. I wrongly accused the logger. It was the ribbon code. On redraw, if m._gc_ribbon is True, m._create_ribbon_graphics() is called and then _gc_ribbon is cleared. When an exception is thrown in the ribbon code, _gc_ribbon is not cleared, so it goes into a state where it keeps trying to rebuild the ribbon on every redraw. Both fixes have been committed. Conrad On 9/24/15 3:59 PM, Tom Goddard wrote:
comment:5 by , 10 years ago
The PDB version doesn’t make the inter-residue bond from the (singleton) N in /8:500 to /8:499 whereas the mmCIF version does. I will investigate improving the PDB version at some point. —Eric
comment:6 by , 10 years ago
Component: | Molecular Viewer → Depiction |
---|---|
Resolution: | → fixed |
Status: | new → closed |