NAME

conic - generate CPK-style molecular models with shadows

SYNOPSIS

conic [ -p ] [ -f output-format ] [ -s ] [ -a mode ] [ -o output-file ] [ -x pixels-wide ] [ -y pixels-high ] [ -c config-file ] [ -e shell-command ] [ -t ] [ -v ] [ -A ] [ -C ] [ -F ] [ -S scale_factor ] [ -W ] [ PDB-file ]

DESCRIPTION

Conic reads a Protein Data Bank file and generates a Corey-Pauling-Koltun style image of the molecule. If no PDB file is specified, standard input is used. There can be an arbitrary number of light sources. Specular highlights, diffuse reflections, and shadows are all computed properly.

*The PDB-file argument should not be given when conic is used from within Chimera.

*On Mac systems, either the -o flag or the configuration file output option must be used to generate any output at all. If display is desired in addition to an output file, the -s flag should also be used.

COMMAND-LINE ARGUMENTS

-p
Use preview mode. Set the image size to 645 x 484 and antialias mode to none (see the -a flag).
-s
Display the computed image file; meaningful only when used in conjunction with the -o flag or the configuration file output option. Mac users, see the note above. The -s flag works only on Linux, Mac, and SGI systems, and not all formats can be displayed on all systems.
-a mode
Set the antialias mode. Mode is the same as the argument to the antialias option in the configuration file.
-o file
Store the computed image in file in the selected format. The image will not be displayed unless -s is also specified. Mac users, see the note above.
-x size
Set the horizontal image size to size pixels.
-y size
Set the vertical image size to size pixels.
-e shell-command
Execute shell-command when the image has finished drawing and exit when the command is done.
-c file
Use file as the conic configuration file.
-f output-format
Possible output-format settings are:
-t
Make the background color transparent. This only works when writing output to SGI and TIFF image files, and it adds an alpha channel to the file so that the resulting image can be composited onto other backgrounds.
-v
Print progress messages.
-A
Ignore USER COLOR, USER RADIUS, and USER MATPROP records present in the input file. Since the pdbrun command provides USER COLOR and USER RADIUS records for each atom, this flag must be used if atomic information is coming from Chimera, but a color scheme specified in an atom information file is desired (see COLORING THE MOLECULE).
-C
Force conic to display full spheres at the near clipping plane. This option affects those spheres whose centers lie across the near clipping plane from the viewer, but whose nearest extent crosses the clipping plane (conic always discards spheres whose centers are closer than the clipping plane). By default, conic shows the sphere with a portion "cut away." With this option, the entire sphere is shown. It should be noted that the "cut away" depiction is inaccurate in two regards: the partially cut spheres still cast full shadows, and no part of a sphere is shown if its center is in front of the clipping plane, even though it may extend through the plane. Typically, these inaccuracies are not noticeable, but in some situations (such as when point light sources are used) they may produce odd-looking results.
-F
Set the image size to be the full screen.
-H
If the output format is ps (see the -f and -o flags), causes binary data to be hex-encoded. Though raw binary format is more space-efficient, many printers cannot print binary data unless it is hex-encoded. Note that future versions of conic may make hex-encoding the default (and the -H flag would turn it off).
-S scale_factor
Zoom in on the center of the image by the specified factor. The size of the window remains unchanged.
-W
Force Chimera to wait until conic has exited before continuing.
PDB-file
Indicates the name of the input PDB file. If no PDB-file is given, the data is read from standard input. See the note above.

CONFIGURATION FILE

