Scroll to navigation



garlic - molecular visualization program


garlic [Garlic options] [X11 options] [filename]


This manual page briefly documents garlic, a free molecular visualization program. Extensive documentation in HTML format and sources may be found at garlic home, <URL:>. Physical location: School of Medicine, University of Osijek, Croatia, Europe. Precompiled packages for a number of GNU/Linux distributions are available. These include Debian, SuSE, Mandriva, Linspire and a number of other distros. The HTML documentation may be downloaded and unpacked for local use (recommended usage). Here you can find a very short description of the program and the list of command line options.

garlic is a molecular visualization program originally written for investigation of membrane proteins. Now it may be used to visualize and simple editing of all proteins and molecules. This version recognizes PDB format version 2.1; see the source file pdb_atom.c for details about this format.


Command line options may be divided in two groups: true (specific) garlic options and X11 options. Options may be given in any order. All options and hard-coded default values are listed in the table below. For each parameter, the value defined through command line is used, if available. If not, the value defined in .garlicrc file is used. If .garlicrc file is not available, or there is no corresponding entry in this file, the hard-coded default value is used. The sample .garlicrc file included in the original package contains the values equal to hard-coded defaults.

garlic options:

Print help and exit.
Print version and exit.
Register garlic: inform author that your site has garlic installed and that someone is going to use this program. By registering, you are encouraging author to continue development of garlic. You can also help author to ensure support for further development. This option sends one short e-mail message, containing only the e-mail message header and the word 'Hi!',to <>. Please execute garlic -r if you are going to use this program. If you are not connected to the Internet, consider sending a short message from some other system.
Hide the coordinate system icon (top left corner).
Hide the control window (upper right corner).
Display stereo image.
Default slab mode. Available slab modes are: off, planar (default), sphere, half-sphere, cylinder and half cylinder.
Default color fading mode. Available modes: off, planar (default), sphere, half-sphere, cylinder and half cylinder.
Default atom drawing style (hard-coded default: 2).
Default bond drawing style (hard-coded default: 2).
Default number of color fading surfaces. Parallel planes, concentric spheres or concentric cylinders may be used as fading surfaces. Three RGB triplets are assigned to each surface. Surfaces are evenly spaced; at least one and at most eight should be defined. At least three colors (left, middle and right) are assigned to each visible atom. These three colors are based on the position of a given atom relative to the nearest fading surface(s) and on colors assigned to these surfaces. Colors are combined using linear weighting.
Left color at the i-th surface; i is between zero and seven. The color string should be compliant with X11R5. Blue, for example, may be defined as blue or as RGB:0000/0000/FFFF etc. For example -lc4 RGB:BBBB/8888/4444 defines the left color at the surface whose index is equal to four.
Middle color at the i-th surface.
Right color at the i-th surface.
Print configuration data and exit.
Print cursor names to stdout and exit.
Write commands and messages to log file. The file will be created in the current working directory. If this is not possible, log file will be created in users home directory.

X11 option:

X server to contact.
Window geometry (default: almost the whole screen).
Main window background color (default is black).
Main window foreground color (default: white).
Text font; (default is 10x20).
Text background color (default is black).
Text color (default is white).
Cursor name; see /usr/include/X11/cursorfont.h for names; remove the XC_ prefix.




The program is fully documented in the garlic-doc package available on Debian GNU/Linux system.

There is also documentation online at <URL:>.


garlic was written by Damir Zuci <>, University of Osijek, Croatia, Europe. He died in September 2007.

The original man page was written by zhaoway <>, for the Debian GNU system and later modified by Damir Zuci.

15 Feb 2008