Opened 8 years ago

Last modified 8 years ago

#808 accepted defect

attempt to cartoon P-only nucleic in 1gsg gives indexError traceback

Reported by: Elaine Meng Owned by: pett
Priority: major Milestone:
Component: Depiction Version:
Keywords: Cc: Tom Goddard, pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

open 1gsg
cartoon
...gives the following traceback (can be blamed on the P-only nucleic acid chain because "cartoon protein" works):

cartoon
Error processing trigger "graphics update"
Traceback (most recent call last):
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/triggerset.py", line 126, in invoke
return self._func(self._name, data)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/atomic/structure.py", line 2237, in _update_graphics_if_needed
s[i]._update_graphics_if_needed()
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/atomic/structure.py", line 304, in _update_graphics_if_needed
self._create_ribbon_graphics()
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/atomic/structure.py", line 511, in _create_ribbon_graphics
rp = p.new_drawing(self.name + " " + str(residues[0]) + " ribbons")
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/atomic/molarray.py", line 156, in getitem
v = object_map(self._pointers[i], self._object_class)
IndexError: index 0 is out of bounds for axis 0 with size 0

Change History (9)

comment:1 by Elaine Meng, 8 years ago

Cc: Tom Goddard added

comment:2 by Conrad Huang, 8 years ago

Status: assignedfeedback

Fixed 89dcc9f3d. Ribbon was checking for C5', not P, for nucleotides (with C1' being the orientation atom). I suspect that's because (I thought) C5' gives a better ribbon than P. I changed the code so that it looks for P if C5' is not present. Should I just forget about C5' altogether?

You can test out the two different appearances by opening a model with nucleic chain and then "del @C5'" followed by "cartoon". (The ribbon is not redrawn on atom deletions. Should it?)

in reply to:  3 ; comment:3 by Elaine Meng, 8 years ago

I believe Chimera does something similar if there are only P atoms, switching to use them to guide the ribbon.  You can open 1gsg in Chimera and see.  For ChimeraX, we discussed the issue of which atom(s) to use for nucleic acids several months ago.  You even briefly switched to using P only, but switched it back when we noticed issues: making the current “rungs” look more obviously detached (although I imagine rungs could somehow be changed to compensate), and on the side of the nucleotide that lacks the P, the ribbon ending way too soon (looking way too short on that end). Pymol handles this by using the O3’ on the 3’ end as well as the P atoms.  but there are also choices to use P only or C3’ only according to this wiki page:  https://pymolwiki.org/index.php/Examples_of_nucleic_acid_cartoons#Cartoon_nucleic_acid_mode

So I’m not against switching or offering options of which atom to use, just saying these issues need to be considered. Different guide atoms might also need different rules for how the transverse orientation is determined.

comment:4 by Elaine Meng, 8 years ago

Cc: pett added

For 1gsg, now I see some partial ribboning of the P-trace now instead of the traceback, but there is something funky going on... namely breaks even between consecutively numbered Ps and all of the dashed pbonds are still shown.

comment:5 by Conrad Huang, 8 years ago

Status: feedbackaccepted

The P atoms are not being hidden because
residue()->backbone_atom_names(bbe) is returning no names for the nucleic
residues. With "auto_style" undisplaying the CAs but displaying "nucleic"
(to leave base pairs shown), the P atoms are therefore displayed, and the
missing atoms pseudobonds between them are shown.

The distance threshold for deciding whether a model is a chain trace also
needs to be tweaked to avoid the breaks in the nucleic chain.

comment:6 by Conrad Huang, 8 years ago

Owner: changed from Conrad Huang to pett
Status: acceptedassigned

Eric will handle the backbone atom lookup and chain trace distance issues.

comment:7 by pett, 8 years ago

Owner: changed from pett to Conrad Huang

Okay, I've fixed the cutoff distance, and assigning the correct polymer type to chain traces. As it stands, unbroken ribbons are now shown with the nucleic ribbon looking like a nucleic ribbon. Unfortunately all the missing-structure chain traces are shown. I think their display/undisplay has to be handled by the ribbon code since their display state is basically the inverse of the ribbon display state.

Or else we have to come up with a different scheme for chain-traces entirely.

--Eric

comment:8 by Conrad Huang, 8 years ago

Owner: changed from Conrad Huang to pett

The hide bits are used by ISOLDE already and will be used by nucleotides (and maybe saccharides) so we need a more general handling for missing-structure chains.

comment:9 by pett, 8 years ago

Status: assignedaccepted
Note: See TracTickets for help on using tickets.