Drawing Outlines

Tom Goddard
May 2, 2014

Andrea Rossi asked how to draw an outline of an epitope on a molecular surface. Here are some ideas. Nothing works easily. We may want to add a capability for this in Chimera 2.

On May 1, 2014, at 2:37 PM, Andrea Rossi wrote:

Is there any way to make the outline of a structural or functional epitope in Chimera?

Right now we have to make the epitope in a different color, import it in Photoshop, Inkscape
or similar programs and modify the image.

The outline should be uniform width along the path. Ideally the outline should be visible in 2D
(similar to the 2D labels) rather than 3D. Otherwise it disappears behind the surface or it get
shaded by the surface.

Selection outlines

One idea is to make a separate outline image in Chimera and layer it on top of the full surface image in an image processing program like Photoshop or Gimp. Using silhouette edges for the outline doesn't work too well since it includes lines besides the boundary. Using selection outline doesn't work too well because Chimera cannot draw it wider than 1 pixel. A photo editing program can make the outline thicker. But it is as easy to simply make the ouline in the photo editing program from the epitope image.

Surface Epitope Silhouette edges Selection outline Overlay selection Fatten selection Overlay fat selection

Silhouette outlines

Chimera can make fat silhouette edges. Saving the image didn't work with the default image saving option of supersample 3. I had to set it to 1 or the silhouette came out thin. This example fortuitously does not show interior silhouette edges where the epitope surface overlaps itself.

Surface Silhouette width 5 Layered in Gimp

Surface layers

Eric Pettersen suggested using the full surface and a second surface of the epitope shifted to appear slightly in front of the full surface. The epitope is colored red in the full surface and the epitope surface is colored blue in the following image. The outline with this method can be blocked from view by the surface.y

Here's Eric's explanation.

Basically, you open two copies of the structure, color the epitope in the first one with whatever color you want the "silhouette" to be, show only the surface of the epitope in the second one, and move the second one slightly in front of the first one to give the illusion of a silhouette (since the colored epitope area in the first one blends into the surrounding surface and therefore appear to silhouette the second surface. Here's a recipe for the image I sent that could be easily adapted to other structures:

# open first copy of glucose-binding protein
open 2gbp
# define an alias for the epitope [for this case, residues within 7 angstroms of :BGC (glucose)
alias epitope :bgc z<7
# show just the surface and color the epitope
~disp; ~rib
surf
# color the whole surface whatever color you want here if you don't like the default (tan)
color red epitope

# here you would interactively reposition the structure to get the view of the epitope that you want

# open second copy
open 2gbp
~disp; ~rib
surf #1 & epitope
# color the surface of #1 here if you don't like the default (sky blue)
# prevent model 0 from moving
~sel 0
# move model 1 slightly forward
move z 1
# turn model 0 movement back on so we don't accidentally move just #1 afterward
sel 0