Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#884 closed defect (fixed)

need more tether positions on ribbon

Reported by: Greg Couch Owned by: Conrad Huang
Priority: major Milestone: 0.5
Component: Depiction Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

When drawing nucleotides representations, ladders and sugar tubes, would like to connect directly to the ribbon, instead of an atom tethered to the ribbon. Ideally that would be where the plane of the base intercepts the ribbon. Chimera1 uses the spline position halfway between the C5' and the O3'. But a functional approximation is the C3' tether position on the ribbon. Would also like the ability to tether a second atom to the ribbon. The second tether would also be useful for proline.

So this is a request for the tether positions of the minimal backbone to be cached.

Change History (9)

comment:1 by Greg Couch, 8 years ago

Owner: set to Conrad Huang
Status: newassigned

comment:2 by pett, 8 years ago

Component: UnassignedDepiction

comment:3 by Conrad Huang, 8 years ago

Status: assignedaccepted

comment:4 by Conrad Huang, 8 years ago

Status: acceptedfeedback

Implemented in 2564f1bc1, at least partially.

AtomicStructure instances now have a boolean ribbon_want_backbone attribute which triggers saving ribbon coordinates for backbone atoms. The coordinates are not always saved for efficiency purposes. To get the ribbon coordinates for an atom in an AtomicStructure instance, use structure.ribbon_coords(atom) , which either returns a numpy array of three floats or throws a KeyError exception.

Is this sufficient?

comment:5 by Greg Couch, 8 years ago

Setting ribbon_want_backbone to True doesn't save the ribbon coordinates. The ribbon needs to be recomputed.

comment:6 by Greg Couch, 8 years ago

Would like atom.ribbon_coord() to use instead of atom.structure.ribbon_coords(atom).

Last edited 8 years ago by Greg Couch (previous) (diff)

comment:7 by Greg Couch, 8 years ago

Implement prototype in nucleotides. Needs structure.ribbon_want_backbone = True to compute ribbon tether positions.

comment:8 by Conrad Huang, 8 years ago

Resolution: fixed
Status: feedbackclosed

The backbone positions can only be calculated as part of rebuilding the ribbon graphics. I've changed ribbon_want_backbone from a simple attribute to a property that, when set to True, sets the "ribbon graphics changed" flag so that the graphics will be updated "soon".

Also added Atom.ribbon_coord property to simplify API. The code actually just calls back to the structure for the coordinates but that may be optimized later if necessary.

comment:9 by pett, 8 years ago

Milestone: Beta Release0.5

Milestone renamed

Note: See TracTickets for help on using tickets.