Hi Pradeep, Other people have recommended Adobe Illustrator and Inkscape for such purposes: http://www.cgl.ucsf.edu/pipermail/chimera-users/2008-April/002579.html However, you CAN draw a rectangle in the BILD format and read that into Chimera. For example, put the following 7 lines in a text file named square.bild and open it with File... Open: .scale 1.5 .color red .move 0 0 0 .draw 5 0 0 .draw 5 5 0 .draw 0 5 0 .draw 0 0 0 I also attach said file below, for your convenience. You can edit the coordinates, scale, and color. Once you open it in Chimera, it is a separate model, and you can move it independently using the checkboxes below the Command Line or the "Active" checkboxes in the Model Panel. Advantage: since it does exist in 3D, you can place it between the surface and the nucleic acid. Disadvantage: cannot make curves/circles, may be hard to position/orient, cannot control line thickness. The thickness issue may be addressed by instead making the edges cylinders and the corners balls. This can also be done in the simple BILD format, but it is sort of a hack to make a 3D object when you really want a 2D object. BILD format description: http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/bild.html 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 Apr 30, 2008, at 11:57 AM, Pallan, Pradeep S wrote:
Hi Elaine, I am wondering whether one can draw a circle or a square to indicate a site/s of a protein? Attached is a tiff file that has a square and a circle. I want the regions to be pointed out.
So what I did: 1) Generated the image in chimera 2) added a circle and a square in microsoft paint (Doesn't look good!).
I was going through the chimera tutorials, but didn't find the feature. Any suggestions for adding a circle or square? In my case, the surface image is at the back, and nucleic acid in the front. I would like to draw the circle and square and then load the nucleic acids, so that will look better. In other words the square or circle in between the surface image (at the back) and the nucleic acid (in front).
If editing the tiff file using Adobe photoshop (instead of MS paint) it does a better job, thick lines etc, but it leaves patches on the nucleic acid. I appreciate your help. Thanks, Pradeep
Hi Pradeep, Here's a Python script to draw a circle. The inner/outer radius, subdivisions, color are set at the bottom of the script and you can edit those. You just open the script with File / Open to create the circle. Use the "active" buttons in Model Panel to move the circle to the desired position and orientation. This script works with Chimera 1.2502 and other recent daily builds. It will not work with the Nov 2007 production release. Tom # ----------------------------------------------------------------------------- # Create an annulus. # def annulus(rinner, router, n, color): from numpy import zeros, single as floatc, intc, arange vertices = zeros((2*n,3), floatc) from math import pi, sin, cos for i in range(n): ai = i*2*pi/n ao = (i+0.5)*2*pi/n vertices[i,:] = (rinner*cos(ai), rinner*sin(ai), 0) vertices[n+i,:] = (router*cos(ao), router*sin(ao), 0) triangles = zeros((2*n,3), intc) triangles[:n,0] = arange(n) triangles[:n,1] = (triangles[:n,0]+1)%n triangles[:n,2] = n + triangles[:n,0] triangles[n:,0] = triangles[:n,0] triangles[n:,1] = triangles[:n,2] triangles[n:,2] = n + (triangles[:n,0]-1)%n from _surface import SurfaceModel s = SurfaceModel() s.addPiece(vertices, triangles, color) s.piecesAreSelectable = True from chimera import openModels openModels.add([s]) # ----------------------------------------------------------------------------- # annulus(rinner = 10, # inner radius router = 12, # outer radius n = 100, # circle subdivisions color = (1,1,1,1), # red, green, blue, opacity )
participants (2)
-
Elaine Meng
-
Tom Goddard