1 |
|
/* |
2 |
|
File autogenerated by gengetopt version 2.11 |
3 |
|
generated with the following command: |
4 |
< |
/home/maul/gezelter/tim/bin/gengetopt -F StaticPropsCmd |
4 |
> |
/home/maul/gezelter/tim/program/gengetopt-2.11/src/gengetopt -F StaticPropsCmd |
5 |
|
|
6 |
|
The developers of gengetopt consider the fixed text that goes in all |
7 |
|
gengetopt output files to be in the public domain: |
35 |
|
printf("\n" |
36 |
|
"Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE); |
37 |
|
printf("\n"); |
38 |
< |
printf(" -h, --help Print help and exit\n"); |
39 |
< |
printf(" -V, --version Print version and exit\n"); |
40 |
< |
printf(" -i, --input=filename input dump file\n"); |
41 |
< |
printf(" -o, --output=filename output file name\n"); |
42 |
< |
printf(" -n, --step=INT process every n frame (default=`1')\n"); |
43 |
< |
printf(" -r, --nrbins=INT number of bins for distance (default=`100')\n"); |
44 |
< |
printf(" -a, --nanglebins=INT number of bins for cos(angle) (default=`50')\n"); |
45 |
< |
printf(" -l, --length=DOUBLE maximum length (Defaults to 1/2 smallest \n length of first frame)\n"); |
46 |
< |
printf(" --sele1=selection script select first stuntdouble set\n"); |
47 |
< |
printf(" --sele2=selection script select second stuntdouble set\n"); |
38 |
> |
printf(" -h, --help Print help and exit\n"); |
39 |
> |
printf(" -V, --version Print version and exit\n"); |
40 |
> |
printf(" -i, --input=filename input dump file\n"); |
41 |
> |
printf(" -o, --output=filename output file name\n"); |
42 |
> |
printf(" -n, --step=INT process every n frame (default=`1')\n"); |
43 |
> |
printf(" -r, --nrbins=INT number of bins for distance (default=`100')\n"); |
44 |
> |
printf(" -a, --nanglebins=INT number of bins for cos(angle) (default=\n `50')\n"); |
45 |
> |
printf(" -l, --length=DOUBLE maximum length (Defaults to 1/2 smallest \n length of first frame)\n"); |
46 |
> |
printf(" --sele1=selection script select the first stuntdouble set\n"); |
47 |
> |
printf(" --sele2=selection script select the second stuntdouble set\n"); |
48 |
> |
printf(" --sele3=selection script select the third stuntdouble set\n"); |
49 |
> |
printf(" --refsele=selection script select reference (use and only use with \n --gxyz)\n"); |
50 |
> |
printf(" --molname=STRING molecule name\n"); |
51 |
> |
printf(" --begin=INT begin interanl index\n"); |
52 |
> |
printf(" --end=INT end internal index\n"); |
53 |
|
printf("\n"); |
54 |
|
printf(" Group: staticProps an option of this group is required\n"); |
55 |
< |
printf(" --gofr g(r)\n"); |
56 |
< |
printf(" --r_theta g(r, cos(theta))\n"); |
57 |
< |
printf(" --r_omega g(r, cos(omega))\n"); |
58 |
< |
printf(" --theta_omega g(cos(theta), cos(omega))\n"); |
59 |
< |
printf(" --xyz g(x, y, z)\n"); |
55 |
> |
printf(" --gofr g(r)\n"); |
56 |
> |
printf(" --r_theta g(r, cos(theta))\n"); |
57 |
> |
printf(" --r_omega g(r, cos(omega))\n"); |
58 |
> |
printf(" --theta_omega g(cos(theta), cos(omega))\n"); |
59 |
> |
printf(" --gxyz g(x, y, z)\n"); |
60 |
> |
printf(" --p2 p2 order parameter (--sele1 and --sele2 must \n be specified)\n"); |
61 |
> |
printf(" --scd scd order parameter(either --sele1, --sele2, \n --sele3 are specified or --molname, \n --begin, --end are specified)\n"); |
62 |
> |
printf(" --density density plot (--sele1 must be specified)\n"); |
63 |
> |
printf(" --slab_density slab density (--sele1 must be specified)\n"); |
64 |
|
} |
65 |
|
|
66 |
|
|
96 |
|
args_info->length_given = 0 ; |
97 |
|
args_info->sele1_given = 0 ; |
98 |
|
args_info->sele2_given = 0 ; |
99 |
+ |
args_info->sele3_given = 0 ; |
100 |
+ |
args_info->refsele_given = 0 ; |
101 |
+ |
args_info->molname_given = 0 ; |
102 |
+ |
args_info->begin_given = 0 ; |
103 |
+ |
args_info->end_given = 0 ; |
104 |
|
args_info->gofr_given = 0 ; |
105 |
|
args_info->r_theta_given = 0 ; |
106 |
|
args_info->r_omega_given = 0 ; |
107 |
|
args_info->theta_omega_given = 0 ; |
108 |
< |
args_info->xyz_given = 0 ; |
108 |
> |
args_info->gxyz_given = 0 ; |
109 |
> |
args_info->p2_given = 0 ; |
110 |
> |
args_info->scd_given = 0 ; |
111 |
> |
args_info->density_given = 0 ; |
112 |
> |
args_info->slab_density_given = 0 ; |
113 |
|
#define clear_args() { \ |
114 |
|
args_info->input_arg = NULL; \ |
115 |
|
args_info->output_arg = NULL; \ |
118 |
|
args_info->nanglebins_arg = 50 ;\ |
119 |
|
args_info->sele1_arg = NULL; \ |
120 |
|
args_info->sele2_arg = NULL; \ |
121 |
+ |
args_info->sele3_arg = NULL; \ |
122 |
+ |
args_info->refsele_arg = NULL; \ |
123 |
+ |
args_info->molname_arg = NULL; \ |
124 |
|
} |
125 |
|
|
126 |
|
clear_args(); |
146 |
|
{ "length", 1, NULL, 'l' }, |
147 |
|
{ "sele1", 1, NULL, 0 }, |
148 |
|
{ "sele2", 1, NULL, 0 }, |
149 |
+ |
{ "sele3", 1, NULL, 0 }, |
150 |
+ |
{ "refsele", 1, NULL, 0 }, |
151 |
+ |
{ "molname", 1, NULL, 0 }, |
152 |
+ |
{ "begin", 1, NULL, 0 }, |
153 |
+ |
{ "end", 1, NULL, 0 }, |
154 |
|
{ "gofr", 0, NULL, 0 }, |
155 |
|
{ "r_theta", 0, NULL, 0 }, |
156 |
|
{ "r_omega", 0, NULL, 0 }, |
157 |
|
{ "theta_omega", 0, NULL, 0 }, |
158 |
< |
{ "xyz", 0, NULL, 0 }, |
158 |
> |
{ "gxyz", 0, NULL, 0 }, |
159 |
> |
{ "p2", 0, NULL, 0 }, |
160 |
> |
{ "scd", 0, NULL, 0 }, |
161 |
> |
{ "density", 0, NULL, 0 }, |
162 |
> |
{ "slab_density", 0, NULL, 0 }, |
163 |
|
{ NULL, 0, NULL, 0 } |
164 |
|
}; |
165 |
|
|
248 |
|
|
249 |
|
|
250 |
|
case 0: /* Long option with no short option */ |
251 |
< |
/* select first stuntdouble set. */ |
251 |
> |
/* select the first stuntdouble set. */ |
252 |
|
if (strcmp (long_options[option_index].name, "sele1") == 0) |
253 |
|
{ |
254 |
|
if (args_info->sele1_given) |
262 |
|
break; |
263 |
|
} |
264 |
|
|
265 |
< |
/* select second stuntdouble set. */ |
265 |
> |
/* select the second stuntdouble set. */ |
266 |
|
else if (strcmp (long_options[option_index].name, "sele2") == 0) |
267 |
|
{ |
268 |
|
if (args_info->sele2_given) |
273 |
|
} |
274 |
|
args_info->sele2_given = 1; |
275 |
|
args_info->sele2_arg = gengetopt_strdup (optarg); |
276 |
+ |
break; |
277 |
+ |
} |
278 |
+ |
|
279 |
+ |
/* select the third stuntdouble set. */ |
280 |
+ |
else if (strcmp (long_options[option_index].name, "sele3") == 0) |
281 |
+ |
{ |
282 |
+ |
if (args_info->sele3_given) |
283 |
+ |
{ |
284 |
+ |
fprintf (stderr, "%s: `--sele3' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
285 |
+ |
clear_args (); |
286 |
+ |
exit (EXIT_FAILURE); |
287 |
+ |
} |
288 |
+ |
args_info->sele3_given = 1; |
289 |
+ |
args_info->sele3_arg = gengetopt_strdup (optarg); |
290 |
+ |
break; |
291 |
+ |
} |
292 |
+ |
|
293 |
+ |
/* select reference (use and only use with --gxyz). */ |
294 |
+ |
else if (strcmp (long_options[option_index].name, "refsele") == 0) |
295 |
+ |
{ |
296 |
+ |
if (args_info->refsele_given) |
297 |
+ |
{ |
298 |
+ |
fprintf (stderr, "%s: `--refsele' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
299 |
+ |
clear_args (); |
300 |
+ |
exit (EXIT_FAILURE); |
301 |
+ |
} |
302 |
+ |
args_info->refsele_given = 1; |
303 |
+ |
args_info->refsele_arg = gengetopt_strdup (optarg); |
304 |
+ |
break; |
305 |
+ |
} |
306 |
+ |
|
307 |
+ |
/* molecule name. */ |
308 |
+ |
else if (strcmp (long_options[option_index].name, "molname") == 0) |
309 |
+ |
{ |
310 |
+ |
if (args_info->molname_given) |
311 |
+ |
{ |
312 |
+ |
fprintf (stderr, "%s: `--molname' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
313 |
+ |
clear_args (); |
314 |
+ |
exit (EXIT_FAILURE); |
315 |
+ |
} |
316 |
+ |
args_info->molname_given = 1; |
317 |
+ |
args_info->molname_arg = gengetopt_strdup (optarg); |
318 |
|
break; |
319 |
|
} |
320 |
|
|
321 |
+ |
/* begin interanl index. */ |
322 |
+ |
else if (strcmp (long_options[option_index].name, "begin") == 0) |
323 |
+ |
{ |
324 |
+ |
if (args_info->begin_given) |
325 |
+ |
{ |
326 |
+ |
fprintf (stderr, "%s: `--begin' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
327 |
+ |
clear_args (); |
328 |
+ |
exit (EXIT_FAILURE); |
329 |
+ |
} |
330 |
+ |
args_info->begin_given = 1; |
331 |
+ |
args_info->begin_arg = strtol (optarg,&stop_char,0); |
332 |
+ |
break; |
333 |
+ |
} |
334 |
+ |
|
335 |
+ |
/* end internal index. */ |
336 |
+ |
else if (strcmp (long_options[option_index].name, "end") == 0) |
337 |
+ |
{ |
338 |
+ |
if (args_info->end_given) |
339 |
+ |
{ |
340 |
+ |
fprintf (stderr, "%s: `--end' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
341 |
+ |
clear_args (); |
342 |
+ |
exit (EXIT_FAILURE); |
343 |
+ |
} |
344 |
+ |
args_info->end_given = 1; |
345 |
+ |
args_info->end_arg = strtol (optarg,&stop_char,0); |
346 |
+ |
break; |
347 |
+ |
} |
348 |
+ |
|
349 |
|
/* g(r). */ |
350 |
|
else if (strcmp (long_options[option_index].name, "gofr") == 0) |
351 |
|
{ |
403 |
|
} |
404 |
|
|
405 |
|
/* g(x, y, z). */ |
406 |
< |
else if (strcmp (long_options[option_index].name, "xyz") == 0) |
406 |
> |
else if (strcmp (long_options[option_index].name, "gxyz") == 0) |
407 |
|
{ |
408 |
< |
if (args_info->xyz_given) |
408 |
> |
if (args_info->gxyz_given) |
409 |
|
{ |
410 |
< |
fprintf (stderr, "%s: `--xyz' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
410 |
> |
fprintf (stderr, "%s: `--gxyz' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
411 |
|
clear_args (); |
412 |
|
exit (EXIT_FAILURE); |
413 |
|
} |
414 |
< |
args_info->xyz_given = 1; staticProps_group_counter += 1; |
414 |
> |
args_info->gxyz_given = 1; staticProps_group_counter += 1; |
415 |
|
|
416 |
|
break; |
417 |
|
} |
418 |
|
|
419 |
+ |
/* p2 order parameter (--sele1 and --sele2 must be specified). */ |
420 |
+ |
else if (strcmp (long_options[option_index].name, "p2") == 0) |
421 |
+ |
{ |
422 |
+ |
if (args_info->p2_given) |
423 |
+ |
{ |
424 |
+ |
fprintf (stderr, "%s: `--p2' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
425 |
+ |
clear_args (); |
426 |
+ |
exit (EXIT_FAILURE); |
427 |
+ |
} |
428 |
+ |
args_info->p2_given = 1; staticProps_group_counter += 1; |
429 |
+ |
|
430 |
+ |
break; |
431 |
+ |
} |
432 |
+ |
|
433 |
+ |
/* scd order parameter(either --sele1, --sele2, --sele3 are specified or --molname, --begin, --end are specified). */ |
434 |
+ |
else if (strcmp (long_options[option_index].name, "scd") == 0) |
435 |
+ |
{ |
436 |
+ |
if (args_info->scd_given) |
437 |
+ |
{ |
438 |
+ |
fprintf (stderr, "%s: `--scd' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
439 |
+ |
clear_args (); |
440 |
+ |
exit (EXIT_FAILURE); |
441 |
+ |
} |
442 |
+ |
args_info->scd_given = 1; staticProps_group_counter += 1; |
443 |
+ |
|
444 |
+ |
break; |
445 |
+ |
} |
446 |
+ |
|
447 |
+ |
/* density plot (--sele1 must be specified). */ |
448 |
+ |
else if (strcmp (long_options[option_index].name, "density") == 0) |
449 |
+ |
{ |
450 |
+ |
if (args_info->density_given) |
451 |
+ |
{ |
452 |
+ |
fprintf (stderr, "%s: `--density' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
453 |
+ |
clear_args (); |
454 |
+ |
exit (EXIT_FAILURE); |
455 |
+ |
} |
456 |
+ |
args_info->density_given = 1; staticProps_group_counter += 1; |
457 |
+ |
|
458 |
+ |
break; |
459 |
+ |
} |
460 |
+ |
|
461 |
+ |
/* slab density (--sele1 must be specified). */ |
462 |
+ |
else if (strcmp (long_options[option_index].name, "slab_density") == 0) |
463 |
+ |
{ |
464 |
+ |
if (args_info->slab_density_given) |
465 |
+ |
{ |
466 |
+ |
fprintf (stderr, "%s: `--slab_density' option given more than once\n", CMDLINE_PARSER_PACKAGE); |
467 |
+ |
clear_args (); |
468 |
+ |
exit (EXIT_FAILURE); |
469 |
+ |
} |
470 |
+ |
args_info->slab_density_given = 1; staticProps_group_counter += 1; |
471 |
+ |
|
472 |
+ |
break; |
473 |
+ |
} |
474 |
+ |
|
475 |
|
|
476 |
|
case '?': /* Invalid option. */ |
477 |
|
/* `getopt_long' already printed an error message. */ |