Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#15971 closed defect (fixed)

nuc slab positions miscalculated?

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

Description

Image and session attached. When I open the same structure twice and compare the atom positions to the transparent ellipsoid positions, the ellipsoid positions are really off from the rings of some of the bases. See picture (hard to see) and session (so you can rotate). This is the case for all types of slabs, not just ellipsoids.

Everything but chain C of 6c1y is hidden. In that chain, examples of poorly placed ellipsoids are residues 3 and 6, whereas residues 4 and 5 look pretty good. I would expect the slab to approximate the position of the base ring system.

Tested and session made in UCSF ChimeraX version: 1.9.dev202409170516 (2024-09-17)

Attachments (3)

ellipsoids.cxs (306.5 KB ) - added by Elaine Meng 13 months ago.
ellipsoids.png (326.9 KB ) - added by Elaine Meng 13 months ago.
ellipsoidsnew.png (319.9 KB ) - added by Elaine Meng 13 months ago.
Added by email2trac

Download all attachments as: .zip

Change History (8)

by Elaine Meng, 13 months ago

Attachment: ellipsoids.cxs added

by Elaine Meng, 13 months ago

Attachment: ellipsoids.png added

comment:1 by Greg Couch, 13 months ago

Cc: Tom Goddard added

Tom, this bug is due to the fact geometry.Plane does not preserve the chirality of the input points. So in the nucleotides case, where the input points are the coordinates of atoms in a 5- or 6-member ring in ring order, the normal direction is inconsistent.

Is that easy to fix or add support for in geometry.Plane? I could dot product the plane normal with the cross product of adjacent bond vectors and flip the plane if it's incorrect. That would need a flip method added to geometry.Plane. Or there could be an alternate constructor. Chimera used Newell's algorithm. Thoughts?

comment:2 by Tom Goddard, 13 months ago

Cc: Eric Pettersen added

The Plane class in the geometry module was created by Eric. He can advise on its behavior.

comment:3 by Eric Pettersen, 13 months ago

The Newell algorithm assumes the points form a planar or near-planar polygon. I needed an algorithm that works in more generic circumstances. However I have no objection to you adding a ChiralPlane class or adding a 'chiral=False' keyword to the Plane constructor that would then switch out to the Newell algorithm. Could be "polygonal" or "newell" instead of "chiral".

comment:4 by Greg Couch, 13 months ago

Resolution: fixed
Status: assignedclosed

Fixed. Use alternate implementation of Plane class.

comment:5 by Elaine Meng, 13 months ago

Thanks, ellipsoids now represent their ring systems more reliably.  I'm surprised (and regret) that we didn't notice the problem earlier.

Added by email2trac

by Elaine Meng, 13 months ago

Attachment: ellipsoidsnew.png added

Added by email2trac

Note: See TracTickets for help on using tickets.