Difference between revisions of "Cartoon"

From PyMOLWiki
Jump to: navigation, search
(Forcing Exact Boundaries in Coloring Secondary Structures)
Line 57: Line 57:
Discrete coloring off:
[[Image:Cartoon_discrete_color0.png|Discrete Coloring Off|left|thumb]] [[Image:Cartoon_discrete_color1.png|Discrete Coloring On|left|thumb]]
[[Image:Cartoon_discrete_color0.png|Discrete Coloring Off]]
Discrete coloring on:
[[Image:Cartoon_discrete_color1.png|Discrete Coloring On]]
== Sausage Representation ==
== Sausage Representation ==

Revision as of 17:14, 16 May 2005

Cartoon Command


"cartoon" changes the default cartoon for a set of atoms.


  cartoon type, (selection)

  type = skip | automatic | loop | rectangle | oval | tube | arrow | dumbbell


   cmd.cartoon(string type, string selection )


  cartoon rectangle,(chain A)
  cartoon skip,(resi 145:156)


   the "automatic" mode utilizes ribbons according to the
  information in the PDB HELIX and SHEET records.

Adjusting width of cartoon

Try varying the following.

For strands:


For helices:


or for "fancy" helices: cartoon_dumbell_length cartoon_dumbell_width cartoon_dumbell_radius (radius of cylinder at edge of helix ribbon) In each case "length" refers to what some might call the width and "width" refers to what some might call the thickness.

Cartoon Representation Example

Forcing Exact Boundaries in Coloring Secondary Structures

To force PyMol to respect secondary structural elements color-wise (PyMol smooths out colors near color chagnes for a prettier image) use the following PyMol command: set cartoon_discrete_colors, on

Discrete Coloring Off
Discrete Coloring On

Sausage Representation

The familiar sausage representation in PyMol is called, "putty". To enable the putty/sausage view simply do,

show cartoon
cartoon putty
unset cartoon_smooth_loops
unset cartoon_flat_sheets

Black and White Representation

For those who want a nifty black and white representation of their protein try the following:

  • Ray trace your protein of choice in a cartoon representation use a BLACK background
  • Save the image
  • Load the image in GIMP
    Black BG Ribbon
  • Desaturate or Grayscale the image
  • Run the filter: Filter->Edge-Detect->Edge
    Edge Detect
  • Select: Layers->Color->Invert
    Invert Color

Comments: Different methods of edge detection will give you different results. In the last example, I used Laplace Edge-Detect, then painted an all white layer beneath the current layer to achieve the results.

Other Styles

I'm sure there are other ways to do this. If you want to include it in a publication make sure you ray traced it large enough. For that, see Creating Publication Quality Images.

See Also

Cmd cartoon