Opened 9 years ago
Closed 9 years ago
#383 closed defect (fixed)
leftover old-color triangles in recolored surface
Reported by: | Elaine Meng | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Surface | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
This is a bit circuitous, but if I do this
open 2gbp
surf
color tan targ s
surf probe 1.5
... the surface with revised probe radius is nearly all tan but has a few of the original periwinkle triangles scattered about. Image attached. It is not because something periwinkle is showing through, when I hide the surface there is nothing periwinkle-colored.
Attachments (1)
Change History (5)
by , 9 years ago
Attachment: | surfbits.png added |
---|
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Maybe this is related: when I clip the surface, the cap is still the old per-chain color.
comment:3 by , 9 years ago
The code tries to preserve the per-atom surface coloring when the shape changes. When you change the probe radius, some atoms that were buried and not associated with any points on the original surface are associated with points on the surface with the new probe radius. Those atoms get the original color. By the original color I mean the surface has a color attribute for when it is given a single color. Your "color tan" command didn't change the single color because it turns out the color command is only working at the atom level, so it just changes the per-vertex surface colors and doesn't realize that every single vertex of the surface got the same color.
I think the surface color preservation during shape changes needs to work differently. The current code will do something comical if the surface has coloring that varies continuously like electrostatic coloring. I think the right solution is that if the surface changes shape then it becomes single color, and I think the best color to choose is the average of all vertex colors. That way if the surface is currently single color then it stays that same color. But if it is multicolor, then we don't know how to compute a new coloring for the surface, so we don't try to fake it producing misleading results, just make the whole surface the same coloring. Some coloring methods like electrostatic coloring from a map might automatically recolor after the shape changes.
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed.
When a molecular surface changes shape it now becomes a single color which is the average of its previous vertex colors. If the surface was a single color then it keeps that single color. It would be better if the surface were colored on a per-atom basis (ie each atom patch has one color) that it keep that coloring. This is possible but involves keeping track of how the surface was colored. When we have more ways of coloring the surface, for example by hydrophobicity, or by APBS electrostatics I'll add support for automatically updating the coloring as the surface shape changes. I don't think it is worth implementing yet since it is rare to make a multicolor surface and then change its shape. It's not rare for density map surfaces, since contour level changes happen frequently. But there are no multi-coloring methods yet, so I'll wait until those exist to make automatic color updating.
The reason to change probe radius is that this particular structure's default surface has "nostril holes" ... I think we had discussed it earlier and decided it was not quite a bug.