21#define FIX_UNUSED(X) (void) (X)
27const char *gengetopt_args_info_purpose =
"Computes a variety of time correlation functions from the\nconfigurations stored in a dump file. Typical examples of time\ncorrelation functions are the mean square displacement and the\nvelocity autocorrelation functions. The selection syntax can be used\nto specify the StuntDoubles that will be used for the calculation. A\ngeneral time correlation function can be thought of as:\n\n C(t) = < A(0) * B(t) >\n\nwhere A(t) and B(t) are time-dependent properties, and the < >\nindicates an average over the initial time and atoms (if A and B are\nproperties of atoms).\n\nExample:\n DynamicProps -i longRun.dump --rcorr --sele1=\"select SPCE_RB_0\"";
29const char *gengetopt_args_info_usage =
"Usage: DynamicProps [OPTION]... [FILE]...";
31const char *gengetopt_args_info_versiontext =
"";
33const char *gengetopt_args_info_description =
"";
35const char *gengetopt_args_info_help[] = {
36 " -h, --help Print help and exit",
37 " -V, --version Print version and exit",
38 " -i, --input=filename input dump file (mandatory)",
39 " -o, --output=filename output file name",
40 " --sele1=selection script select first stuntdouble set",
41 " --sele2=selection script select second stuntdouble set (if sele2 is not\n set, use script from sele1)",
42 " --sele3=selection script select third stuntdouble set",
43 " --order=INT Lengendre Polynomial Order",
44 " -n, --nbins=INT Number of bins (default=`100')",
45 " -z, --nzbins=INT Number of Z bins (default=`100')",
46 " -c, --rcut=DOUBLE cutoff radius (angstroms)",
47 " --OOcut=DOUBLE Oxygen-Oxygen cutoff radius (angstroms)\n (default=`3.5')",
48 " --thetacut=DOUBLE HOO cutoff angle (degrees) (default=`30')",
49 " --OHcut=DOUBLE Oxygen-Hydrogen cutoff radius (angstroms)\n (default=`2.45')",
50 " --privilegedAxis=ENUM which axis is special for spatial analysis\n (default = z axis) (possible values=\"x\",\n \"y\", \"z\" default=`z')",
51 " --length=DOUBLE maximum length (default=`100')",
52 " --dipoleX=DOUBLE X-component of the dipole with respect to body\n frame (default=`0.0')",
53 " --dipoleY=DOUBLE Y-component of the dipole with respect to body\n frame (default=`0.0')",
54 " --dipoleZ=DOUBLE Z-component of the dipole with respect to body\n frame (default=`-1.0')",
55 "\n Group: correlation function\n an option of this group is required",
56 " -s, --selecorr selection correlation function",
57 " -r, --rcorr mean squared displacement",
58 " --rcorrZ mean squared displacement binned by Z",
59 " -v, --vcorr velocity correlation function",
60 " --vcorrZ velocity correlation function along z-axis",
61 " --vcorrR velocity correlation function projected\n radially",
62 " --vaOutProdcorr Velocity - Velocity auto outer product\n correlation function",
63 " --waOutProdcorr Angular Velocity - Angular Velocity auto outer\n product correlation function",
64 " --vwOutProdcorr Velocity - Angular Velocity outer product\n correlation function",
65 " --wvOutProdcorr Angular Velocity - Velocity outer product\n correlation function",
66 " -w, --wcorr charge velocity correlation function",
67 " -d, --dcorr dipole correlation function",
68 " -l, --lcorr Lengendre correlation function",
69 " --lcorrZ Lengendre correlation function binned by Z",
70 " --cohZ Lengendre correlation function for OH bond\n vectors binned by Z",
71 " -M, --sdcorr System dipole correlation function",
72 " --r_rcorr Radial msd",
73 " --thetacorr Angular msd",
74 " --drcorr Directional msd for particles with unit vectors",
75 " --stresscorr Stress tensor correlation function",
76 " -b, --bondcorr Bond extension correlation function",
77 " -f, --freqfluccorr Frequency Fluctuation correlation function",
78 " -j, --jumptime Hydrogen bond jump time correlation function",
79 " --jumptimeZ Hydrogen bond jump time correlation function\n binned by Z",
80 " --jumptimeR Hydrogen bond jump time correlation function\n binned by R around a third selection",
81 " --persistence Hydrogen bond persistence correlation function",
82 " --pjcorr Momentum - Angular Momentum cross correlation\n function",
83 " --ftcorr Force - Torque cross correlation function",
84 " --ckcorr Charge - Kinetic energy cross correlation\n function",
85 " --cscorr Charge - Orientation order parameter\n (Cos\theta) cross correlation function",
86 " --facorr Force - Force auto correlation function",
87 " --tfcorr Torque - Force Cross correlation function",
88 " --tacorr Torque auto correlation function",
89 " --disp Displacement correlation function",
90 " --dispZ Displacement correlation function binned by Z",
91 " --current Current density auto correlation function",
92 " --onsager Onsager coefficient correlation functions",
93 " --ddisp Collective Dipole displacement function\n (Helfand moment of Current Density)",
94 " --rotAngleDisp Displacement correlation function for rotation\n angles",
103} cmdline_parser_arg_type;
115cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error);
117const char *cmdline_parser_privilegedAxis_values[] = {
"x",
"y",
"z", 0};
120gengetopt_strdup (
const char *s);
189 FIX_UNUSED (args_info);
230 args_info->
help_help = gengetopt_args_info_help[0] ;
232 args_info->
input_help = gengetopt_args_info_help[2] ;
233 args_info->
output_help = gengetopt_args_info_help[3] ;
234 args_info->
sele1_help = gengetopt_args_info_help[4] ;
235 args_info->
sele2_help = gengetopt_args_info_help[5] ;
236 args_info->
sele3_help = gengetopt_args_info_help[6] ;
237 args_info->
order_help = gengetopt_args_info_help[7] ;
238 args_info->
nbins_help = gengetopt_args_info_help[8] ;
239 args_info->
nzbins_help = gengetopt_args_info_help[9] ;
240 args_info->
rcut_help = gengetopt_args_info_help[10] ;
241 args_info->
OOcut_help = gengetopt_args_info_help[11] ;
243 args_info->
OHcut_help = gengetopt_args_info_help[13] ;
245 args_info->
length_help = gengetopt_args_info_help[15] ;
246 args_info->
dipoleX_help = gengetopt_args_info_help[16] ;
247 args_info->
dipoleY_help = gengetopt_args_info_help[17] ;
248 args_info->
dipoleZ_help = gengetopt_args_info_help[18] ;
250 args_info->
rcorr_help = gengetopt_args_info_help[21] ;
251 args_info->
rcorrZ_help = gengetopt_args_info_help[22] ;
252 args_info->
vcorr_help = gengetopt_args_info_help[23] ;
253 args_info->
vcorrZ_help = gengetopt_args_info_help[24] ;
254 args_info->
vcorrR_help = gengetopt_args_info_help[25] ;
259 args_info->
wcorr_help = gengetopt_args_info_help[30] ;
260 args_info->
dcorr_help = gengetopt_args_info_help[31] ;
261 args_info->
lcorr_help = gengetopt_args_info_help[32] ;
262 args_info->
lcorrZ_help = gengetopt_args_info_help[33] ;
263 args_info->
cohZ_help = gengetopt_args_info_help[34] ;
264 args_info->
sdcorr_help = gengetopt_args_info_help[35] ;
265 args_info->
r_rcorr_help = gengetopt_args_info_help[36] ;
267 args_info->
drcorr_help = gengetopt_args_info_help[38] ;
275 args_info->
pjcorr_help = gengetopt_args_info_help[46] ;
276 args_info->
ftcorr_help = gengetopt_args_info_help[47] ;
277 args_info->
ckcorr_help = gengetopt_args_info_help[48] ;
278 args_info->
cscorr_help = gengetopt_args_info_help[49] ;
279 args_info->
facorr_help = gengetopt_args_info_help[50] ;
280 args_info->
tfcorr_help = gengetopt_args_info_help[51] ;
281 args_info->
tacorr_help = gengetopt_args_info_help[52] ;
282 args_info->
disp_help = gengetopt_args_info_help[53] ;
283 args_info->
dispZ_help = gengetopt_args_info_help[54] ;
284 args_info->
current_help = gengetopt_args_info_help[55] ;
285 args_info->
onsager_help = gengetopt_args_info_help[56] ;
286 args_info->
ddisp_help = gengetopt_args_info_help[57] ;
292cmdline_parser_print_version (
void)
298 if (strlen(gengetopt_args_info_versiontext) > 0)
299 printf(
"\n%s\n", gengetopt_args_info_versiontext);
302static void print_help_common(
void)
304 size_t len_purpose = strlen(gengetopt_args_info_purpose);
305 size_t len_usage = strlen(gengetopt_args_info_usage);
308 printf(
"%s\n", gengetopt_args_info_usage);
310 if (len_purpose > 0) {
311 printf(
"%s\n", gengetopt_args_info_purpose);
314 if (len_usage || len_purpose) {
318 if (strlen(gengetopt_args_info_description) > 0) {
319 printf(
"%s\n\n", gengetopt_args_info_description);
324cmdline_parser_print_help (
void)
328 while (gengetopt_args_info_help[i])
329 printf(
"%s\n", gengetopt_args_info_help[i++]);
335 clear_given (args_info);
336 clear_args (args_info);
337 init_args_info (args_info);
366free_string_field (
char **s)
380 free_string_field (&(args_info->
input_arg));
384 free_string_field (&(args_info->
sele1_arg));
386 free_string_field (&(args_info->
sele2_arg));
388 free_string_field (&(args_info->
sele3_arg));
393 free_string_field (&(args_info->
rcut_orig));
405 free (args_info->
inputs [i]);
410 clear_given (args_info);
421check_possible_values(
const char *val,
const char *values[])
431 for (i = 0, len = strlen(val); values[i]; ++i)
433 if (strncmp(val, values[i], len) == 0)
437 if (strlen(values[i]) == len)
445 return (found ? -2 : -1);
450write_into_file(FILE *outfile,
const char *opt,
const char *arg,
const char *values[])
455 found = check_possible_values(arg, values);
458 fprintf(outfile,
"%s=\"%s\" # %s\n", opt, arg, values[found]);
460 fprintf(outfile,
"%s=\"%s\"\n", opt, arg);
462 fprintf(outfile,
"%s\n", opt);
479 write_into_file(outfile,
"help", 0, 0 );
481 write_into_file(outfile,
"version", 0, 0 );
483 write_into_file(outfile,
"input", args_info->
input_orig, 0);
485 write_into_file(outfile,
"output", args_info->
output_orig, 0);
487 write_into_file(outfile,
"sele1", args_info->
sele1_orig, 0);
489 write_into_file(outfile,
"sele2", args_info->
sele2_orig, 0);
491 write_into_file(outfile,
"sele3", args_info->
sele3_orig, 0);
493 write_into_file(outfile,
"order", args_info->
order_orig, 0);
495 write_into_file(outfile,
"nbins", args_info->
nbins_orig, 0);
497 write_into_file(outfile,
"nzbins", args_info->
nzbins_orig, 0);
499 write_into_file(outfile,
"rcut", args_info->
rcut_orig, 0);
501 write_into_file(outfile,
"OOcut", args_info->
OOcut_orig, 0);
503 write_into_file(outfile,
"thetacut", args_info->
thetacut_orig, 0);
505 write_into_file(outfile,
"OHcut", args_info->
OHcut_orig, 0);
507 write_into_file(outfile,
"privilegedAxis", args_info->
privilegedAxis_orig, cmdline_parser_privilegedAxis_values);
509 write_into_file(outfile,
"length", args_info->
length_orig, 0);
511 write_into_file(outfile,
"dipoleX", args_info->
dipoleX_orig, 0);
513 write_into_file(outfile,
"dipoleY", args_info->
dipoleY_orig, 0);
515 write_into_file(outfile,
"dipoleZ", args_info->
dipoleZ_orig, 0);
517 write_into_file(outfile,
"selecorr", 0, 0 );
519 write_into_file(outfile,
"rcorr", 0, 0 );
521 write_into_file(outfile,
"rcorrZ", 0, 0 );
523 write_into_file(outfile,
"vcorr", 0, 0 );
525 write_into_file(outfile,
"vcorrZ", 0, 0 );
527 write_into_file(outfile,
"vcorrR", 0, 0 );
529 write_into_file(outfile,
"vaOutProdcorr", 0, 0 );
531 write_into_file(outfile,
"waOutProdcorr", 0, 0 );
533 write_into_file(outfile,
"vwOutProdcorr", 0, 0 );
535 write_into_file(outfile,
"wvOutProdcorr", 0, 0 );
537 write_into_file(outfile,
"wcorr", 0, 0 );
539 write_into_file(outfile,
"dcorr", 0, 0 );
541 write_into_file(outfile,
"lcorr", 0, 0 );
543 write_into_file(outfile,
"lcorrZ", 0, 0 );
545 write_into_file(outfile,
"cohZ", 0, 0 );
547 write_into_file(outfile,
"sdcorr", 0, 0 );
549 write_into_file(outfile,
"r_rcorr", 0, 0 );
551 write_into_file(outfile,
"thetacorr", 0, 0 );
553 write_into_file(outfile,
"drcorr", 0, 0 );
555 write_into_file(outfile,
"stresscorr", 0, 0 );
557 write_into_file(outfile,
"bondcorr", 0, 0 );
559 write_into_file(outfile,
"freqfluccorr", 0, 0 );
561 write_into_file(outfile,
"jumptime", 0, 0 );
563 write_into_file(outfile,
"jumptimeZ", 0, 0 );
565 write_into_file(outfile,
"jumptimeR", 0, 0 );
567 write_into_file(outfile,
"persistence", 0, 0 );
569 write_into_file(outfile,
"pjcorr", 0, 0 );
571 write_into_file(outfile,
"ftcorr", 0, 0 );
573 write_into_file(outfile,
"ckcorr", 0, 0 );
575 write_into_file(outfile,
"cscorr", 0, 0 );
577 write_into_file(outfile,
"facorr", 0, 0 );
579 write_into_file(outfile,
"tfcorr", 0, 0 );
581 write_into_file(outfile,
"tacorr", 0, 0 );
583 write_into_file(outfile,
"disp", 0, 0 );
585 write_into_file(outfile,
"dispZ", 0, 0 );
587 write_into_file(outfile,
"current", 0, 0 );
589 write_into_file(outfile,
"onsager", 0, 0 );
591 write_into_file(outfile,
"ddisp", 0, 0 );
593 write_into_file(outfile,
"rotAngleDisp", 0, 0 );
606 outfile = fopen(filename,
"w");
623 cmdline_parser_release (args_info);
628gengetopt_strdup (
const char *s)
634 result = (
char*)malloc(strlen(s) + 1);
635 if (result == (
char*)0)
701 result = cmdline_parser_internal (argc, argv, args_info, params, 0);
718 result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0);
726 int result = EXIT_SUCCESS;
728 if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
729 result = EXIT_FAILURE;
735cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error)
737 int error_occurred = 0;
738 FIX_UNUSED (additional_error);
743 fprintf (stderr,
"%s: '--input' ('-i') option required%s\n", prog_name, (additional_error ? additional_error :
""));
749 fprintf (stderr,
"%s: %d options of group correlation function were given. One is required%s.\n", prog_name, args_info->
correlation_function_group_counter, (additional_error ? additional_error :
""));
756 return error_occurred;
814#ifndef required_argument
815#define required_argument 1
818#ifndef optional_argument
819#define optional_argument 2
822struct custom_getopt_data {
864static char *custom_optarg;
881static int custom_optind = 1;
887static int custom_opterr = 1;
893static int custom_optopt =
'?';
903static void exchange(
char **argv,
struct custom_getopt_data *d)
905 int bottom = d->first_nonopt;
906 int middle = d->last_nonopt;
907 int top = d->custom_optind;
916 while (top > middle && middle > bottom) {
917 if (top - middle > middle - bottom) {
919 int len = middle - bottom;
923 for (i = 0; i < len; i++) {
924 tem = argv[bottom + i];
926 argv[top - (middle - bottom) + i];
927 argv[top - (middle - bottom) + i] = tem;
933 int len = top - middle;
937 for (i = 0; i < len; i++) {
938 tem = argv[bottom + i];
939 argv[bottom + i] = argv[middle + i];
940 argv[middle + i] = tem;
947 d->first_nonopt += (d->custom_optind - d->last_nonopt);
948 d->last_nonopt = d->custom_optind;
952static void custom_getopt_initialize(
struct custom_getopt_data *d)
959 d->first_nonopt = d->last_nonopt = d->custom_optind;
964#define NONOPTION_P (argv[d->custom_optind][0] != '-' || argv[d->custom_optind][1] == '\0')
967static int shuffle_argv(
int argc,
char *
const *argv,
const struct option *longopts,
968 struct custom_getopt_data *d)
974 if (d->last_nonopt > d->custom_optind)
975 d->last_nonopt = d->custom_optind;
976 if (d->first_nonopt > d->custom_optind)
977 d->first_nonopt = d->custom_optind;
982 if (d->first_nonopt != d->last_nonopt &&
983 d->last_nonopt != d->custom_optind)
984 exchange((
char **) argv, d);
985 else if (d->last_nonopt != d->custom_optind)
986 d->first_nonopt = d->custom_optind;
991 while (d->custom_optind < argc && NONOPTION_P)
993 d->last_nonopt = d->custom_optind;
999 if (d->custom_optind != argc && !strcmp(argv[d->custom_optind],
"--")) {
1001 if (d->first_nonopt != d->last_nonopt
1002 && d->last_nonopt != d->custom_optind)
1003 exchange((
char **) argv, d);
1004 else if (d->first_nonopt == d->last_nonopt)
1005 d->first_nonopt = d->custom_optind;
1006 d->last_nonopt = argc;
1007 d->custom_optind = argc;
1013 if (d->custom_optind == argc) {
1018 if (d->first_nonopt != d->last_nonopt)
1019 d->custom_optind = d->first_nonopt;
1027 d->custom_optarg = argv[d->custom_optind++];
1034 d->nextchar = (argv[d->custom_optind] + 1 + (longopts != NULL && argv[d->custom_optind][1] ==
'-'));
1048static int check_long_opt(
int argc,
char *
const *argv,
const char *optstring,
1049 const struct option *longopts,
int *longind,
1050 int print_errors,
struct custom_getopt_data *d)
1053 const struct option *p;
1054 const struct option *pfound = NULL;
1060 for (nameend = d->nextchar; *nameend && *nameend !=
'='; nameend++)
1064 for (p = longopts, option_index = 0; p->name; p++, option_index++)
1065 if (!strncmp(p->name, d->nextchar, nameend - d->nextchar)) {
1066 if ((
unsigned int) (nameend - d->nextchar)
1067 == (
unsigned int) strlen(p->name)) {
1070 indfound = option_index;
1073 }
else if (pfound == NULL) {
1076 indfound = option_index;
1077 }
else if (pfound->has_arg != p->has_arg
1078 || pfound->flag != p->flag
1079 || pfound->val != p->val)
1083 if (ambig && !exact) {
1086 "%s: option `%s' is ambiguous\n",
1087 argv[0], argv[d->custom_optind]);
1089 d->nextchar += strlen(d->nextchar);
1091 d->custom_optopt = 0;
1095 option_index = indfound;
1098 if (pfound->has_arg != no_argument)
1099 d->custom_optarg = nameend + 1;
1102 if (argv[d->custom_optind - 1][1] ==
'-') {
1104 fprintf(stderr,
"%s: option `--%s' doesn't allow an argument\n",
1105 argv[0], pfound->name);
1108 fprintf(stderr,
"%s: option `%c%s' doesn't allow an argument\n",
1109 argv[0], argv[d->custom_optind - 1][0], pfound->name);
1113 d->nextchar += strlen(d->nextchar);
1114 d->custom_optopt = pfound->val;
1117 }
else if (pfound->has_arg == required_argument) {
1118 if (d->custom_optind < argc)
1119 d->custom_optarg = argv[d->custom_optind++];
1123 "%s: option `%s' requires an argument\n",
1125 argv[d->custom_optind - 1]);
1127 d->nextchar += strlen(d->nextchar);
1128 d->custom_optopt = pfound->val;
1129 return optstring[0] ==
':' ?
':' :
'?';
1132 d->nextchar += strlen(d->nextchar);
1133 if (longind != NULL)
1134 *longind = option_index;
1136 *(pfound->flag) = pfound->val;
1147 if (argv[d->custom_optind][1] ==
'-') {
1150 "%s: unrecognized option `--%s'\n",
1151 argv[0], d->nextchar);
1155 "%s: unrecognized option `%c%s'\n",
1156 argv[0], argv[d->custom_optind][0],
1160 d->nextchar = (
char *)
"";
1162 d->custom_optopt = 0;
1166static int check_short_opt(
int argc,
char *
const *argv,
const char *optstring,
1167 int print_errors,
struct custom_getopt_data *d)
1169 char c = *d->nextchar++;
1170 const char *temp = strchr(optstring, c);
1173 if (*d->nextchar ==
'\0')
1175 if (!temp || c ==
':') {
1177 fprintf(stderr,
"%s: invalid option -- %c\n", argv[0], c);
1179 d->custom_optopt = c;
1182 if (temp[1] ==
':') {
1183 if (temp[2] ==
':') {
1185 if (*d->nextchar !=
'\0') {
1186 d->custom_optarg = d->nextchar;
1189 d->custom_optarg = NULL;
1193 if (*d->nextchar !=
'\0') {
1194 d->custom_optarg = d->nextchar;
1201 }
else if (d->custom_optind == argc) {
1204 "%s: option requires an argument -- %c\n",
1207 d->custom_optopt = c;
1208 if (optstring[0] ==
':')
1218 d->custom_optarg = argv[d->custom_optind++];
1295static int getopt_internal_r(
int argc,
char *
const *argv,
const char *optstring,
1296 const struct option *longopts,
int *longind,
1297 struct custom_getopt_data *d)
1299 int ret, print_errors = d->custom_opterr;
1301 if (optstring[0] ==
':')
1305 d->custom_optarg = NULL;
1311 if (d->custom_optind == 0 || !d->initialized) {
1312 if (d->custom_optind == 0)
1313 d->custom_optind = 1;
1314 custom_getopt_initialize(d);
1316 if (d->nextchar == NULL || *d->nextchar ==
'\0') {
1317 ret = shuffle_argv(argc, argv, longopts, d);
1321 if (longopts && (argv[d->custom_optind][1] ==
'-' ))
1322 return check_long_opt(argc, argv, optstring, longopts,
1323 longind, print_errors, d);
1324 return check_short_opt(argc, argv, optstring, print_errors, d);
1327static int custom_getopt_internal(
int argc,
char *
const *argv,
const char *optstring,
1328 const struct option *longopts,
int *longind)
1332 static struct custom_getopt_data d;
1334 d.custom_optind = custom_optind;
1335 d.custom_opterr = custom_opterr;
1336 result = getopt_internal_r(argc, argv, optstring, longopts,
1338 custom_optind = d.custom_optind;
1339 custom_optarg = d.custom_optarg;
1340 custom_optopt = d.custom_optopt;
1344static int custom_getopt_long (
int argc,
char *
const *argv,
const char *options,
1345 const struct option *long_options,
int *opt_index)
1347 return custom_getopt_internal(argc, argv, options, long_options,
1352static char *package_name = 0;
1373int update_arg(
void *field,
char **orig_field,
1374 unsigned int *field_given,
unsigned int *prev_given,
1375 char *value,
const char *possible_values[],
1376 const char *default_value,
1377 cmdline_parser_arg_type arg_type,
1378 int check_ambiguity,
int override,
1379 int no_free,
int multiple_option,
1380 const char *long_opt,
char short_opt,
1381 const char *additional_error)
1383 char *stop_char = 0;
1384 const char *val = value;
1386 char **string_field;
1392 if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
1394 if (short_opt !=
'-')
1395 fprintf (stderr,
"%s: `--%s' (`-%c') option given more than once%s\n",
1396 package_name, long_opt, short_opt,
1397 (additional_error ? additional_error :
""));
1399 fprintf (stderr,
"%s: `--%s' option given more than once%s\n",
1400 package_name, long_opt,
1401 (additional_error ? additional_error :
""));
1405 if (possible_values && (found = check_possible_values((value ? value : default_value), possible_values)) < 0)
1407 if (short_opt !=
'-')
1408 fprintf (stderr,
"%s: %s argument, \"%s\", for option `--%s' (`-%c')%s\n",
1409 package_name, (found == -2) ?
"ambiguous" :
"invalid", value, long_opt, short_opt,
1410 (additional_error ? additional_error :
""));
1412 fprintf (stderr,
"%s: %s argument, \"%s\", for option `--%s'%s\n",
1413 package_name, (found == -2) ?
"ambiguous" :
"invalid", value, long_opt,
1414 (additional_error ? additional_error :
""));
1418 if (field_given && *field_given && !
override)
1424 if (possible_values)
1425 val = possible_values[found];
1429 if (val) *((
int *)field) = strtol (val, &stop_char, 0);
1432 if (val) *((
double *)field) = strtod (val, &stop_char);
1435 if (val) *((
int *)field) = found;
1439 string_field = (
char **)field;
1440 if (!no_free && *string_field)
1441 free (*string_field);
1442 *string_field = gengetopt_strdup (val);
1453 if (val && !(stop_char && *stop_char ==
'\0')) {
1454 fprintf(stderr,
"%s: invalid numeric value: %s\n", package_name, val);
1467 if (value && orig_field) {
1469 *orig_field = value;
1473 *orig_field = gengetopt_strdup (value);
1483cmdline_parser_internal (
1489 int error_occurred = 0;
1495 int check_ambiguity;
1502 package_name = argv[0];
1506 FIX_UNUSED(
override);
1513 FIX_UNUSED(check_ambiguity);
1527 int option_index = 0;
1529 static struct option long_options[] = {
1530 {
"help", 0, NULL,
'h' },
1531 {
"version", 0, NULL,
'V' },
1532 {
"input", 1, NULL,
'i' },
1533 {
"output", 1, NULL,
'o' },
1534 {
"sele1", 1, NULL, 0 },
1535 {
"sele2", 1, NULL, 0 },
1536 {
"sele3", 1, NULL, 0 },
1537 {
"order", 1, NULL, 0 },
1538 {
"nbins", 1, NULL,
'n' },
1539 {
"nzbins", 1, NULL,
'z' },
1540 {
"rcut", 1, NULL,
'c' },
1541 {
"OOcut", 1, NULL, 0 },
1542 {
"thetacut", 1, NULL, 0 },
1543 {
"OHcut", 1, NULL, 0 },
1544 {
"privilegedAxis", 1, NULL, 0 },
1545 {
"length", 1, NULL, 0 },
1546 {
"dipoleX", 1, NULL, 0 },
1547 {
"dipoleY", 1, NULL, 0 },
1548 {
"dipoleZ", 1, NULL, 0 },
1549 {
"selecorr", 0, NULL,
's' },
1550 {
"rcorr", 0, NULL,
'r' },
1551 {
"rcorrZ", 0, NULL, 0 },
1552 {
"vcorr", 0, NULL,
'v' },
1553 {
"vcorrZ", 0, NULL, 0 },
1554 {
"vcorrR", 0, NULL, 0 },
1555 {
"vaOutProdcorr", 0, NULL, 0 },
1556 {
"waOutProdcorr", 0, NULL, 0 },
1557 {
"vwOutProdcorr", 0, NULL, 0 },
1558 {
"wvOutProdcorr", 0, NULL, 0 },
1559 {
"wcorr", 0, NULL,
'w' },
1560 {
"dcorr", 0, NULL,
'd' },
1561 {
"lcorr", 0, NULL,
'l' },
1562 {
"lcorrZ", 0, NULL, 0 },
1563 {
"cohZ", 0, NULL, 0 },
1564 {
"sdcorr", 0, NULL,
'M' },
1565 {
"r_rcorr", 0, NULL, 0 },
1566 {
"thetacorr", 0, NULL, 0 },
1567 {
"drcorr", 0, NULL, 0 },
1568 {
"stresscorr", 0, NULL, 0 },
1569 {
"bondcorr", 0, NULL,
'b' },
1570 {
"freqfluccorr", 0, NULL,
'f' },
1571 {
"jumptime", 0, NULL,
'j' },
1572 {
"jumptimeZ", 0, NULL, 0 },
1573 {
"jumptimeR", 0, NULL, 0 },
1574 {
"persistence", 0, NULL, 0 },
1575 {
"pjcorr", 0, NULL, 0 },
1576 {
"ftcorr", 0, NULL, 0 },
1577 {
"ckcorr", 0, NULL, 0 },
1578 {
"cscorr", 0, NULL, 0 },
1579 {
"facorr", 0, NULL, 0 },
1580 {
"tfcorr", 0, NULL, 0 },
1581 {
"tacorr", 0, NULL, 0 },
1582 {
"disp", 0, NULL, 0 },
1583 {
"dispZ", 0, NULL, 0 },
1584 {
"current", 0, NULL, 0 },
1585 {
"onsager", 0, NULL, 0 },
1586 {
"ddisp", 0, NULL, 0 },
1587 {
"rotAngleDisp", 0, NULL, 0 },
1591 custom_optarg = optarg;
1592 custom_optind = optind;
1593 custom_opterr = opterr;
1594 custom_optopt = optopt;
1596 c = custom_getopt_long (argc, argv,
"hVi:o:n:z:c:srvwdlMbfj", long_options, &option_index);
1598 optarg = custom_optarg;
1599 optind = custom_optind;
1600 opterr = custom_opterr;
1601 optopt = custom_optopt;
1608 cmdline_parser_print_help ();
1609 cmdline_parser_free (&local_args_info);
1610 exit (EXIT_SUCCESS);
1613 cmdline_parser_print_version ();
1614 cmdline_parser_free (&local_args_info);
1615 exit (EXIT_SUCCESS);
1620 if (update_arg( (
void *)&(args_info->
input_arg),
1622 &(local_args_info.input_given), optarg, 0, 0, ARG_STRING,
1623 check_ambiguity,
override, 0, 0,
1632 if (update_arg( (
void *)&(args_info->
output_arg),
1634 &(local_args_info.output_given), optarg, 0, 0, ARG_STRING,
1635 check_ambiguity,
override, 0, 0,
1644 if (update_arg( (
void *)&(args_info->
nbins_arg),
1646 &(local_args_info.nbins_given), optarg, 0,
"100", ARG_INT,
1647 check_ambiguity,
override, 0, 0,
1656 if (update_arg( (
void *)&(args_info->
nzbins_arg),
1658 &(local_args_info.nzbins_given), optarg, 0,
"100", ARG_INT,
1659 check_ambiguity,
override, 0, 0,
1668 if (update_arg( (
void *)&(args_info->
rcut_arg),
1670 &(local_args_info.rcut_given), optarg, 0, 0, ARG_DOUBLE,
1671 check_ambiguity,
override, 0, 0,
1680 reset_group_correlation_function (args_info);
1685 &(local_args_info.selecorr_given), optarg, 0, 0, ARG_NO,
1686 check_ambiguity,
override, 0, 0,
1695 reset_group_correlation_function (args_info);
1700 &(local_args_info.rcorr_given), optarg, 0, 0, ARG_NO,
1701 check_ambiguity,
override, 0, 0,
1710 reset_group_correlation_function (args_info);
1715 &(local_args_info.vcorr_given), optarg, 0, 0, ARG_NO,
1716 check_ambiguity,
override, 0, 0,
1725 reset_group_correlation_function (args_info);
1730 &(local_args_info.wcorr_given), optarg, 0, 0, ARG_NO,
1731 check_ambiguity,
override, 0, 0,
1740 reset_group_correlation_function (args_info);
1745 &(local_args_info.dcorr_given), optarg, 0, 0, ARG_NO,
1746 check_ambiguity,
override, 0, 0,
1755 reset_group_correlation_function (args_info);
1760 &(local_args_info.lcorr_given), optarg, 0, 0, ARG_NO,
1761 check_ambiguity,
override, 0, 0,
1770 reset_group_correlation_function (args_info);
1775 &(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO,
1776 check_ambiguity,
override, 0, 0,
1785 reset_group_correlation_function (args_info);
1790 &(local_args_info.bondcorr_given), optarg, 0, 0, ARG_NO,
1791 check_ambiguity,
override, 0, 0,
1800 reset_group_correlation_function (args_info);
1805 &(local_args_info.freqfluccorr_given), optarg, 0, 0, ARG_NO,
1806 check_ambiguity,
override, 0, 0,
1807 "freqfluccorr",
'f',
1815 reset_group_correlation_function (args_info);
1820 &(local_args_info.jumptime_given), optarg, 0, 0, ARG_NO,
1821 check_ambiguity,
override, 0, 0,
1830 if (strcmp (long_options[option_index].name,
"sele1") == 0)
1834 if (update_arg( (
void *)&(args_info->
sele1_arg),
1836 &(local_args_info.sele1_given), optarg, 0, 0, ARG_STRING,
1837 check_ambiguity,
override, 0, 0,
1844 else if (strcmp (long_options[option_index].name,
"sele2") == 0)
1848 if (update_arg( (
void *)&(args_info->
sele2_arg),
1850 &(local_args_info.sele2_given), optarg, 0, 0, ARG_STRING,
1851 check_ambiguity,
override, 0, 0,
1858 else if (strcmp (long_options[option_index].name,
"sele3") == 0)
1862 if (update_arg( (
void *)&(args_info->
sele3_arg),
1864 &(local_args_info.sele3_given), optarg, 0, 0, ARG_STRING,
1865 check_ambiguity,
override, 0, 0,
1872 else if (strcmp (long_options[option_index].name,
"order") == 0)
1876 if (update_arg( (
void *)&(args_info->
order_arg),
1878 &(local_args_info.order_given), optarg, 0, 0, ARG_INT,
1879 check_ambiguity,
override, 0, 0,
1886 else if (strcmp (long_options[option_index].name,
"OOcut") == 0)
1890 if (update_arg( (
void *)&(args_info->
OOcut_arg),
1892 &(local_args_info.OOcut_given), optarg, 0,
"3.5", ARG_DOUBLE,
1893 check_ambiguity,
override, 0, 0,
1900 else if (strcmp (long_options[option_index].name,
"thetacut") == 0)
1906 &(local_args_info.thetacut_given), optarg, 0,
"30", ARG_DOUBLE,
1907 check_ambiguity,
override, 0, 0,
1914 else if (strcmp (long_options[option_index].name,
"OHcut") == 0)
1918 if (update_arg( (
void *)&(args_info->
OHcut_arg),
1920 &(local_args_info.OHcut_given), optarg, 0,
"2.45", ARG_DOUBLE,
1921 check_ambiguity,
override, 0, 0,
1928 else if (strcmp (long_options[option_index].name,
"privilegedAxis") == 0)
1934 &(local_args_info.privilegedAxis_given), optarg, cmdline_parser_privilegedAxis_values,
"z", ARG_ENUM,
1935 check_ambiguity,
override, 0, 0,
1936 "privilegedAxis",
'-',
1942 else if (strcmp (long_options[option_index].name,
"length") == 0)
1946 if (update_arg( (
void *)&(args_info->
length_arg),
1948 &(local_args_info.length_given), optarg, 0,
"100", ARG_DOUBLE,
1949 check_ambiguity,
override, 0, 0,
1956 else if (strcmp (long_options[option_index].name,
"dipoleX") == 0)
1960 if (update_arg( (
void *)&(args_info->
dipoleX_arg),
1962 &(local_args_info.dipoleX_given), optarg, 0,
"0.0", ARG_DOUBLE,
1963 check_ambiguity,
override, 0, 0,
1970 else if (strcmp (long_options[option_index].name,
"dipoleY") == 0)
1974 if (update_arg( (
void *)&(args_info->
dipoleY_arg),
1976 &(local_args_info.dipoleY_given), optarg, 0,
"0.0", ARG_DOUBLE,
1977 check_ambiguity,
override, 0, 0,
1984 else if (strcmp (long_options[option_index].name,
"dipoleZ") == 0)
1988 if (update_arg( (
void *)&(args_info->
dipoleZ_arg),
1990 &(local_args_info.dipoleZ_given), optarg, 0,
"-1.0", ARG_DOUBLE,
1991 check_ambiguity,
override, 0, 0,
1998 else if (strcmp (long_options[option_index].name,
"rcorrZ") == 0)
2002 reset_group_correlation_function (args_info);
2007 &(local_args_info.rcorrZ_given), optarg, 0, 0, ARG_NO,
2008 check_ambiguity,
override, 0, 0,
2015 else if (strcmp (long_options[option_index].name,
"vcorrZ") == 0)
2019 reset_group_correlation_function (args_info);
2024 &(local_args_info.vcorrZ_given), optarg, 0, 0, ARG_NO,
2025 check_ambiguity,
override, 0, 0,
2032 else if (strcmp (long_options[option_index].name,
"vcorrR") == 0)
2036 reset_group_correlation_function (args_info);
2041 &(local_args_info.vcorrR_given), optarg, 0, 0, ARG_NO,
2042 check_ambiguity,
override, 0, 0,
2049 else if (strcmp (long_options[option_index].name,
"vaOutProdcorr") == 0)
2053 reset_group_correlation_function (args_info);
2058 &(local_args_info.vaOutProdcorr_given), optarg, 0, 0, ARG_NO,
2059 check_ambiguity,
override, 0, 0,
2060 "vaOutProdcorr",
'-',
2066 else if (strcmp (long_options[option_index].name,
"waOutProdcorr") == 0)
2070 reset_group_correlation_function (args_info);
2075 &(local_args_info.waOutProdcorr_given), optarg, 0, 0, ARG_NO,
2076 check_ambiguity,
override, 0, 0,
2077 "waOutProdcorr",
'-',
2083 else if (strcmp (long_options[option_index].name,
"vwOutProdcorr") == 0)
2087 reset_group_correlation_function (args_info);
2092 &(local_args_info.vwOutProdcorr_given), optarg, 0, 0, ARG_NO,
2093 check_ambiguity,
override, 0, 0,
2094 "vwOutProdcorr",
'-',
2100 else if (strcmp (long_options[option_index].name,
"wvOutProdcorr") == 0)
2104 reset_group_correlation_function (args_info);
2109 &(local_args_info.wvOutProdcorr_given), optarg, 0, 0, ARG_NO,
2110 check_ambiguity,
override, 0, 0,
2111 "wvOutProdcorr",
'-',
2117 else if (strcmp (long_options[option_index].name,
"lcorrZ") == 0)
2121 reset_group_correlation_function (args_info);
2126 &(local_args_info.lcorrZ_given), optarg, 0, 0, ARG_NO,
2127 check_ambiguity,
override, 0, 0,
2134 else if (strcmp (long_options[option_index].name,
"cohZ") == 0)
2138 reset_group_correlation_function (args_info);
2143 &(local_args_info.cohZ_given), optarg, 0, 0, ARG_NO,
2144 check_ambiguity,
override, 0, 0,
2151 else if (strcmp (long_options[option_index].name,
"r_rcorr") == 0)
2155 reset_group_correlation_function (args_info);
2160 &(local_args_info.r_rcorr_given), optarg, 0, 0, ARG_NO,
2161 check_ambiguity,
override, 0, 0,
2168 else if (strcmp (long_options[option_index].name,
"thetacorr") == 0)
2172 reset_group_correlation_function (args_info);
2177 &(local_args_info.thetacorr_given), optarg, 0, 0, ARG_NO,
2178 check_ambiguity,
override, 0, 0,
2185 else if (strcmp (long_options[option_index].name,
"drcorr") == 0)
2189 reset_group_correlation_function (args_info);
2194 &(local_args_info.drcorr_given), optarg, 0, 0, ARG_NO,
2195 check_ambiguity,
override, 0, 0,
2202 else if (strcmp (long_options[option_index].name,
"stresscorr") == 0)
2206 reset_group_correlation_function (args_info);
2211 &(local_args_info.stresscorr_given), optarg, 0, 0, ARG_NO,
2212 check_ambiguity,
override, 0, 0,
2219 else if (strcmp (long_options[option_index].name,
"jumptimeZ") == 0)
2223 reset_group_correlation_function (args_info);
2228 &(local_args_info.jumptimeZ_given), optarg, 0, 0, ARG_NO,
2229 check_ambiguity,
override, 0, 0,
2236 else if (strcmp (long_options[option_index].name,
"jumptimeR") == 0)
2240 reset_group_correlation_function (args_info);
2245 &(local_args_info.jumptimeR_given), optarg, 0, 0, ARG_NO,
2246 check_ambiguity,
override, 0, 0,
2253 else if (strcmp (long_options[option_index].name,
"persistence") == 0)
2257 reset_group_correlation_function (args_info);
2262 &(local_args_info.persistence_given), optarg, 0, 0, ARG_NO,
2263 check_ambiguity,
override, 0, 0,
2270 else if (strcmp (long_options[option_index].name,
"pjcorr") == 0)
2274 reset_group_correlation_function (args_info);
2279 &(local_args_info.pjcorr_given), optarg, 0, 0, ARG_NO,
2280 check_ambiguity,
override, 0, 0,
2287 else if (strcmp (long_options[option_index].name,
"ftcorr") == 0)
2291 reset_group_correlation_function (args_info);
2296 &(local_args_info.ftcorr_given), optarg, 0, 0, ARG_NO,
2297 check_ambiguity,
override, 0, 0,
2304 else if (strcmp (long_options[option_index].name,
"ckcorr") == 0)
2308 reset_group_correlation_function (args_info);
2313 &(local_args_info.ckcorr_given), optarg, 0, 0, ARG_NO,
2314 check_ambiguity,
override, 0, 0,
2321 else if (strcmp (long_options[option_index].name,
"cscorr") == 0)
2325 reset_group_correlation_function (args_info);
2330 &(local_args_info.cscorr_given), optarg, 0, 0, ARG_NO,
2331 check_ambiguity,
override, 0, 0,
2338 else if (strcmp (long_options[option_index].name,
"facorr") == 0)
2342 reset_group_correlation_function (args_info);
2347 &(local_args_info.facorr_given), optarg, 0, 0, ARG_NO,
2348 check_ambiguity,
override, 0, 0,
2355 else if (strcmp (long_options[option_index].name,
"tfcorr") == 0)
2359 reset_group_correlation_function (args_info);
2364 &(local_args_info.tfcorr_given), optarg, 0, 0, ARG_NO,
2365 check_ambiguity,
override, 0, 0,
2372 else if (strcmp (long_options[option_index].name,
"tacorr") == 0)
2376 reset_group_correlation_function (args_info);
2381 &(local_args_info.tacorr_given), optarg, 0, 0, ARG_NO,
2382 check_ambiguity,
override, 0, 0,
2389 else if (strcmp (long_options[option_index].name,
"disp") == 0)
2393 reset_group_correlation_function (args_info);
2398 &(local_args_info.disp_given), optarg, 0, 0, ARG_NO,
2399 check_ambiguity,
override, 0, 0,
2406 else if (strcmp (long_options[option_index].name,
"dispZ") == 0)
2410 reset_group_correlation_function (args_info);
2415 &(local_args_info.dispZ_given), optarg, 0, 0, ARG_NO,
2416 check_ambiguity,
override, 0, 0,
2423 else if (strcmp (long_options[option_index].name,
"current") == 0)
2427 reset_group_correlation_function (args_info);
2432 &(local_args_info.current_given), optarg, 0, 0, ARG_NO,
2433 check_ambiguity,
override, 0, 0,
2440 else if (strcmp (long_options[option_index].name,
"onsager") == 0)
2444 reset_group_correlation_function (args_info);
2449 &(local_args_info.onsager_given), optarg, 0, 0, ARG_NO,
2450 check_ambiguity,
override, 0, 0,
2457 else if (strcmp (long_options[option_index].name,
"ddisp") == 0)
2461 reset_group_correlation_function (args_info);
2466 &(local_args_info.ddisp_given), optarg, 0, 0, ARG_NO,
2467 check_ambiguity,
override, 0, 0,
2474 else if (strcmp (long_options[option_index].name,
"rotAngleDisp") == 0)
2478 reset_group_correlation_function (args_info);
2483 &(local_args_info.rotAngleDisp_given), optarg, 0, 0, ARG_NO,
2484 check_ambiguity,
override, 0, 0,
2485 "rotAngleDisp",
'-',
2497 fprintf (stderr,
"%s: option unknown: %c%s\n",
CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error :
""));
2504 fprintf (stderr,
"%s: %d options of group correlation function were given. One is required%s.\n", argv[0], args_info->
correlation_function_group_counter, (additional_error ? additional_error :
""));
2512 error_occurred += cmdline_parser_required2 (args_info, argv[0], additional_error);
2515 cmdline_parser_release (&local_args_info);
2517 if ( error_occurred )
2518 return (EXIT_FAILURE);
2523 int found_prog_name = 0;
2529 args_info->
inputs_num = argc - optind - found_prog_name;
2531 (
char **)(malloc ((args_info->
inputs_num)*
sizeof(
char *))) ;
2532 while (optind < argc)
2533 args_info->
inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;
2540 cmdline_parser_release (&local_args_info);
2541 return (EXIT_FAILURE);
#define CMDLINE_PARSER_VERSION
the program version
#define CMDLINE_PARSER_PACKAGE_NAME
the complete program name (used for help and version)
#define CMDLINE_PARSER_PACKAGE
the program name (used for printing errors)
The header file for the command line option parser generated by GNU Gengetopt version 2....
The additional parameters to pass to parser functions.
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
int check_required
whether to check that all required options were provided (default 1)
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
int override
whether to override possibly already present options (default 0)
Where the command line options are stored.
unsigned int jumptimeZ_given
Whether jumptimeZ was given.
const char * jumptimeZ_help
Hydrogen bond jump time correlation function binned by Z help description.
char * sele2_arg
select second stuntdouble set (if sele2 is not set, use script from sele1).
const char * vwOutProdcorr_help
Velocity - Angular Velocity outer product correlation function help description.
unsigned int persistence_given
Whether persistence was given.
char * nbins_orig
Number of bins original value given at command line.
char * dipoleX_orig
X-component of the dipole with respect to body frame original value given at command line.
unsigned int freqfluccorr_given
Whether freqfluccorr was given.
unsigned int r_rcorr_given
Whether r_rcorr was given.
unsigned int output_given
Whether output was given.
const char * ckcorr_help
Charge - Kinetic energy cross correlation function help description.
unsigned int vcorrZ_given
Whether vcorrZ was given.
const char * ftcorr_help
Force - Torque cross correlation function help description.
unsigned int privilegedAxis_given
Whether privilegedAxis was given.
unsigned int drcorr_given
Whether drcorr was given.
unsigned int selecorr_given
Whether selecorr was given.
unsigned int OHcut_given
Whether OHcut was given.
const char * rcut_help
cutoff radius (angstroms) help description.
unsigned int thetacut_given
Whether thetacut was given.
const char * lcorr_help
Lengendre correlation function help description.
const char * dcorr_help
dipole correlation function help description.
unsigned int dcorr_given
Whether dcorr was given.
char * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
const char * nbins_help
Number of bins help description.
const char * dipoleZ_help
Z-component of the dipole with respect to body frame help description.
unsigned int onsager_given
Whether onsager was given.
unsigned int current_given
Whether current was given.
unsigned int sele3_given
Whether sele3 was given.
double dipoleZ_arg
Z-component of the dipole with respect to body frame (default='-1.0').
unsigned int lcorrZ_given
Whether lcorrZ was given.
const char * sele1_help
select first stuntdouble set help description.
unsigned int disp_given
Whether disp was given.
unsigned int order_given
Whether order was given.
const char * jumptime_help
Hydrogen bond jump time correlation function help description.
const char * waOutProdcorr_help
Angular Velocity - Angular Velocity auto outer product correlation function help description.
char * dipoleY_orig
Y-component of the dipole with respect to body frame original value given at command line.
const char * tfcorr_help
Torque - Force Cross correlation function help description.
const char * persistence_help
Hydrogen bond persistence correlation function help description.
char * sele3_orig
select third stuntdouble set original value given at command line.
unsigned int tacorr_given
Whether tacorr was given.
const char * OHcut_help
Oxygen-Hydrogen cutoff radius (angstroms) help description.
const char * sele2_help
select second stuntdouble set (if sele2 is not set, use script from sele1) help description.
unsigned inputs_num
unamed options number
char * privilegedAxis_orig
which axis is special for spatial analysis (default = z axis) original value given at command line.
unsigned int OOcut_given
Whether OOcut was given.
int order_arg
Lengendre Polynomial Order.
const char * selecorr_help
selection correlation function help description.
double dipoleY_arg
Y-component of the dipole with respect to body frame (default='0.0').
unsigned int vcorr_given
Whether vcorr was given.
unsigned int tfcorr_given
Whether tfcorr was given.
const char * rotAngleDisp_help
Displacement correlation function for rotation angles help description.
unsigned int wcorr_given
Whether wcorr was given.
unsigned int pjcorr_given
Whether pjcorr was given.
const char * thetacut_help
HOO cutoff angle (degrees) help description.
char * order_orig
Lengendre Polynomial Order original value given at command line.
const char * wcorr_help
charge velocity correlation function help description.
unsigned int lcorr_given
Whether lcorr was given.
char * OOcut_orig
Oxygen-Oxygen cutoff radius (angstroms) original value given at command line.
const char * stresscorr_help
Stress tensor correlation function help description.
double length_arg
maximum length (default='100').
unsigned int facorr_given
Whether facorr was given.
unsigned int bondcorr_given
Whether bondcorr was given.
const char * help_help
Print help and exit help description.
char * sele3_arg
select third stuntdouble set.
const char * cscorr_help
Charge - Orientation order parameter (Cos\theta) cross correlation function help description.
const char * rcorrZ_help
mean squared displacement binned by Z help description.
unsigned int dipoleX_given
Whether dipoleX was given.
char * output_arg
output file name.
char ** inputs
unamed options (options without names)
const char * thetacorr_help
Angular msd help description.
unsigned int cscorr_given
Whether cscorr was given.
unsigned int jumptimeR_given
Whether jumptimeR was given.
unsigned int rcorr_given
Whether rcorr was given.
char * input_arg
input dump file.
double thetacut_arg
HOO cutoff angle (degrees) (default='30').
unsigned int dipoleZ_given
Whether dipoleZ was given.
unsigned int vwOutProdcorr_given
Whether vwOutProdcorr was given.
char * thetacut_orig
HOO cutoff angle (degrees) original value given at command line.
unsigned int sele1_given
Whether sele1 was given.
unsigned int length_given
Whether length was given.
const char * order_help
Lengendre Polynomial Order help description.
const char * wvOutProdcorr_help
Angular Velocity - Velocity outer product correlation function help description.
const char * vcorrR_help
velocity correlation function projected radially help description.
unsigned int ddisp_given
Whether ddisp was given.
double rcut_arg
cutoff radius (angstroms).
unsigned int jumptime_given
Whether jumptime was given.
char * nzbins_orig
Number of Z bins original value given at command line.
unsigned int ftcorr_given
Whether ftcorr was given.
unsigned int wvOutProdcorr_given
Whether wvOutProdcorr was given.
unsigned int stresscorr_given
Whether stresscorr was given.
unsigned int vaOutProdcorr_given
Whether vaOutProdcorr was given.
const char * rcorr_help
mean squared displacement help description.
const char * privilegedAxis_help
which axis is special for spatial analysis (default = z axis) help description.
char * sele2_orig
select second stuntdouble set (if sele2 is not set, use script from sele1) original value given at co...
const char * current_help
Current density auto correlation function help description.
const char * vaOutProdcorr_help
Velocity - Velocity auto outer product correlation function help description.
unsigned int dispZ_given
Whether dispZ was given.
const char * freqfluccorr_help
Frequency Fluctuation correlation function help description.
const char * bondcorr_help
Bond extension correlation function help description.
const char * facorr_help
Force - Force auto correlation function help description.
const char * r_rcorr_help
Radial msd help description.
char * sele1_orig
select first stuntdouble set original value given at command line.
unsigned int rotAngleDisp_given
Whether rotAngleDisp was given.
unsigned int cohZ_given
Whether cohZ was given.
double OHcut_arg
Oxygen-Hydrogen cutoff radius (angstroms) (default='2.45').
char * length_orig
maximum length original value given at command line.
char * sele1_arg
select first stuntdouble set.
unsigned int ckcorr_given
Whether ckcorr was given.
const char * pjcorr_help
Momentum - Angular Momentum cross correlation function help description.
unsigned int dipoleY_given
Whether dipoleY was given.
const char * nzbins_help
Number of Z bins help description.
const char * drcorr_help
Directional msd for particles with unit vectors help description.
double dipoleX_arg
X-component of the dipole with respect to body frame (default='0.0').
unsigned int rcut_given
Whether rcut was given.
const char * ddisp_help
Collective Dipole displacement function (Helfand moment of Current Density) help description.
const char * tacorr_help
Torque auto correlation function help description.
int correlation_function_group_counter
Counter for group correlation_function.
char * OHcut_orig
Oxygen-Hydrogen cutoff radius (angstroms) original value given at command line.
unsigned int help_given
Whether help was given.
const char * sele3_help
select third stuntdouble set help description.
const char * vcorrZ_help
velocity correlation function along z-axis help description.
const char * vcorr_help
velocity correlation function help description.
unsigned int input_given
Whether input was given.
unsigned int rcorrZ_given
Whether rcorrZ was given.
int nbins_arg
Number of bins (default='100').
const char * onsager_help
Onsager coefficient correlation functions help description.
unsigned int sdcorr_given
Whether sdcorr was given.
enum enum_privilegedAxis privilegedAxis_arg
which axis is special for spatial analysis (default = z axis) (default='z').
unsigned int version_given
Whether version was given.
char * dipoleZ_orig
Z-component of the dipole with respect to body frame original value given at command line.
unsigned int thetacorr_given
Whether thetacorr was given.
const char * jumptimeR_help
Hydrogen bond jump time correlation function binned by R around a third selection help description.
const char * length_help
maximum length help description.
const char * dispZ_help
Displacement correlation function binned by Z help description.
const char * dipoleX_help
X-component of the dipole with respect to body frame help description.
unsigned int sele2_given
Whether sele2 was given.
const char * sdcorr_help
System dipole correlation function help description.
const char * version_help
Print version and exit help description.
char * input_orig
input dump file original value given at command line.
const char * disp_help
Displacement correlation function help description.
unsigned int nbins_given
Whether nbins was given.
unsigned int vcorrR_given
Whether vcorrR was given.
const char * lcorrZ_help
Lengendre correlation function binned by Z help description.
const char * cohZ_help
Lengendre correlation function for OH bond vectors binned by Z help description.
const char * OOcut_help
Oxygen-Oxygen cutoff radius (angstroms) help description.
unsigned int nzbins_given
Whether nzbins was given.
double OOcut_arg
Oxygen-Oxygen cutoff radius (angstroms) (default='3.5').
unsigned int waOutProdcorr_given
Whether waOutProdcorr was given.
char * rcut_orig
cutoff radius (angstroms) original value given at command line.
const char * input_help
input dump file help description.
int nzbins_arg
Number of Z bins (default='100').
const char * dipoleY_help
Y-component of the dipole with respect to body frame help description.
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Save the contents of the option struct into an already open FILE stream.
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
The command line parser.
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
Save the contents of the option struct into a (text) file.
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
The command line parser (version with additional parameters - deprecated)
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Checks that all the required options were specified.
struct cmdline_parser_params * cmdline_parser_params_create(void)
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their defau...
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
The command line parser (version with additional parameters)
void cmdline_parser_init(struct gengetopt_args_info *args_info)
Initializes the passed gengetopt_args_info structure's fields (also set default values for options th...
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the struc...
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Initializes all the fields a cmdline_parser_params structure to their default values.