smoothening the edge of molecular surface
Is there any way to smoothen the edge of molecular surface when only part of it would be displayed? It's quite often that a couple of triangles sticking out from the edges which makes the image a bit absurd. Please kindly advice. rgds, Maurice Ho
Hi Maurice, There is not complete control of the edges when you show part of a molecular surface, but there are ways to try to improve the appearance: Which triangles are shown: (A) Hiding or showing the surface with the Actions menu and/or the "surface" command only sets the surface per atom; you either get all the surface that comes from that atom or none of it. However, you can carefully choose which atoms' surface patches are shown (admittedly this can be difficult). (B) The Surface Zone tool (under Tools... Surface/Binding Analysis) allows independent control of triangles even if they come from the same atom. It turns triangle display on/off based on distance from a selected set of atoms. The advantage is that the edge will not be as rough as if you were restricted to per-atom patches. Disadvantages are that you need to have some atoms that are suitable for defining the zone, and the zone is spherical for each selected atom. http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/surfzone/ surfzone.html Clipping: Even if you have the best set of triangles possible, the edge will still show the triangle shapes. However, the surface can be sliced cleanly with a clipping plane. The limitation is that planes are planar! (A) global clipping planes as shown in the Side View - these clip everything, and are always normal to the line of sight (B) per-model clipping (under Tools... Depiction) - can clip the surface only, and can face in any direction http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/per-model/ per-model.html Change the triangles by changing surface parameters: If you select the surface with Ctrl-click and open the Selection Inspector, you can then change various parameters of "MSMS surface": (A) turning off "show disjoint surfaces" will omit additional surface bubbles within the structure that may be making the view more complicated. (B) increasing "vertex density" will make the triangles smaller etc. http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/inspection.html#msmsprop I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. meng@cgl.ucsf.edu UCSF Computer Graphics Lab and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco http://www.cgl.ucsf.edu/home/meng/index.html On Jun 6, 2008, at 1:20 AM, Maurice Ho wrote:
Is there any way to smoothen the edge of molecular surface when only part of it would be displayed? It's quite often that a couple of triangles sticking out from the edges which makes the image a bit absurd. Please kindly advice. rgds, Maurice Ho
Hi Maurice, As Elaine pointed out there is no way to flexibly smooth a surface edge in Chimera right now. I wrote a little Python code that creates a new mouse mode in Chimera that allows you to hide individual triangles of a surface by clicking on them. It is attached to this email. You open it in Chimera (File / Open) then hold the ctrl key and click with the right mouse button (of a 3 button mouse) and it will hide the triangle. I tested this with the June 4 Chimera daily build. It definitely will not work in the Chimera 1.2470 production release (Nov 2007). http://www.cgl.ucsf.edu/chimera/alpha-downloads.html This has lots of limitations to beware of. Saving a Chimera session will not remember the hidden triangles. So basically all you can do is trim triangles, save an image, then lose your trimming when you quit Chimera. Also there is no way to reshow specific hidden triangles. Using Actions / Surface / show or hide will undo the effect of all your hiding though. Enjoy, Tom # # Mouse mode (ctrl-right-mouse-button) to delete individual surface triangles. # Open this file in Chimera to activate the mouse mode. # # Warning: Deleted triangles will not be recorded in Chimera session files. # # Tested in Chimera version 1.2524, daily build from June 4, 2008. # Will not work in production release 1.2470 from Nov 2007. # def mouse_down_cb(viewer, event): from VolumeViewer import slice xyz_in, xyz_out = slice.clip_plane_points(event.x, event.y) import PickBlobs smlist = PickBlobs.surface_models() dist, p, tri = PickBlobs.closest_surface_intercept(smlist, xyz_in, xyz_out) if p is None: from chimera.replyobj import status status('Missed surface (%d,%d)' % (event.x, event.y)) return m = p.triangleAndEdgeMask if m is None: # No triangles hidden yet from numpy import zeros, int32 m = zeros((p.triangleCount), int32) m.fill(0xf) # Convert masked geometry triangle index to full geometry index t = (m&0x8).nonzero()[0][tri] m[t] ^= 0x8 # Toggle triangle display. p.triangleAndEdgeMask = m import Surface if hasattr(Surface, 'set_visibility_method'): Surface.set_visibility_method('static', p.model) from chimera import mousemodes as m m.addFunction('hide triangle', (mouse_down_cb, None, None)) m.setButtonFunction('3', ['Ctrl'], 'hide triangle')
participants (3)
-
Elaine Meng
-
Maurice Ho
-
Tom Goddard