
Hello, Is there a command for "surface color"? The menu window that lets you color a molecule radially. I'm wondering if there is a command-version of this task so that I can put it into a script. I looked up "surface color" in the Chimera help files but I don't see a command. Thanks! Mike

Hi Mike, There is not yet a Chimera command equivalent to the surface color tool. It is possible to do with a Python script. And a Python script could be opened from a command script e.g. "open radialcolor.py". I've attached an example of such a Python script. Tom # Tested in Chimera version 1.2502, April 3, 2008 def color_surface_radially(surf): from SurfaceColor import color_surface, Radial_Color, Color_Map rc = Radial_Color() rc.origin = surf.bbox()[1].center().data() # Center of surface vertices, triangles = surf.surfacePieces[0].geometry rmin, rmax = rc.value_range(vertices, vertex_xform = None) data_values = (.5*rmax, .625*rmax, .75*rmax, .875*rmax, rmax) colors = [(0.933,0.067,0.067,1), # Red,green,blue,opacity (0.933,0.933,0.067,1), (0.067,0.933,0.067,1), (0.067,0.933,0.933,1), (0.067,0.067,0.933,1)] rc.colormap = Color_Map(data_values, colors) color_surface(surf, rc, caps_only = False, auto_update = False) from _surface import SurfaceModel from chimera import openModels as om surfs = om.list(modelTypes = [SurfaceModel]) for s in surfs: color_surface_radially(s)
participants (2)
-
Michael DiMattia
-
Tom Goddard