Opened 5 years ago
Closed 5 years ago
#3276 closed defect (fixed)
nucleotide sugar-tubes disconnected from ribbon in restored session
Reported by: | Elaine Meng | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | major | Milestone: | 1.1 |
Component: | Depiction | Version: | |
Keywords: | Cc: | Greg Couch, pett | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
open 2bna
save nuctest.cxs
close
open nuctext.cxs
.... now nucleotides are no longer connected to ribbon.
Strangely, if I no open another 2bna, it also shows nucleotides as disconnected from ribbon.
Only if I close all and then open another 2bna are the nucleotides connected.
Comparison of images suggests it is the tube lengths that change, not the ribbon position.
Tested in UCSF ChimeraX version: 1.0rc202005210540 (2020-05-21) on Mac
Change History (12)
comment:2 by , 5 years ago
Component: | Unassigned → Depiction |
---|
comment:3 by , 5 years ago
Priority: | blocker → major |
---|
comment:5 by , 5 years ago
Can replicate without a session: (1) open 2bna autostyle false, (2) style stick, (3) nucleotides tube/slab, (4) cartoon. A subsequent (1) ~cartoon, (2) cartoon, fixes it.
comment:6 by , 5 years ago
Cc: | added |
---|
Tom, the new Atom ribbon_coord attribute is updated too late for nucleotides to get the right value. Nucleotides is updating its representation in the 'new frame' trigger. And the ribbon is generated lazily afterwards. Nucleotides used to call structure.bounds() to get the coordinates updated. Is there is new way?
follow-up: 7 comment:7 by , 5 years ago
I'll have to look into it. Ribbon graphics are update in the "graphics update" trigger that comes after the "new frame" trigger. If nucleotides used the "graphics update" trigger the ribbon might already be updated, but it is not good since the order of trigger callbacks being called is not defined and nucleotides may be called before ribbon update. The session.main_view.check_for_drawing_change() will update the graphics if needed and return True if an update was actually done. That is probably what you want. But calling that every frame could have bad performance implications. It is already being called by core/updateloop.py as part of the main graphics redraw loop. I wonder how nucleotides determines that the ribbons have changed and the tethers need updating.
comment:10 by , 5 years ago
Cc: | added; removed |
---|---|
Owner: | changed from | to
The triggers are fired in the right order. The ribbon tether coordinates are computed lazily during the draw pass, and that is too late. Nucleotides needs to know the ribbon positions when it creates the tubes for the sugars and the stubs/rungs for ladders. The way nucleotides used to get correct information was to call structure.bounds() which updated the ribbon information to get the correct bounding box.
Replacing the call to structure.bounds(),with a call to structure._update_graphics_if_needed(), works around the bug, but is not a public API.
Reassigning to Tom because structure.bounds() no longer updates the ribbon tether coordinates.
comment:11 by , 5 years ago
Owner: | changed from | to
---|
comment:12 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed.
I made Structure update_graphics_if_needed() public and had nucleotides call it.