The scene computed by conic is described by a list of options in a configuration file. If the configuration file is absent, or the option is omitted, then a default value will be used. Lines beginning with `#' are comments and are ignored. All other lines are options, which begin with a keyword and are followed by space-separated values. The available options are listed below.

ambient r g b
Set the ambient light to the given RGB value, which is three floating-point intensities ranging from 0 to 1. The default ambient lighting is (0.2 0.2 0.2).
antialias mode
Set the antialiasing algorithm. Mode may be none, for no antialiasing; 3/2, for mapping 3x3 calculation pixels onto 2x2 image pixels; or 2x2, for mapping 2x2 calculation pixels onto single image pixels. Antialiasing improves the picture quality at the expense of computation time. The time increase is proportional to the number of pixels computed modulo the startup time. Thus, for small molecules, which have low startup times, going from none to 2x2 will increase the computation time four-fold. The relative increase is less for large molecules since the startup time for large molecules is a significant fraction of total computation time. The default mode is none.
atinfo file
Use file as the atom information file, which contains default atomic radii and information on how each type of atom should be colored. Coloring the molecule is described in greater detail below. This option has no effect if conic is invoked from within Chimera, as Chimera fully specifies the atom colors and radii.
background r g b [r g b [ r g b ] ]
Set the background color for the image. If only one RGB value is given, then the entire background is set in that color. If two RGB values are given, then the background is interpolated between the two colors from bottom to top. If three RGB values are specified, then the background is smoothly interpolated from the first color at the bottom of the image to the second color in the middle to the third color at the top. The default background color is black (0 0 0). NOTE: if this option is given in the configuration file, it will override any color specified in the input PDB file.
cone x y z r g b dx dy dz angle
Define a cone light. The absolute Cartesian coordinates of the light source are (x y z). The color of the light is given by ( r g b). The Cartesian direction of the cone light is given by (dx dy dz), and the half-angle of the cone is angle degrees.
eye r g b
Conic places an additional point light source which coincides with the eye position. The purpose of this light source is to weakly illuminate shadowed areas so that they have discernible features rather than a uniform color. The eye option sets the color of the point light source. The default value is (0.3 0.3 0.3).
format output-format
See the -f option for possible output-format settings.
fov angle
Angle is the field-of-view half-angle; the default is 15 degrees.
input file
Use file as the Protein Data Bank file.
light x y z r g b
Add an infinite light source to the scene being computed. The direction of the light source is specified by (x y z). The color of the light source is specified by (r g b). By default, conic defines a light source with direction (1 1 1) and color (1 1 1). The default light source is removed if other sources are specified via the light option.
location x y
Sets the image location on the screen. This parameter is only meaningful if the output is to the screen, i.e., for output format screen.
ls_flags flag
Change the behavior of subsequently specified light sources. The value of flag may be noshadow or shadow. By default, a light source only shines on a point if there are no intervening spheres. If noshadow is specified, however, all points are considered to be lit. Using shadow will undo the effects of noshadow for subsequent light sources. Noshadow is generally used if the scene is very complex and shadows make the resulting image difficult to interpret. This problem may also be mitigated by using multiple light sources.
matprop kd ks power
Define default material properties. Kd is the diffuse reflection coefficient. Ks is the specular reflection coefficient. Power controls how sharply defined a specular light is, and must be a positive even integer. The higher the value of power, the smaller the specular reflection area. The default values are 0.5, 0.25, and 8, respectively. Kd and ks must be in the range 0-1, and power must be 2 or higher.
output file
Store the computed image in file in the selected format; equivalent to using -o. Mac users, see the note above.
point x y z r g b
Define a point light source. The arguments are the same as those for the light option, except that (x y z) defines the light position rather than direction.
quad x1 y1 z1 x2 y2 z2 x3 y3 z3
Define a quadrilateral (actually a parallelogram) in the image. Since the quad is a parallelogram, only three vertices are necessary to define it. Quads are "second-class" objects: They can be in shadow from first-class objects (spheres), but cannot cast shadows themselves. In fact, they cannot even block first-class objects; first-class objects show through. Quads are typically used to construct large background areas that show the shadow of the scene as a whole. For best results, there are two important things to note. First, the default field-of-view for conic is quite narrow, and if you do not see an expected shadow it may be because it is falling outside the field of view. In such a case, you may want to expand the field of view half-angle (using the fov option) from the default 15 degrees to 25 or 30 degrees. The second thing to note is that because of ambient light, shadows will not be black. If you desire black shadows, turn off ambient lighting (using the ambient option, above).
quad_color r1 g1 b1 [ r2 g2 b2 r3 g3 b3 r4 g4 b4 ]
Define the vertex colors of following quads. The interior color of the quad will be smoothly interpolated between the vertex colors. If only one RGB triple is specified, all vertices will have that color.
rcone x y z r g b dx dy dz angle
Rcone is to cone as rpoint is to point.
rpoint x y z r g b
Define a point light source relative to the scene, similar to point. The (x y z) coordinate is relative to the center of the scene, with lengths normalized such that the distance from the eye to the center of the scene is 1. Thus, the option
rpoint 0 0 1 1 1 1
would define a point light source that coincided with the eye, whereas
rpoint 0 2 0 1 1 1
would define a point light source directly above the center of the scene, twice as far above the scene as the distance from the center of the scene to the eye.
rquad x1 y1 z1 x2 y2 z2 x3 y3 z3
Rquad is to quad as rpoint is to point.
rspot x y z r g b dx dy dz power
Rspot is to spot as rpoint is to point.
size x y
Sets the image size. The default image size is 1280 x 1024. If conic is invoked from within Chimera, then the default image size will be the same as the Chimera window size.
spot x y z r g b dx dy dz power
Define a spotlight. The absolute Cartesian coordinates of the light source are (x y z). The color of the light is given by (r g b). The Cartesian direction of the spotlight is given by (dx dy dz). The intensity of the spotlight drops off as the angle between the spotlight direction and the pixel direction; the rate of decrease is the cosine of the angle raised to the powerth power. Power must be an even integer; odd integers will be incremented silently.

COLORING THE MOLECULE

Conic uses two sources of atom radius and coloring information. If neither source of information yields a radius and color for an atom, then the atom is ignored.

The first source is embedded in the input to conic, which is an extended Protein Data Bank format. The format is identical to standard PDB format except that ATOM and HETATM records may be preceded by USER records, whose text field contains a keyword and some values. (The pdbrun command generates output of this format.) The keywords that conic uses are COLOR, RADIUS, and MATPROP. COLOR is followed by three floating-point RGB intensities and a color name. RADIUS is followed by a floating-point number representing the atom radius in Å. MATPROP is followed by the three parameters to the matprop option in the configuration file. Once COLOR, RADIUS, or MATPROP is given, it applies to all of the succeeding atoms in the file.

If the input fails to specify the color, radius, or material properties of an atom, conic uses an atom information file to supply missing values. The file contains comment lines, which begin with #, and information lines, which have either five or eight fields: atom type, radius, an RGB triple, and optionally three material property values (see the matprop keyword in the configuration file section for the meaning of material property fields and their default values). The atom type is either one or two characters and is used to match the atom type in the PDB input. The atom type * is a special case and matches any atom which does not match any other information lines. Using an atom information file, simple color-by-type images may be generated from raw PDB files.

The default atom information file conic.atinfo contains the following parameters:
#atomtype radius RGB
C 1.8 0.5 0.5 0.5
N 1.8 0 0 1
O 1.5 1 0 0
S 1.85 1 1 0
H 1.0 1 1 1
P 1.9 1 0.5 0
F 1.35 0 1 0
CL 1.8 0 1 0
BR 1.95 0 1 0
I 2.15 0 1 0
B 1.8 0.5 0 0
FE 0.64 0.5 0 0
CU 1.28 0.5 0 0
ZN 1.38 0.5 0 0

BUGS

Light intensity does not attenuate with distance.

FILES

/usr/local/chimera/share/conic.atinfo - default atom information file

AUTHORS

Eric F. Pettersen, Conrad Huang, Gregory S. Couch
Computer Graphics Laboratory
University of California, San Francisco