1 /* Copyright (C) 2000-2006 Damir Zucic */
2
3 /*=============================================================================
4
5 print_help.c
6
7 Purpose:
8 Print brief help: short introduction and list of options. This is not
9 the true (on-line) help for garlic!
10
11 Input:
12 No input.
13
14 Output:
15 Introductory information written to stdout.
16
17 Return value:
18 No return value.
19
20 ========includes:============================================================*/
21
22 #include <stdio.h>
23
24 /*======print brief help:====================================================*/
25
PrintHelp_(void)26 void PrintHelp_ (void)
27 {
28 fprintf (stdout, "\n");
29 fprintf (stdout,
30 "=========================================================================\n");
31 fprintf (stdout,
32 " Garlic - free molecular viewer and editor\n");
33 fprintf (stdout,
34 "=========================================================================\n");
35 fprintf (stdout, "\n");
36 fprintf (stdout,
37 "Garlic was written by Damir Zucic (zucic@mefos.hr) as a complement to\n");
38 fprintf (stdout,
39 "other molecular visualization programs, like rasmol (by Roger Sayle).\n");
40 fprintf (stdout,
41 "It was written to simplify the analysis of membrane proteins, but it can\n");
42 fprintf (stdout,
43 "be used as general purpose molecular visualization program, provided that\n");
44 fprintf (stdout,
45 "molecular coordinates are available in PDB format, version 2.1 or older.\n");
46 fprintf (stdout,
47 "Garlic may also be used to analyze protein sequences.\n");
48 fprintf (stdout, "\n");
49 fprintf (stdout,
50 "Some of the features, which distinguish this program from others, are:\n");
51 fprintf (stdout,
52 "(1) Coordinates, labels and other data are automatically displayed for\n");
53 fprintf (stdout,
54 " the atom nearest to the current pointer (mouse) position.\n");
55 fprintf (stdout,
56 "(2) Additional numeric data, like hydrophobicity, may be associated to\n");
57 fprintf (stdout,
58 " each amino acid. The whole structure may be colored according to\n");
59 fprintf (stdout,
60 " these values.\n");
61 fprintf (stdout,
62 "(3) Selection mechanism is different.\n");
63 fprintf (stdout,
64 "(4) Two bonds at different distance from observer have different colors.\n");
65 fprintf (stdout,
66 "-------------------------------------------------------------------------\n");
67 fprintf (stdout,
68 "Usage: garlic [true_garlic_options] [X11_options] [filename]\n");
69 fprintf (stdout,
70 "-------------------------------------------------------------------------\n");
71 fprintf (stdout,
72 "Command line options may be divided in two groups: true (specific) garlic\n");
73 fprintf (stdout,
74 "options and X11 options. Options may be given in any order. All options\n");
75 fprintf (stdout,
76 "and hard-coded default values are listed in the table below. For each\n");
77 fprintf (stdout,
78 "parameter, the value defined through command line is used, if available.\n");
79 fprintf (stdout,
80 "If not, the value defined in .garlicrc file is used. If .garlicrc file is\n");
81 fprintf (stdout,
82 "not available, or there is no corresponding entry in this file, the\n");
83 fprintf (stdout,
84 "hard-coded default value is used. The sample .garlicrc file included in\n");
85 fprintf (stdout,
86 "the original package contains the values equal to hard-coded defaults.\n");
87 fprintf (stdout,
88 "-------------------------------------------------------------------------\n");
89 fprintf (stdout,
90 "garlic option: Description:\n");
91 fprintf (stdout,
92 "-------------------------------------------------------------------------\n");
93 fprintf (stdout,
94 "-h, --help Print help and exit.\n");
95 fprintf (stdout,
96 "-v, --version Print version and exit.\n");
97 fprintf (stdout,
98 "-r, --register Register garlic: inform author that your site has\n");
99 fprintf (stdout,
100 " garlic installed and that someone is going to use\n");
101 fprintf (stdout,
102 " this program. By registering, you are encouraging\n");
103 fprintf (stdout,
104 " author to continue development of garlic. You can\n");
105 fprintf (stdout,
106 " also help author to ensure support for further\n");
107 fprintf (stdout,
108 " development. This option sends an e-mail message,\n");
109 fprintf (stdout,
110 " containing only the e-mail message header and the\n");
111 fprintf (stdout,
112 " word 'Hi!', to zucic@garlic.mefos.hr. Please type\n");
113 fprintf (stdout,
114 " garlic -r if you are going to use this program.\n");
115 fprintf (stdout,
116 " If your system is not connected to the Internet,\n");
117 fprintf (stdout,
118 " you can send short e-mail from some other system.\n");
119 fprintf (stdout,
120 "-nosys Hide the coordinate system icon (top left corner).\n");
121 fprintf (stdout,
122 "-no-control Hide the control window (upper right corner).\n");
123 fprintf (stdout,
124 "-stereo Display stereo image.\n");
125 fprintf (stdout,
126 "-slab mode Default slab mode. Available slab modes are: off,\n");
127 fprintf (stdout,
128 " planar (default), sphere, half-sphere, cylinder\n");
129 fprintf (stdout,
130 " and half cylinder.\n");
131 fprintf (stdout,
132 "-fading mode Default color fading mode. Available modes: off,\n");
133 fprintf (stdout,
134 " planar (default), sphere, half-sphere, cylinder\n");
135 fprintf (stdout,
136 " and half cylinder.\n");
137 fprintf (stdout,
138 "-as number Default atom drawing style (hard-coded default: 2).\n");
139 fprintf (stdout,
140 "-bs number Default bond drawing style (hard-coded default: 3).\n");
141 fprintf (stdout,
142 "-fs number Default number of color fading surfaces. Parallel\n");
143 fprintf (stdout,
144 " planes, concentric spheres or conc. cylinders may\n");
145 fprintf (stdout,
146 " be used as fading surfaces. Three RGB triplets\n");
147 fprintf (stdout,
148 " are assigned to each surface. Surfaces are evenly\n");
149 fprintf (stdout,
150 " spaced; at least one and at most eight should be\n");
151 fprintf (stdout,
152 " defined. At least three colors (left, middle and\n");
153 fprintf (stdout,
154 " right) are assigned to each visible atom. These\n");
155 fprintf (stdout,
156 " three colors are based on the position of a given\n");
157 fprintf (stdout,
158 " atom relative to the nearest fading surface(s)\n");
159 fprintf (stdout,
160 " and on colors assigned to these surfaces. Colors\n");
161 fprintf (stdout,
162 " are combined using linear weighting.\n");
163 fprintf (stdout,
164 "-lc<i> color Left color at the i-th surface; i is between zero\n");
165 fprintf (stdout,
166 " and seven. The color string should be compliant\n");
167 fprintf (stdout,
168 " with X11R5. Blue, for example, may be specified\n");
169 fprintf (stdout,
170 " as blue or as RGB:0000/0000/FFFF etc. For example\n");
171 fprintf (stdout,
172 " -lc4 RGB:BBBB/8888/4444 defines the left color\n");
173 fprintf (stdout,
174 " at the surface whose index is equal to four.\n");
175 fprintf (stdout,
176 "-mc<i> color Middle color at the i-th surface.\n");
177 fprintf (stdout,
178 "-rc<i> color Right color at the i-th surface.\n");
179 fprintf (stdout,
180 "-pc, --print-config Print configuration data and exit.\n");
181 fprintf (stdout,
182 "-pcn Print cursor names to stdout and exit.\n");
183 fprintf (stdout,
184 "-log logfile Write commands and messages to log file. The file\n");
185 fprintf (stdout,
186 " will be created in the current working directory.\n");
187 fprintf (stdout,
188 " If this is not possible, log file will be created\n");
189 fprintf (stdout,
190 " in users home directory.\n");
191 fprintf (stdout,
192 "-------------------------------------------------------------------------\n");
193 fprintf (stdout,
194 "X11 option: Description:\n");
195 fprintf (stdout,
196 "-------------------------------------------------------------------------\n");
197 fprintf (stdout,
198 "-display displayname X server to contact.\n");
199 fprintf (stdout,
200 "-geometry geom Window geometry (default: almost the whole screen).\n");
201 fprintf (stdout,
202 "-bg color Main window background color (default is black).\n");
203 fprintf (stdout,
204 "-fg color Main window foreground color (default: white).\n");
205 fprintf (stdout,
206 "-fn fontname Text font; (default is 10x20).\n");
207 fprintf (stdout,
208 "-tbg color Text background color (default is black).\n");
209 fprintf (stdout,
210 "-tfg color Text color (default is white).\n");
211 fprintf (stdout,
212 "-cursor cursorname Cursor name; see /usr/include/X11/cursorfont.h for\n");
213 fprintf (stdout,
214 " names; remove the XC_ prefix.\n");
215 fprintf (stdout,
216 "-------------------------------------------------------------------------\n");
217 fprintf (stdout,
218 "filename: The input file name. Full pathname may be used. If\n");
219 fprintf (stdout,
220 " filename does not contain the path, garlic will try\n");
221 fprintf (stdout,
222 " to find the specified file in the current working\n");
223 fprintf (stdout,
224 " directory. If the first attempt to open the file\n");
225 fprintf (stdout,
226 " fails, the filename is appended to the content of\n");
227 fprintf (stdout,
228 " the environment variable MOL_DIR for the second\n");
229 fprintf (stdout,
230 " attempt. If this fails too, garlic will search all\n");
231 fprintf (stdout,
232 " directories specified in the environment variable\n");
233 fprintf (stdout,
234 " MOL_PATH.\n");
235 fprintf (stdout,
236 "-------------------------------------------------------------------------\n");
237 fprintf (stdout,
238 "Personal initializations may be written to .garlicrc file. Normally, this\n");
239 fprintf (stdout,
240 "file should be kept in users home directory. Note that this is not the\n");
241 fprintf (stdout,
242 "first directory to be searched for .garlicrc file! Up to seven pathnames\n");
243 fprintf (stdout,
244 "are tryed in the following order:\n");
245 fprintf (stdout, "\n");
246 fprintf (stdout,
247 ".garlicrc .garlicrc in current working directory.\n");
248 fprintf (stdout,
249 "$HOME/.garlicrc .garlicrc in home directory. This is the\n");
250 fprintf (stdout,
251 " recommended location.\n");
252 fprintf (stdout,
253 "$HOME/garlic/.garlicrc ./garlicrc, subdirectory garlic of users\n");
254 fprintf (stdout,
255 " home directory.\n");
256 fprintf (stdout,
257 "/usr/share/garlic/.garlicrc ./garlicrc in /usr/share/garlic (Linux).\n");
258 fprintf (stdout,
259 "/etc/garlicrc garlicrc in /etc, Debian Linux; note that\n");
260 fprintf (stdout,
261 " file name is garlicrc in this case!\n");
262 fprintf (stdout,
263 "/usr/local/lib/garlic/.garlicrc .garlicrc in /usr/local/lib/garlic dir.\n");
264 fprintf (stdout,
265 "/usr/lib/garlic/.garlicrc .garlicrc in /usr/lib/garlic; this is the\n");
266 fprintf (stdout,
267 " last attempt; if it failes, hard-coded\n");
268 fprintf (stdout,
269 " default values will be used.\n");
270 fprintf (stdout,
271 "-------------------------------------------------------------------------\n");
272 fprintf (stdout,
273 "Environment variables:\n");
274 fprintf (stdout,
275 "-------------------------------------------------------------------------\n");
276 fprintf (stdout,
277 "MOL_DIR Defines where to look for the specified file if not\n");
278 fprintf (stdout,
279 " found in the current working directory.\n");
280 fprintf (stdout,
281 "MOL_PATH The list of directories to be searched. It is used\n");
282 fprintf (stdout,
283 " if attempt with MOL_DIR failes or if MOL_DIR is\n");
284 fprintf (stdout,
285 " not defined. Use space or colon (:) to separate\n");
286 fprintf (stdout,
287 " directory names. MOL_PATH is quite useful; it is\n");
288 fprintf (stdout,
289 " recommended to define this environment variable\n");
290 fprintf (stdout,
291 " through .login, .bashrc or some other script.\n");
292 fprintf (stdout,
293 " MOL_PATH is more useful than MOL_DIR so it is\n");
294 fprintf (stdout,
295 " recommended to define only MOL_PATH variable.\n");
296 fprintf (stdout,
297 "DISPLAY X server to which the program should be connected.\n");
298 fprintf (stdout,
299 "-------------------------------------------------------------------------\n");
300 fprintf (stdout,
301 "garlic home page: http://garlic.mefos.hr/garlic\n");
302 fprintf (stdout,
303 "Damir Zucic home page: http://garlic.mefos.hr/zucic\n");
304 fprintf (stdout,
305 "E-mail: zucic@mefos.hr\n");
306 fprintf (stdout,
307 "=========================================================================\n");
308 fprintf (stdout, "\n");
309 }
310
311 /*===========================================================================*/
312
313
314