#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)
Change History (8)
by , 13 months ago
| Attachment: | ellipsoids.cxs added |
|---|
by , 13 months ago
| Attachment: | ellipsoids.png added |
|---|
comment:1 by , 13 months ago
| Cc: | added |
|---|
comment:2 by , 13 months ago
| Cc: | added |
|---|
The Plane class in the geometry module was created by Eric. He can advise on its behavior.
comment:3 by , 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 , 13 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed. Use alternate implementation of Plane class.

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?