Topics

Cartoon Control Panels
Selection Panel
Radio Buttons
Decorations Panel
Adding Textures
Cartoon Color Panel
Cartoon Visibility Panel
Cartoon Side Chains Panel

Cartoon Control Panels

After a cartoon-style display is selected from the Style menu above the canvas, the appearance of the tubes and ribbons can be modified by using the retractable control panel on the right side of the canvas. The control panel can be opened and closed by using the Tools menu in the menu bar above the canvas. The control panel is composed of two parts: a left-side selection panel that remains fixed and a right-side modifier panel that can be changed by using the menu at the top right of the control panel (see the Control Panel figure further below). After explaining the left-side selection panel, the rest of this page will cover the right-side modifier subpanels that affect a cartoon-style display: Decorations, Cartoon Color, Cartoon Visibility, and Cartoon Side Chains.


Selection Panel

[screenshot of Cartoon Color panel]

The selection subpanel can be seen on the left side of the control panel shown right below. The same selection panel is used for both Atom-type (spheres and cylinders) and Cartoon-style (tubes and ribbons) displays. There are four kinds of selections:

Radio Buttons

The top half of each cartoon subpanel contains radio buttons that will affect where modifications are applied. Each radio button has an associated menu, and the set of radio buttons with associated menus is the same for each of the cartoon subpanels (Decorations, Cartoon Color, Cartoon Visibility, and Cartoon Side Chains).

Decorations Panel

[screenshot of Decorations panel]

The ProteinShader program uses small programs, known as vertex and fragment shaders, to apply two-dimensional texture maps and custom lighting calculations to the curved surfaces of three-dimensional tubes and ribbons. By using the radio buttons and selection subpanel discussed in the previous two sections, these special effects can be applied to an entire model or region, or to a segment of a tube or ribbon that correspond to an individual amino acid.

Adding Textures

The textures found in the Halftone Texture, Bend Texture, and Patterns menus of the Decorations panel are specified by easy to modify configuration files that are read when the ProteinShader program starts up. Each menu has its own configuration file, which is found in a subdirectory of the textures directory:

Halftone Textures: halftoning/halftoning_textures.conf
Bend Textures: bend/bend_textures.conf
Pattens Textures: patterns/patterns_textures.conf

The purpose of each configuration file is to associate texture files (PNG or JPEG images) with menu names. The assocations are specified one per line by giving the desired menu name followed by the equal sign and then a file name. The configuration files are simple ASCII text files, so to modify a configuration file, use a text editor, not a word processor, which will use many hidden symbols.

Here is an example of the patterns_textures.conf file:

Vertical Bars = vbars.png
Horizontal Bars = hbars.png
Hash = hash.png
Noise = noise.png
Swirl = swirl.png
Square = square.png
Test = test.png

The image format type must be indicated by a lowercase three letter extension at the end of the texture file name. Only ".png" (PNG) and ".jpg" (JPEG) texture files have been tested, but the texture loader being used by the program should be able to recognize ".bmp" (BMP), ".gif" (GIF), and ".tga" (TGA) formats. If you cannot see the dot followed by three letters on your image filenames, your operating system may be set to hide extensions. In that case, the extension can probably be seen by opening a properties or information box on a file.

The texture files in current use happen to be 256 by 256 pixels. Other sizes can be accomodated, but a roughly square image works best because of the dimensions of the tube or ribbon segments that the image will be mapped onto. OpenGL used to have a restriction that each dimension of an image file had to be equal to two rasied to some integer power, but that restriction has been relaxed as of OpenGL 2.0.

The order in which menu names are listed in the configuration file determines the order that the names will have in the menu. The program expects to find a PNG or JPEG image file in the same directory as the configuration file it is named in. If an image file cannot be found, the program will continue to load as many textures as it can find, and afterwards will open a dialog box with information on the missing file or files.

Cartoon Color Panel

[screenshot of Cartoon Color panel]

The selection subpanel and radio buttons discussed further above can be used to apply a color change to an entire model, chain, or region, or to a segment of a tube or ribbon that corresponds to one or more individual amino acids. The Cartoon Color panel has three buttons for changing color on the current selection:

Cartoon Visibility Panel

[screenshot of Cartoon Visibility panel]

The Cartoon Visibility subpanel provides fine-grained control of visibility in a cartoon-type display (ribbons and/or tubes), whereas the Visibility menu above the canvas provides only a coarse level of control over whether amino acids, heterogens, or waters are allowed to be displayed. The selection subpanel and radio buttons discussed further above can be used to apply a visibility status change to an entire model, chain, or region, or to a segment of a tube or ribbon that corresponds to one or more amino acids. The Cartoon Visibility panel has three buttons and a slider for changing the visibility status on the current selection:

Cartoon Side Chains Panel

[screenshot of Cartoon Side Chains panel]

Amino acid side chains are added to ribbons and tubes by using the Space Filling, Balls and Sticks, or Sticks buttons on the Cartoon Side Chains subpanel, and are removed by using the None button. Depending on what radio buttons and menus have already been selected, this modification can be applied to individual amino acids, groups of amino acids, or the entire model.

If Space Filling or Balls and Sticks is selected, α-carbons are only shown if the "Show α-carbon" check box is selected before clicking on the button. In a Balls and Sticks style display, the α-carbons will be visible when ribbons are selected, but will be obscured in a tube-style display because of the diameter of the tube. If Balls and Sticks or Sticks is selected, α-carbon to β-carbon bonds are always included, but they will be mostly obscured in a tube-style display.

Setting the side chains to be visible or invisible during a cartoon-style display (ribbons or tubes) is controlled only by the Cartoon Side Chains panel. However, if a side chain is made visible in cartoon mode, it translucency and color can be set by using the Atom Visibility and Atom Color subpanels, respectively.