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",
95 " --meandisp mean displacement",
104} cmdline_parser_arg_type;
116cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error);
118const char *cmdline_parser_privilegedAxis_values[] = {
"x",
"y",
"z", 0};
121gengetopt_strdup (
const char *s);
191 FIX_UNUSED (args_info);
232 args_info->
help_help = gengetopt_args_info_help[0] ;
234 args_info->
input_help = gengetopt_args_info_help[2] ;
235 args_info->
output_help = gengetopt_args_info_help[3] ;
236 args_info->
sele1_help = gengetopt_args_info_help[4] ;
237 args_info->
sele2_help = gengetopt_args_info_help[5] ;
238 args_info->
sele3_help = gengetopt_args_info_help[6] ;
239 args_info->
order_help = gengetopt_args_info_help[7] ;
240 args_info->
nbins_help = gengetopt_args_info_help[8] ;
241 args_info->
nzbins_help = gengetopt_args_info_help[9] ;
242 args_info->
rcut_help = gengetopt_args_info_help[10] ;
243 args_info->
OOcut_help = gengetopt_args_info_help[11] ;
245 args_info->
OHcut_help = gengetopt_args_info_help[13] ;
247 args_info->
length_help = gengetopt_args_info_help[15] ;
248 args_info->
dipoleX_help = gengetopt_args_info_help[16] ;
249 args_info->
dipoleY_help = gengetopt_args_info_help[17] ;
250 args_info->
dipoleZ_help = gengetopt_args_info_help[18] ;
252 args_info->
rcorr_help = gengetopt_args_info_help[21] ;
253 args_info->
rcorrZ_help = gengetopt_args_info_help[22] ;
254 args_info->
vcorr_help = gengetopt_args_info_help[23] ;
255 args_info->
vcorrZ_help = gengetopt_args_info_help[24] ;
256 args_info->
vcorrR_help = gengetopt_args_info_help[25] ;
261 args_info->
wcorr_help = gengetopt_args_info_help[30] ;
262 args_info->
dcorr_help = gengetopt_args_info_help[31] ;
263 args_info->
lcorr_help = gengetopt_args_info_help[32] ;
264 args_info->
lcorrZ_help = gengetopt_args_info_help[33] ;
265 args_info->
cohZ_help = gengetopt_args_info_help[34] ;
266 args_info->
sdcorr_help = gengetopt_args_info_help[35] ;
267 args_info->
r_rcorr_help = gengetopt_args_info_help[36] ;
269 args_info->
drcorr_help = gengetopt_args_info_help[38] ;
277 args_info->
pjcorr_help = gengetopt_args_info_help[46] ;
278 args_info->
ftcorr_help = gengetopt_args_info_help[47] ;
279 args_info->
ckcorr_help = gengetopt_args_info_help[48] ;
280 args_info->
cscorr_help = gengetopt_args_info_help[49] ;
281 args_info->
facorr_help = gengetopt_args_info_help[50] ;
282 args_info->
tfcorr_help = gengetopt_args_info_help[51] ;
283 args_info->
tacorr_help = gengetopt_args_info_help[52] ;
284 args_info->
disp_help = gengetopt_args_info_help[53] ;
285 args_info->
dispZ_help = gengetopt_args_info_help[54] ;
286 args_info->
current_help = gengetopt_args_info_help[55] ;
287 args_info->
onsager_help = gengetopt_args_info_help[56] ;
288 args_info->
ddisp_help = gengetopt_args_info_help[57] ;
295cmdline_parser_print_version (
void)
301 if (strlen(gengetopt_args_info_versiontext) > 0)
302 printf(
"\n%s\n", gengetopt_args_info_versiontext);
305static void print_help_common(
void)
307 size_t len_purpose = strlen(gengetopt_args_info_purpose);
308 size_t len_usage = strlen(gengetopt_args_info_usage);
311 printf(
"%s\n", gengetopt_args_info_usage);
313 if (len_purpose > 0) {
314 printf(
"%s\n", gengetopt_args_info_purpose);
317 if (len_usage || len_purpose) {
321 if (strlen(gengetopt_args_info_description) > 0) {
322 printf(
"%s\n\n", gengetopt_args_info_description);
327cmdline_parser_print_help (
void)
331 while (gengetopt_args_info_help[i])
332 printf(
"%s\n", gengetopt_args_info_help[i++]);
338 clear_given (args_info);
339 clear_args (args_info);
340 init_args_info (args_info);
369free_string_field (
char **s)
383 free_string_field (&(args_info->
input_arg));
387 free_string_field (&(args_info->
sele1_arg));
389 free_string_field (&(args_info->
sele2_arg));
391 free_string_field (&(args_info->
sele3_arg));
396 free_string_field (&(args_info->
rcut_orig));
408 free (args_info->
inputs [i]);
413 clear_given (args_info);
424check_possible_values(
const char *val,
const char *values[])
434 for (i = 0, len = strlen(val); values[i]; ++i)
436 if (strncmp(val, values[i], len) == 0)
440 if (strlen(values[i]) == len)
448 return (found ? -2 : -1);
453write_into_file(FILE *outfile,
const char *opt,
const char *arg,
const char *values[])
458 found = check_possible_values(arg, values);
461 fprintf(outfile,
"%s=\"%s\" # %s\n", opt, arg, values[found]);
463 fprintf(outfile,
"%s=\"%s\"\n", opt, arg);
465 fprintf(outfile,
"%s\n", opt);
482 write_into_file(outfile,
"help", 0, 0 );
484 write_into_file(outfile,
"version", 0, 0 );
486 write_into_file(outfile,
"input", args_info->
input_orig, 0);
488 write_into_file(outfile,
"output", args_info->
output_orig, 0);
490 write_into_file(outfile,
"sele1", args_info->
sele1_orig, 0);
492 write_into_file(outfile,
"sele2", args_info->
sele2_orig, 0);
494 write_into_file(outfile,
"sele3", args_info->
sele3_orig, 0);
496 write_into_file(outfile,
"order", args_info->
order_orig, 0);
498 write_into_file(outfile,
"nbins", args_info->
nbins_orig, 0);
500 write_into_file(outfile,
"nzbins", args_info->
nzbins_orig, 0);
502 write_into_file(outfile,
"rcut", args_info->
rcut_orig, 0);
504 write_into_file(outfile,
"OOcut", args_info->
OOcut_orig, 0);
506 write_into_file(outfile,
"thetacut", args_info->
thetacut_orig, 0);
508 write_into_file(outfile,
"OHcut", args_info->
OHcut_orig, 0);
510 write_into_file(outfile,
"privilegedAxis", args_info->
privilegedAxis_orig, cmdline_parser_privilegedAxis_values);
512 write_into_file(outfile,
"length", args_info->
length_orig, 0);
514 write_into_file(outfile,
"dipoleX", args_info->
dipoleX_orig, 0);
516 write_into_file(outfile,
"dipoleY", args_info->
dipoleY_orig, 0);
518 write_into_file(outfile,
"dipoleZ", args_info->
dipoleZ_orig, 0);
520 write_into_file(outfile,
"selecorr", 0, 0 );
522 write_into_file(outfile,
"rcorr", 0, 0 );
524 write_into_file(outfile,
"rcorrZ", 0, 0 );
526 write_into_file(outfile,
"vcorr", 0, 0 );
528 write_into_file(outfile,
"vcorrZ", 0, 0 );
530 write_into_file(outfile,
"vcorrR", 0, 0 );
532 write_into_file(outfile,
"vaOutProdcorr", 0, 0 );
534 write_into_file(outfile,
"waOutProdcorr", 0, 0 );
536 write_into_file(outfile,
"vwOutProdcorr", 0, 0 );
538 write_into_file(outfile,
"wvOutProdcorr", 0, 0 );
540 write_into_file(outfile,
"wcorr", 0, 0 );
542 write_into_file(outfile,
"dcorr", 0, 0 );
544 write_into_file(outfile,
"lcorr", 0, 0 );
546 write_into_file(outfile,
"lcorrZ", 0, 0 );
548 write_into_file(outfile,
"cohZ", 0, 0 );
550 write_into_file(outfile,
"sdcorr", 0, 0 );
552 write_into_file(outfile,
"r_rcorr", 0, 0 );
554 write_into_file(outfile,
"thetacorr", 0, 0 );
556 write_into_file(outfile,
"drcorr", 0, 0 );
558 write_into_file(outfile,
"stresscorr", 0, 0 );
560 write_into_file(outfile,
"bondcorr", 0, 0 );
562 write_into_file(outfile,
"freqfluccorr", 0, 0 );
564 write_into_file(outfile,
"jumptime", 0, 0 );
566 write_into_file(outfile,
"jumptimeZ", 0, 0 );
568 write_into_file(outfile,
"jumptimeR", 0, 0 );
570 write_into_file(outfile,
"persistence", 0, 0 );
572 write_into_file(outfile,
"pjcorr", 0, 0 );
574 write_into_file(outfile,
"ftcorr", 0, 0 );
576 write_into_file(outfile,
"ckcorr", 0, 0 );
578 write_into_file(outfile,
"cscorr", 0, 0 );
580 write_into_file(outfile,
"facorr", 0, 0 );
582 write_into_file(outfile,
"tfcorr", 0, 0 );
584 write_into_file(outfile,
"tacorr", 0, 0 );
586 write_into_file(outfile,
"disp", 0, 0 );
588 write_into_file(outfile,
"dispZ", 0, 0 );
590 write_into_file(outfile,
"current", 0, 0 );
592 write_into_file(outfile,
"onsager", 0, 0 );
594 write_into_file(outfile,
"ddisp", 0, 0 );
596 write_into_file(outfile,
"rotAngleDisp", 0, 0 );
598 write_into_file(outfile,
"meandisp", 0, 0 );
611 outfile = fopen(filename,
"w");
628 cmdline_parser_release (args_info);
633gengetopt_strdup (
const char *s)
639 result = (
char*)malloc(strlen(s) + 1);
640 if (result == (
char*)0)
707 result = cmdline_parser_internal (argc, argv, args_info, params, 0);
724 result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0);
732 int result = EXIT_SUCCESS;
734 if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
735 result = EXIT_FAILURE;
741cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error)
743 int error_occurred = 0;
744 FIX_UNUSED (additional_error);
749 fprintf (stderr,
"%s: '--input' ('-i') option required%s\n", prog_name, (additional_error ? additional_error :
""));
755 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 :
""));
762 return error_occurred;
820#ifndef required_argument
821#define required_argument 1
824#ifndef optional_argument
825#define optional_argument 2
828struct custom_getopt_data {
870static char *custom_optarg;
887static int custom_optind = 1;
893static int custom_opterr = 1;
899static int custom_optopt =
'?';
909static void exchange(
char **argv,
struct custom_getopt_data *d)
911 int bottom = d->first_nonopt;
912 int middle = d->last_nonopt;
913 int top = d->custom_optind;
922 while (top > middle && middle > bottom) {
923 if (top - middle > middle - bottom) {
925 int len = middle - bottom;
929 for (i = 0; i < len; i++) {
930 tem = argv[bottom + i];
932 argv[top - (middle - bottom) + i];
933 argv[top - (middle - bottom) + i] = tem;
939 int len = top - middle;
943 for (i = 0; i < len; i++) {
944 tem = argv[bottom + i];
945 argv[bottom + i] = argv[middle + i];
946 argv[middle + i] = tem;
953 d->first_nonopt += (d->custom_optind - d->last_nonopt);
954 d->last_nonopt = d->custom_optind;
958static void custom_getopt_initialize(
struct custom_getopt_data *d)
965 d->first_nonopt = d->last_nonopt = d->custom_optind;
970#define NONOPTION_P (argv[d->custom_optind][0] != '-' || argv[d->custom_optind][1] == '\0')
973static int shuffle_argv(
int argc,
char *
const *argv,
const struct option *longopts,
974 struct custom_getopt_data *d)
980 if (d->last_nonopt > d->custom_optind)
981 d->last_nonopt = d->custom_optind;
982 if (d->first_nonopt > d->custom_optind)
983 d->first_nonopt = d->custom_optind;
988 if (d->first_nonopt != d->last_nonopt &&
989 d->last_nonopt != d->custom_optind)
990 exchange((
char **) argv, d);
991 else if (d->last_nonopt != d->custom_optind)
992 d->first_nonopt = d->custom_optind;
997 while (d->custom_optind < argc && NONOPTION_P)
999 d->last_nonopt = d->custom_optind;
1005 if (d->custom_optind != argc && !strcmp(argv[d->custom_optind],
"--")) {
1007 if (d->first_nonopt != d->last_nonopt
1008 && d->last_nonopt != d->custom_optind)
1009 exchange((
char **) argv, d);
1010 else if (d->first_nonopt == d->last_nonopt)
1011 d->first_nonopt = d->custom_optind;
1012 d->last_nonopt = argc;
1013 d->custom_optind = argc;
1019 if (d->custom_optind == argc) {
1024 if (d->first_nonopt != d->last_nonopt)
1025 d->custom_optind = d->first_nonopt;
1033 d->custom_optarg = argv[d->custom_optind++];
1040 d->nextchar = (argv[d->custom_optind] + 1 + (longopts != NULL && argv[d->custom_optind][1] ==
'-'));
1054static int check_long_opt(
int argc,
char *
const *argv,
const char *optstring,
1055 const struct option *longopts,
int *longind,
1056 int print_errors,
struct custom_getopt_data *d)
1059 const struct option *p;
1060 const struct option *pfound = NULL;
1066 for (nameend = d->nextchar; *nameend && *nameend !=
'='; nameend++)
1070 for (p = longopts, option_index = 0; p->name; p++, option_index++)
1071 if (!strncmp(p->name, d->nextchar, nameend - d->nextchar)) {
1072 if ((
unsigned int) (nameend - d->nextchar)
1073 == (
unsigned int) strlen(p->name)) {
1076 indfound = option_index;
1079 }
else if (pfound == NULL) {
1082 indfound = option_index;
1083 }
else if (pfound->has_arg != p->has_arg
1084 || pfound->flag != p->flag
1085 || pfound->val != p->val)
1089 if (ambig && !exact) {
1092 "%s: option `%s' is ambiguous\n",
1093 argv[0], argv[d->custom_optind]);
1095 d->nextchar += strlen(d->nextchar);
1097 d->custom_optopt = 0;
1101 option_index = indfound;
1104 if (pfound->has_arg != no_argument)
1105 d->custom_optarg = nameend + 1;
1108 if (argv[d->custom_optind - 1][1] ==
'-') {
1110 fprintf(stderr,
"%s: option `--%s' doesn't allow an argument\n",
1111 argv[0], pfound->name);
1114 fprintf(stderr,
"%s: option `%c%s' doesn't allow an argument\n",
1115 argv[0], argv[d->custom_optind - 1][0], pfound->name);
1119 d->nextchar += strlen(d->nextchar);
1120 d->custom_optopt = pfound->val;
1123 }
else if (pfound->has_arg == required_argument) {
1124 if (d->custom_optind < argc)
1125 d->custom_optarg = argv[d->custom_optind++];
1129 "%s: option `%s' requires an argument\n",
1131 argv[d->custom_optind - 1]);
1133 d->nextchar += strlen(d->nextchar);
1134 d->custom_optopt = pfound->val;
1135 return optstring[0] ==
':' ?
':' :
'?';
1138 d->nextchar += strlen(d->nextchar);
1139 if (longind != NULL)
1140 *longind = option_index;
1142 *(pfound->flag) = pfound->val;
1153 if (argv[d->custom_optind][1] ==
'-') {
1156 "%s: unrecognized option `--%s'\n",
1157 argv[0], d->nextchar);
1161 "%s: unrecognized option `%c%s'\n",
1162 argv[0], argv[d->custom_optind][0],
1166 d->nextchar = (
char *)
"";
1168 d->custom_optopt = 0;
1172static int check_short_opt(
int argc,
char *
const *argv,
const char *optstring,
1173 int print_errors,
struct custom_getopt_data *d)
1175 char c = *d->nextchar++;
1176 const char *temp = strchr(optstring, c);
1179 if (*d->nextchar ==
'\0')
1181 if (!temp || c ==
':') {
1183 fprintf(stderr,
"%s: invalid option -- %c\n", argv[0], c);
1185 d->custom_optopt = c;
1188 if (temp[1] ==
':') {
1189 if (temp[2] ==
':') {
1191 if (*d->nextchar !=
'\0') {
1192 d->custom_optarg = d->nextchar;
1195 d->custom_optarg = NULL;
1199 if (*d->nextchar !=
'\0') {
1200 d->custom_optarg = d->nextchar;
1207 }
else if (d->custom_optind == argc) {
1210 "%s: option requires an argument -- %c\n",
1213 d->custom_optopt = c;
1214 if (optstring[0] ==
':')
1224 d->custom_optarg = argv[d->custom_optind++];
1301static int getopt_internal_r(
int argc,
char *
const *argv,
const char *optstring,
1302 const struct option *longopts,
int *longind,
1303 struct custom_getopt_data *d)
1305 int ret, print_errors = d->custom_opterr;
1307 if (optstring[0] ==
':')
1311 d->custom_optarg = NULL;
1317 if (d->custom_optind == 0 || !d->initialized) {
1318 if (d->custom_optind == 0)
1319 d->custom_optind = 1;
1320 custom_getopt_initialize(d);
1322 if (d->nextchar == NULL || *d->nextchar ==
'\0') {
1323 ret = shuffle_argv(argc, argv, longopts, d);
1327 if (longopts && (argv[d->custom_optind][1] ==
'-' ))
1328 return check_long_opt(argc, argv, optstring, longopts,
1329 longind, print_errors, d);
1330 return check_short_opt(argc, argv, optstring, print_errors, d);
1333static int custom_getopt_internal(
int argc,
char *
const *argv,
const char *optstring,
1334 const struct option *longopts,
int *longind)
1338 static struct custom_getopt_data d;
1340 d.custom_optind = custom_optind;
1341 d.custom_opterr = custom_opterr;
1342 result = getopt_internal_r(argc, argv, optstring, longopts,
1344 custom_optind = d.custom_optind;
1345 custom_optarg = d.custom_optarg;
1346 custom_optopt = d.custom_optopt;
1350static int custom_getopt_long (
int argc,
char *
const *argv,
const char *options,
1351 const struct option *long_options,
int *opt_index)
1353 return custom_getopt_internal(argc, argv, options, long_options,
1358static char *package_name = 0;
1379int update_arg(
void *field,
char **orig_field,
1380 unsigned int *field_given,
unsigned int *prev_given,
1381 char *value,
const char *possible_values[],
1382 const char *default_value,
1383 cmdline_parser_arg_type arg_type,
1384 int check_ambiguity,
int override,
1385 int no_free,
int multiple_option,
1386 const char *long_opt,
char short_opt,
1387 const char *additional_error)
1389 char *stop_char = 0;
1390 const char *val = value;
1392 char **string_field;
1398 if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
1400 if (short_opt !=
'-')
1401 fprintf (stderr,
"%s: `--%s' (`-%c') option given more than once%s\n",
1402 package_name, long_opt, short_opt,
1403 (additional_error ? additional_error :
""));
1405 fprintf (stderr,
"%s: `--%s' option given more than once%s\n",
1406 package_name, long_opt,
1407 (additional_error ? additional_error :
""));
1411 if (possible_values && (found = check_possible_values((value ? value : default_value), possible_values)) < 0)
1413 if (short_opt !=
'-')
1414 fprintf (stderr,
"%s: %s argument, \"%s\", for option `--%s' (`-%c')%s\n",
1415 package_name, (found == -2) ?
"ambiguous" :
"invalid", value, long_opt, short_opt,
1416 (additional_error ? additional_error :
""));
1418 fprintf (stderr,
"%s: %s argument, \"%s\", for option `--%s'%s\n",
1419 package_name, (found == -2) ?
"ambiguous" :
"invalid", value, long_opt,
1420 (additional_error ? additional_error :
""));
1424 if (field_given && *field_given && !
override)
1430 if (possible_values)
1431 val = possible_values[found];
1435 if (val) *((
int *)field) = strtol (val, &stop_char, 0);
1438 if (val) *((
double *)field) = strtod (val, &stop_char);
1441 if (val) *((
int *)field) = found;
1445 string_field = (
char **)field;
1446 if (!no_free && *string_field)
1447 free (*string_field);
1448 *string_field = gengetopt_strdup (val);
1459 if (val && !(stop_char && *stop_char ==
'\0')) {
1460 fprintf(stderr,
"%s: invalid numeric value: %s\n", package_name, val);
1473 if (value && orig_field) {
1475 *orig_field = value;
1479 *orig_field = gengetopt_strdup (value);
1489cmdline_parser_internal (
1495 int error_occurred = 0;
1501 int check_ambiguity;
1508 package_name = argv[0];
1512 FIX_UNUSED(
override);
1519 FIX_UNUSED(check_ambiguity);
1533 int option_index = 0;
1535 static struct option long_options[] = {
1536 {
"help", 0, NULL,
'h' },
1537 {
"version", 0, NULL,
'V' },
1538 {
"input", 1, NULL,
'i' },
1539 {
"output", 1, NULL,
'o' },
1540 {
"sele1", 1, NULL, 0 },
1541 {
"sele2", 1, NULL, 0 },
1542 {
"sele3", 1, NULL, 0 },
1543 {
"order", 1, NULL, 0 },
1544 {
"nbins", 1, NULL,
'n' },
1545 {
"nzbins", 1, NULL,
'z' },
1546 {
"rcut", 1, NULL,
'c' },
1547 {
"OOcut", 1, NULL, 0 },
1548 {
"thetacut", 1, NULL, 0 },
1549 {
"OHcut", 1, NULL, 0 },
1550 {
"privilegedAxis", 1, NULL, 0 },
1551 {
"length", 1, NULL, 0 },
1552 {
"dipoleX", 1, NULL, 0 },
1553 {
"dipoleY", 1, NULL, 0 },
1554 {
"dipoleZ", 1, NULL, 0 },
1555 {
"selecorr", 0, NULL,
's' },
1556 {
"rcorr", 0, NULL,
'r' },
1557 {
"rcorrZ", 0, NULL, 0 },
1558 {
"vcorr", 0, NULL,
'v' },
1559 {
"vcorrZ", 0, NULL, 0 },
1560 {
"vcorrR", 0, NULL, 0 },
1561 {
"vaOutProdcorr", 0, NULL, 0 },
1562 {
"waOutProdcorr", 0, NULL, 0 },
1563 {
"vwOutProdcorr", 0, NULL, 0 },
1564 {
"wvOutProdcorr", 0, NULL, 0 },
1565 {
"wcorr", 0, NULL,
'w' },
1566 {
"dcorr", 0, NULL,
'd' },
1567 {
"lcorr", 0, NULL,
'l' },
1568 {
"lcorrZ", 0, NULL, 0 },
1569 {
"cohZ", 0, NULL, 0 },
1570 {
"sdcorr", 0, NULL,
'M' },
1571 {
"r_rcorr", 0, NULL, 0 },
1572 {
"thetacorr", 0, NULL, 0 },
1573 {
"drcorr", 0, NULL, 0 },
1574 {
"stresscorr", 0, NULL, 0 },
1575 {
"bondcorr", 0, NULL,
'b' },
1576 {
"freqfluccorr", 0, NULL,
'f' },
1577 {
"jumptime", 0, NULL,
'j' },
1578 {
"jumptimeZ", 0, NULL, 0 },
1579 {
"jumptimeR", 0, NULL, 0 },
1580 {
"persistence", 0, NULL, 0 },
1581 {
"pjcorr", 0, NULL, 0 },
1582 {
"ftcorr", 0, NULL, 0 },
1583 {
"ckcorr", 0, NULL, 0 },
1584 {
"cscorr", 0, NULL, 0 },
1585 {
"facorr", 0, NULL, 0 },
1586 {
"tfcorr", 0, NULL, 0 },
1587 {
"tacorr", 0, NULL, 0 },
1588 {
"disp", 0, NULL, 0 },
1589 {
"dispZ", 0, NULL, 0 },
1590 {
"current", 0, NULL, 0 },
1591 {
"onsager", 0, NULL, 0 },
1592 {
"ddisp", 0, NULL, 0 },
1593 {
"rotAngleDisp", 0, NULL, 0 },
1594 {
"meandisp", 0, NULL, 0 },
1598 custom_optarg = optarg;
1599 custom_optind = optind;
1600 custom_opterr = opterr;
1601 custom_optopt = optopt;
1603 c = custom_getopt_long (argc, argv,
"hVi:o:n:z:c:srvwdlMbfj", long_options, &option_index);
1605 optarg = custom_optarg;
1606 optind = custom_optind;
1607 opterr = custom_opterr;
1608 optopt = custom_optopt;
1615 cmdline_parser_print_help ();
1616 cmdline_parser_free (&local_args_info);
1617 exit (EXIT_SUCCESS);
1620 cmdline_parser_print_version ();
1621 cmdline_parser_free (&local_args_info);
1622 exit (EXIT_SUCCESS);
1627 if (update_arg( (
void *)&(args_info->
input_arg),
1629 &(local_args_info.input_given), optarg, 0, 0, ARG_STRING,
1630 check_ambiguity,
override, 0, 0,
1639 if (update_arg( (
void *)&(args_info->
output_arg),
1641 &(local_args_info.output_given), optarg, 0, 0, ARG_STRING,
1642 check_ambiguity,
override, 0, 0,
1651 if (update_arg( (
void *)&(args_info->
nbins_arg),
1653 &(local_args_info.nbins_given), optarg, 0,
"100", ARG_INT,
1654 check_ambiguity,
override, 0, 0,
1663 if (update_arg( (
void *)&(args_info->
nzbins_arg),
1665 &(local_args_info.nzbins_given), optarg, 0,
"100", ARG_INT,
1666 check_ambiguity,
override, 0, 0,
1675 if (update_arg( (
void *)&(args_info->
rcut_arg),
1677 &(local_args_info.rcut_given), optarg, 0, 0, ARG_DOUBLE,
1678 check_ambiguity,
override, 0, 0,
1687 reset_group_correlation_function (args_info);
1692 &(local_args_info.selecorr_given), optarg, 0, 0, ARG_NO,
1693 check_ambiguity,
override, 0, 0,
1702 reset_group_correlation_function (args_info);
1707 &(local_args_info.rcorr_given), optarg, 0, 0, ARG_NO,
1708 check_ambiguity,
override, 0, 0,
1717 reset_group_correlation_function (args_info);
1722 &(local_args_info.vcorr_given), optarg, 0, 0, ARG_NO,
1723 check_ambiguity,
override, 0, 0,
1732 reset_group_correlation_function (args_info);
1737 &(local_args_info.wcorr_given), optarg, 0, 0, ARG_NO,
1738 check_ambiguity,
override, 0, 0,
1747 reset_group_correlation_function (args_info);
1752 &(local_args_info.dcorr_given), optarg, 0, 0, ARG_NO,
1753 check_ambiguity,
override, 0, 0,
1762 reset_group_correlation_function (args_info);
1767 &(local_args_info.lcorr_given), optarg, 0, 0, ARG_NO,
1768 check_ambiguity,
override, 0, 0,
1777 reset_group_correlation_function (args_info);
1782 &(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO,
1783 check_ambiguity,
override, 0, 0,
1792 reset_group_correlation_function (args_info);
1797 &(local_args_info.bondcorr_given), optarg, 0, 0, ARG_NO,
1798 check_ambiguity,
override, 0, 0,
1807 reset_group_correlation_function (args_info);
1812 &(local_args_info.freqfluccorr_given), optarg, 0, 0, ARG_NO,
1813 check_ambiguity,
override, 0, 0,
1814 "freqfluccorr",
'f',
1822 reset_group_correlation_function (args_info);
1827 &(local_args_info.jumptime_given), optarg, 0, 0, ARG_NO,
1828 check_ambiguity,
override, 0, 0,
1837 if (strcmp (long_options[option_index].name,
"sele1") == 0)
1841 if (update_arg( (
void *)&(args_info->
sele1_arg),
1843 &(local_args_info.sele1_given), optarg, 0, 0, ARG_STRING,
1844 check_ambiguity,
override, 0, 0,
1851 else if (strcmp (long_options[option_index].name,
"sele2") == 0)
1855 if (update_arg( (
void *)&(args_info->
sele2_arg),
1857 &(local_args_info.sele2_given), optarg, 0, 0, ARG_STRING,
1858 check_ambiguity,
override, 0, 0,
1865 else if (strcmp (long_options[option_index].name,
"sele3") == 0)
1869 if (update_arg( (
void *)&(args_info->
sele3_arg),
1871 &(local_args_info.sele3_given), optarg, 0, 0, ARG_STRING,
1872 check_ambiguity,
override, 0, 0,
1879 else if (strcmp (long_options[option_index].name,
"order") == 0)
1883 if (update_arg( (
void *)&(args_info->
order_arg),
1885 &(local_args_info.order_given), optarg, 0, 0, ARG_INT,
1886 check_ambiguity,
override, 0, 0,
1893 else if (strcmp (long_options[option_index].name,
"OOcut") == 0)
1897 if (update_arg( (
void *)&(args_info->
OOcut_arg),
1899 &(local_args_info.OOcut_given), optarg, 0,
"3.5", ARG_DOUBLE,
1900 check_ambiguity,
override, 0, 0,
1907 else if (strcmp (long_options[option_index].name,
"thetacut") == 0)
1913 &(local_args_info.thetacut_given), optarg, 0,
"30", ARG_DOUBLE,
1914 check_ambiguity,
override, 0, 0,
1921 else if (strcmp (long_options[option_index].name,
"OHcut") == 0)
1925 if (update_arg( (
void *)&(args_info->
OHcut_arg),
1927 &(local_args_info.OHcut_given), optarg, 0,
"2.45", ARG_DOUBLE,
1928 check_ambiguity,
override, 0, 0,
1935 else if (strcmp (long_options[option_index].name,
"privilegedAxis") == 0)
1941 &(local_args_info.privilegedAxis_given), optarg, cmdline_parser_privilegedAxis_values,
"z", ARG_ENUM,
1942 check_ambiguity,
override, 0, 0,
1943 "privilegedAxis",
'-',
1949 else if (strcmp (long_options[option_index].name,
"length") == 0)
1953 if (update_arg( (
void *)&(args_info->
length_arg),
1955 &(local_args_info.length_given), optarg, 0,
"100", ARG_DOUBLE,
1956 check_ambiguity,
override, 0, 0,
1963 else if (strcmp (long_options[option_index].name,
"dipoleX") == 0)
1967 if (update_arg( (
void *)&(args_info->
dipoleX_arg),
1969 &(local_args_info.dipoleX_given), optarg, 0,
"0.0", ARG_DOUBLE,
1970 check_ambiguity,
override, 0, 0,
1977 else if (strcmp (long_options[option_index].name,
"dipoleY") == 0)
1981 if (update_arg( (
void *)&(args_info->
dipoleY_arg),
1983 &(local_args_info.dipoleY_given), optarg, 0,
"0.0", ARG_DOUBLE,
1984 check_ambiguity,
override, 0, 0,
1991 else if (strcmp (long_options[option_index].name,
"dipoleZ") == 0)
1995 if (update_arg( (
void *)&(args_info->
dipoleZ_arg),
1997 &(local_args_info.dipoleZ_given), optarg, 0,
"-1.0", ARG_DOUBLE,
1998 check_ambiguity,
override, 0, 0,
2005 else if (strcmp (long_options[option_index].name,
"rcorrZ") == 0)
2009 reset_group_correlation_function (args_info);
2014 &(local_args_info.rcorrZ_given), optarg, 0, 0, ARG_NO,
2015 check_ambiguity,
override, 0, 0,
2022 else if (strcmp (long_options[option_index].name,
"vcorrZ") == 0)
2026 reset_group_correlation_function (args_info);
2031 &(local_args_info.vcorrZ_given), optarg, 0, 0, ARG_NO,
2032 check_ambiguity,
override, 0, 0,
2039 else if (strcmp (long_options[option_index].name,
"vcorrR") == 0)
2043 reset_group_correlation_function (args_info);
2048 &(local_args_info.vcorrR_given), optarg, 0, 0, ARG_NO,
2049 check_ambiguity,
override, 0, 0,
2056 else if (strcmp (long_options[option_index].name,
"vaOutProdcorr") == 0)
2060 reset_group_correlation_function (args_info);
2065 &(local_args_info.vaOutProdcorr_given), optarg, 0, 0, ARG_NO,
2066 check_ambiguity,
override, 0, 0,
2067 "vaOutProdcorr",
'-',
2073 else if (strcmp (long_options[option_index].name,
"waOutProdcorr") == 0)
2077 reset_group_correlation_function (args_info);
2082 &(local_args_info.waOutProdcorr_given), optarg, 0, 0, ARG_NO,
2083 check_ambiguity,
override, 0, 0,
2084 "waOutProdcorr",
'-',
2090 else if (strcmp (long_options[option_index].name,
"vwOutProdcorr") == 0)
2094 reset_group_correlation_function (args_info);
2099 &(local_args_info.vwOutProdcorr_given), optarg, 0, 0, ARG_NO,
2100 check_ambiguity,
override, 0, 0,
2101 "vwOutProdcorr",
'-',
2107 else if (strcmp (long_options[option_index].name,
"wvOutProdcorr") == 0)
2111 reset_group_correlation_function (args_info);
2116 &(local_args_info.wvOutProdcorr_given), optarg, 0, 0, ARG_NO,
2117 check_ambiguity,
override, 0, 0,
2118 "wvOutProdcorr",
'-',
2124 else if (strcmp (long_options[option_index].name,
"lcorrZ") == 0)
2128 reset_group_correlation_function (args_info);
2133 &(local_args_info.lcorrZ_given), optarg, 0, 0, ARG_NO,
2134 check_ambiguity,
override, 0, 0,
2141 else if (strcmp (long_options[option_index].name,
"cohZ") == 0)
2145 reset_group_correlation_function (args_info);
2150 &(local_args_info.cohZ_given), optarg, 0, 0, ARG_NO,
2151 check_ambiguity,
override, 0, 0,
2158 else if (strcmp (long_options[option_index].name,
"r_rcorr") == 0)
2162 reset_group_correlation_function (args_info);
2167 &(local_args_info.r_rcorr_given), optarg, 0, 0, ARG_NO,
2168 check_ambiguity,
override, 0, 0,
2175 else if (strcmp (long_options[option_index].name,
"thetacorr") == 0)
2179 reset_group_correlation_function (args_info);
2184 &(local_args_info.thetacorr_given), optarg, 0, 0, ARG_NO,
2185 check_ambiguity,
override, 0, 0,
2192 else if (strcmp (long_options[option_index].name,
"drcorr") == 0)
2196 reset_group_correlation_function (args_info);
2201 &(local_args_info.drcorr_given), optarg, 0, 0, ARG_NO,
2202 check_ambiguity,
override, 0, 0,
2209 else if (strcmp (long_options[option_index].name,
"stresscorr") == 0)
2213 reset_group_correlation_function (args_info);
2218 &(local_args_info.stresscorr_given), optarg, 0, 0, ARG_NO,
2219 check_ambiguity,
override, 0, 0,
2226 else if (strcmp (long_options[option_index].name,
"jumptimeZ") == 0)
2230 reset_group_correlation_function (args_info);
2235 &(local_args_info.jumptimeZ_given), optarg, 0, 0, ARG_NO,
2236 check_ambiguity,
override, 0, 0,
2243 else if (strcmp (long_options[option_index].name,
"jumptimeR") == 0)
2247 reset_group_correlation_function (args_info);
2252 &(local_args_info.jumptimeR_given), optarg, 0, 0, ARG_NO,
2253 check_ambiguity,
override, 0, 0,
2260 else if (strcmp (long_options[option_index].name,
"persistence") == 0)
2264 reset_group_correlation_function (args_info);
2269 &(local_args_info.persistence_given), optarg, 0, 0, ARG_NO,
2270 check_ambiguity,
override, 0, 0,
2277 else if (strcmp (long_options[option_index].name,
"pjcorr") == 0)
2281 reset_group_correlation_function (args_info);
2286 &(local_args_info.pjcorr_given), optarg, 0, 0, ARG_NO,
2287 check_ambiguity,
override, 0, 0,
2294 else if (strcmp (long_options[option_index].name,
"ftcorr") == 0)
2298 reset_group_correlation_function (args_info);
2303 &(local_args_info.ftcorr_given), optarg, 0, 0, ARG_NO,
2304 check_ambiguity,
override, 0, 0,
2311 else if (strcmp (long_options[option_index].name,
"ckcorr") == 0)
2315 reset_group_correlation_function (args_info);
2320 &(local_args_info.ckcorr_given), optarg, 0, 0, ARG_NO,
2321 check_ambiguity,
override, 0, 0,
2328 else if (strcmp (long_options[option_index].name,
"cscorr") == 0)
2332 reset_group_correlation_function (args_info);
2337 &(local_args_info.cscorr_given), optarg, 0, 0, ARG_NO,
2338 check_ambiguity,
override, 0, 0,
2345 else if (strcmp (long_options[option_index].name,
"facorr") == 0)
2349 reset_group_correlation_function (args_info);
2354 &(local_args_info.facorr_given), optarg, 0, 0, ARG_NO,
2355 check_ambiguity,
override, 0, 0,
2362 else if (strcmp (long_options[option_index].name,
"tfcorr") == 0)
2366 reset_group_correlation_function (args_info);
2371 &(local_args_info.tfcorr_given), optarg, 0, 0, ARG_NO,
2372 check_ambiguity,
override, 0, 0,
2379 else if (strcmp (long_options[option_index].name,
"tacorr") == 0)
2383 reset_group_correlation_function (args_info);
2388 &(local_args_info.tacorr_given), optarg, 0, 0, ARG_NO,
2389 check_ambiguity,
override, 0, 0,
2396 else if (strcmp (long_options[option_index].name,
"disp") == 0)
2400 reset_group_correlation_function (args_info);
2405 &(local_args_info.disp_given), optarg, 0, 0, ARG_NO,
2406 check_ambiguity,
override, 0, 0,
2413 else if (strcmp (long_options[option_index].name,
"dispZ") == 0)
2417 reset_group_correlation_function (args_info);
2422 &(local_args_info.dispZ_given), optarg, 0, 0, ARG_NO,
2423 check_ambiguity,
override, 0, 0,
2430 else if (strcmp (long_options[option_index].name,
"current") == 0)
2434 reset_group_correlation_function (args_info);
2439 &(local_args_info.current_given), optarg, 0, 0, ARG_NO,
2440 check_ambiguity,
override, 0, 0,
2447 else if (strcmp (long_options[option_index].name,
"onsager") == 0)
2451 reset_group_correlation_function (args_info);
2456 &(local_args_info.onsager_given), optarg, 0, 0, ARG_NO,
2457 check_ambiguity,
override, 0, 0,
2464 else if (strcmp (long_options[option_index].name,
"ddisp") == 0)
2468 reset_group_correlation_function (args_info);
2473 &(local_args_info.ddisp_given), optarg, 0, 0, ARG_NO,
2474 check_ambiguity,
override, 0, 0,
2481 else if (strcmp (long_options[option_index].name,
"rotAngleDisp") == 0)
2485 reset_group_correlation_function (args_info);
2490 &(local_args_info.rotAngleDisp_given), optarg, 0, 0, ARG_NO,
2491 check_ambiguity,
override, 0, 0,
2492 "rotAngleDisp",
'-',
2498 else if (strcmp (long_options[option_index].name,
"meandisp") == 0)
2502 reset_group_correlation_function (args_info);
2507 &(local_args_info.meandisp_given), optarg, 0, 0, ARG_NO,
2508 check_ambiguity,
override, 0, 0,
2521 fprintf (stderr,
"%s: option unknown: %c%s\n",
CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error :
""));
2528 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 :
""));
2536 error_occurred += cmdline_parser_required2 (args_info, argv[0], additional_error);
2539 cmdline_parser_release (&local_args_info);
2541 if ( error_occurred )
2542 return (EXIT_FAILURE);
2547 int found_prog_name = 0;
2553 args_info->
inputs_num = argc - optind - found_prog_name;
2555 (
char **)(malloc ((args_info->
inputs_num)*
sizeof(
char *))) ;
2556 while (optind < argc)
2557 args_info->
inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;
2564 cmdline_parser_release (&local_args_info);
2565 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.
unsigned int meandisp_given
Whether meandisp was given.
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 * meandisp_help
mean displacement 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.