| 1 |
|
/* |
| 2 |
|
File autogenerated by gengetopt version 2.22.4 |
| 3 |
|
generated with the following command: |
| 4 |
< |
gengetopt |
| 4 |
> |
gengetopt -F DynamicPropsCmd -u |
| 5 |
|
|
| 6 |
|
The developers of gengetopt consider the fixed text that goes in all |
| 7 |
|
gengetopt output files to be in the public domain: |
| 27 |
|
|
| 28 |
|
const char *gengetopt_args_info_purpose = ""; |
| 29 |
|
|
| 30 |
< |
const char *gengetopt_args_info_usage = "Usage: DynamicProps [OPTIONS]..."; |
| 30 |
> |
const char *gengetopt_args_info_usage = "Usage: DynamicProps [OPTIONS]... [FILES]..."; |
| 31 |
|
|
| 32 |
|
const char *gengetopt_args_info_description = ""; |
| 33 |
|
|
| 39 |
|
" --sele1=selection script select first stuntdouble set", |
| 40 |
|
" --sele2=selection script select second stuntdouble set (if sele2 is not \n set, use script from sele1)", |
| 41 |
|
" --order=INT Lengendre Polynomial Order", |
| 42 |
+ |
" -m, --memory=memory specification\n Available memory (defaults to 2G) \n (default=`2G')", |
| 43 |
|
"\n Group: dynamicProps\n an option of this group is required", |
| 44 |
|
" -r, --rcorr rmsd", |
| 45 |
|
" -v, --vcorr velocity correlation function", |
| 46 |
|
" -d, --dcorr dipole correlation function", |
| 47 |
|
" -l, --lcorr Lengendre correlation function", |
| 48 |
+ |
" -s, --sdcorr System dipole correlation function", |
| 49 |
|
" --r_rcorr Radial rmsd", |
| 50 |
|
" --thetacorr Angular rmsd", |
| 51 |
|
" --drcorr Directional rmsd for particles with unit \n vectors", |
| 52 |
|
" --helfandEcorr Helfand moment for thermal conductvity", |
| 53 |
+ |
" -p, --momentum Helfand momentum for viscosity", |
| 54 |
|
" --stresscorr Stress tensor correlation function", |
| 55 |
|
0 |
| 56 |
|
}; |
| 85 |
|
args_info->sele1_given = 0 ; |
| 86 |
|
args_info->sele2_given = 0 ; |
| 87 |
|
args_info->order_given = 0 ; |
| 88 |
+ |
args_info->memory_given = 0 ; |
| 89 |
|
args_info->rcorr_given = 0 ; |
| 90 |
|
args_info->vcorr_given = 0 ; |
| 91 |
|
args_info->dcorr_given = 0 ; |
| 92 |
|
args_info->lcorr_given = 0 ; |
| 93 |
+ |
args_info->sdcorr_given = 0 ; |
| 94 |
|
args_info->r_rcorr_given = 0 ; |
| 95 |
|
args_info->thetacorr_given = 0 ; |
| 96 |
|
args_info->drcorr_given = 0 ; |
| 97 |
|
args_info->helfandEcorr_given = 0 ; |
| 98 |
+ |
args_info->momentum_given = 0 ; |
| 99 |
|
args_info->stresscorr_given = 0 ; |
| 100 |
|
args_info->dynamicProps_group_counter = 0 ; |
| 101 |
|
} |
| 113 |
|
args_info->sele2_arg = NULL; |
| 114 |
|
args_info->sele2_orig = NULL; |
| 115 |
|
args_info->order_orig = NULL; |
| 116 |
+ |
args_info->memory_arg = gengetopt_strdup ("2G"); |
| 117 |
+ |
args_info->memory_orig = NULL; |
| 118 |
|
|
| 119 |
|
} |
| 120 |
|
|
| 130 |
|
args_info->sele1_help = gengetopt_args_info_help[4] ; |
| 131 |
|
args_info->sele2_help = gengetopt_args_info_help[5] ; |
| 132 |
|
args_info->order_help = gengetopt_args_info_help[6] ; |
| 133 |
< |
args_info->rcorr_help = gengetopt_args_info_help[8] ; |
| 134 |
< |
args_info->vcorr_help = gengetopt_args_info_help[9] ; |
| 135 |
< |
args_info->dcorr_help = gengetopt_args_info_help[10] ; |
| 136 |
< |
args_info->lcorr_help = gengetopt_args_info_help[11] ; |
| 137 |
< |
args_info->r_rcorr_help = gengetopt_args_info_help[12] ; |
| 138 |
< |
args_info->thetacorr_help = gengetopt_args_info_help[13] ; |
| 139 |
< |
args_info->drcorr_help = gengetopt_args_info_help[14] ; |
| 140 |
< |
args_info->helfandEcorr_help = gengetopt_args_info_help[15] ; |
| 141 |
< |
args_info->stresscorr_help = gengetopt_args_info_help[16] ; |
| 133 |
> |
args_info->memory_help = gengetopt_args_info_help[7] ; |
| 134 |
> |
args_info->rcorr_help = gengetopt_args_info_help[9] ; |
| 135 |
> |
args_info->vcorr_help = gengetopt_args_info_help[10] ; |
| 136 |
> |
args_info->dcorr_help = gengetopt_args_info_help[11] ; |
| 137 |
> |
args_info->lcorr_help = gengetopt_args_info_help[12] ; |
| 138 |
> |
args_info->sdcorr_help = gengetopt_args_info_help[13] ; |
| 139 |
> |
args_info->r_rcorr_help = gengetopt_args_info_help[14] ; |
| 140 |
> |
args_info->thetacorr_help = gengetopt_args_info_help[15] ; |
| 141 |
> |
args_info->drcorr_help = gengetopt_args_info_help[16] ; |
| 142 |
> |
args_info->helfandEcorr_help = gengetopt_args_info_help[17] ; |
| 143 |
> |
args_info->momentum_help = gengetopt_args_info_help[18] ; |
| 144 |
> |
args_info->stresscorr_help = gengetopt_args_info_help[19] ; |
| 145 |
|
|
| 146 |
|
} |
| 147 |
|
|
| 183 |
|
clear_given (args_info); |
| 184 |
|
clear_args (args_info); |
| 185 |
|
init_args_info (args_info); |
| 186 |
+ |
|
| 187 |
+ |
args_info->inputs = 0; |
| 188 |
+ |
args_info->inputs_num = 0; |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
void |
| 224 |
|
static void |
| 225 |
|
cmdline_parser_release (struct gengetopt_args_info *args_info) |
| 226 |
|
{ |
| 227 |
< |
|
| 227 |
> |
unsigned int i; |
| 228 |
|
free_string_field (&(args_info->input_arg)); |
| 229 |
|
free_string_field (&(args_info->input_orig)); |
| 230 |
|
free_string_field (&(args_info->output_arg)); |
| 234 |
|
free_string_field (&(args_info->sele2_arg)); |
| 235 |
|
free_string_field (&(args_info->sele2_orig)); |
| 236 |
|
free_string_field (&(args_info->order_orig)); |
| 237 |
+ |
free_string_field (&(args_info->memory_arg)); |
| 238 |
+ |
free_string_field (&(args_info->memory_orig)); |
| 239 |
|
|
| 240 |
|
|
| 241 |
+ |
for (i = 0; i < args_info->inputs_num; ++i) |
| 242 |
+ |
free (args_info->inputs [i]); |
| 243 |
|
|
| 244 |
+ |
if (args_info->inputs_num) |
| 245 |
+ |
free (args_info->inputs); |
| 246 |
+ |
|
| 247 |
|
clear_given (args_info); |
| 248 |
|
} |
| 249 |
|
|
| 285 |
|
write_into_file(outfile, "sele2", args_info->sele2_orig, 0); |
| 286 |
|
if (args_info->order_given) |
| 287 |
|
write_into_file(outfile, "order", args_info->order_orig, 0); |
| 288 |
+ |
if (args_info->memory_given) |
| 289 |
+ |
write_into_file(outfile, "memory", args_info->memory_orig, 0); |
| 290 |
|
if (args_info->rcorr_given) |
| 291 |
|
write_into_file(outfile, "rcorr", 0, 0 ); |
| 292 |
|
if (args_info->vcorr_given) |
| 295 |
|
write_into_file(outfile, "dcorr", 0, 0 ); |
| 296 |
|
if (args_info->lcorr_given) |
| 297 |
|
write_into_file(outfile, "lcorr", 0, 0 ); |
| 298 |
+ |
if (args_info->sdcorr_given) |
| 299 |
+ |
write_into_file(outfile, "sdcorr", 0, 0 ); |
| 300 |
|
if (args_info->r_rcorr_given) |
| 301 |
|
write_into_file(outfile, "r_rcorr", 0, 0 ); |
| 302 |
|
if (args_info->thetacorr_given) |
| 305 |
|
write_into_file(outfile, "drcorr", 0, 0 ); |
| 306 |
|
if (args_info->helfandEcorr_given) |
| 307 |
|
write_into_file(outfile, "helfandEcorr", 0, 0 ); |
| 308 |
+ |
if (args_info->momentum_given) |
| 309 |
+ |
write_into_file(outfile, "momentum", 0, 0 ); |
| 310 |
|
if (args_info->stresscorr_given) |
| 311 |
|
write_into_file(outfile, "stresscorr", 0, 0 ); |
| 312 |
|
|
| 366 |
|
args_info->vcorr_given = 0 ; |
| 367 |
|
args_info->dcorr_given = 0 ; |
| 368 |
|
args_info->lcorr_given = 0 ; |
| 369 |
+ |
args_info->sdcorr_given = 0 ; |
| 370 |
|
args_info->r_rcorr_given = 0 ; |
| 371 |
|
args_info->thetacorr_given = 0 ; |
| 372 |
|
args_info->drcorr_given = 0 ; |
| 373 |
|
args_info->helfandEcorr_given = 0 ; |
| 374 |
+ |
args_info->momentum_given = 0 ; |
| 375 |
|
args_info->stresscorr_given = 0 ; |
| 376 |
|
|
| 377 |
|
args_info->dynamicProps_group_counter = 0; |
| 621 |
|
{ "sele1", 1, NULL, 0 }, |
| 622 |
|
{ "sele2", 1, NULL, 0 }, |
| 623 |
|
{ "order", 1, NULL, 0 }, |
| 624 |
+ |
{ "memory", 1, NULL, 'm' }, |
| 625 |
|
{ "rcorr", 0, NULL, 'r' }, |
| 626 |
|
{ "vcorr", 0, NULL, 'v' }, |
| 627 |
|
{ "dcorr", 0, NULL, 'd' }, |
| 628 |
|
{ "lcorr", 0, NULL, 'l' }, |
| 629 |
+ |
{ "sdcorr", 0, NULL, 's' }, |
| 630 |
|
{ "r_rcorr", 0, NULL, 0 }, |
| 631 |
|
{ "thetacorr", 0, NULL, 0 }, |
| 632 |
|
{ "drcorr", 0, NULL, 0 }, |
| 633 |
|
{ "helfandEcorr", 0, NULL, 0 }, |
| 634 |
+ |
{ "momentum", 0, NULL, 'p' }, |
| 635 |
|
{ "stresscorr", 0, NULL, 0 }, |
| 636 |
|
{ 0, 0, 0, 0 } |
| 637 |
|
}; |
| 638 |
|
|
| 639 |
< |
c = getopt_long (argc, argv, "hVi:o:rvdl", long_options, &option_index); |
| 639 |
> |
c = getopt_long (argc, argv, "hVi:o:m:rvdlsp", long_options, &option_index); |
| 640 |
|
|
| 641 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
| 642 |
|
|
| 672 |
|
&(local_args_info.output_given), optarg, 0, 0, ARG_STRING, |
| 673 |
|
check_ambiguity, override, 0, 0, |
| 674 |
|
"output", 'o', |
| 675 |
+ |
additional_error)) |
| 676 |
+ |
goto failure; |
| 677 |
+ |
|
| 678 |
+ |
break; |
| 679 |
+ |
case 'm': /* Available memory (defaults to 2G). */ |
| 680 |
+ |
|
| 681 |
+ |
|
| 682 |
+ |
if (update_arg( (void *)&(args_info->memory_arg), |
| 683 |
+ |
&(args_info->memory_orig), &(args_info->memory_given), |
| 684 |
+ |
&(local_args_info.memory_given), optarg, 0, "2G", ARG_STRING, |
| 685 |
+ |
check_ambiguity, override, 0, 0, |
| 686 |
+ |
"memory", 'm', |
| 687 |
|
additional_error)) |
| 688 |
|
goto failure; |
| 689 |
|
|
| 748 |
|
goto failure; |
| 749 |
|
|
| 750 |
|
break; |
| 751 |
+ |
case 's': /* System dipole correlation function. */ |
| 752 |
+ |
|
| 753 |
+ |
if (args_info->dynamicProps_group_counter && override) |
| 754 |
+ |
reset_group_dynamicProps (args_info); |
| 755 |
+ |
args_info->dynamicProps_group_counter += 1; |
| 756 |
+ |
|
| 757 |
+ |
if (update_arg( 0 , |
| 758 |
+ |
0 , &(args_info->sdcorr_given), |
| 759 |
+ |
&(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO, |
| 760 |
+ |
check_ambiguity, override, 0, 0, |
| 761 |
+ |
"sdcorr", 's', |
| 762 |
+ |
additional_error)) |
| 763 |
+ |
goto failure; |
| 764 |
+ |
|
| 765 |
+ |
break; |
| 766 |
+ |
case 'p': /* Helfand momentum for viscosity. */ |
| 767 |
+ |
|
| 768 |
+ |
if (args_info->dynamicProps_group_counter && override) |
| 769 |
+ |
reset_group_dynamicProps (args_info); |
| 770 |
+ |
args_info->dynamicProps_group_counter += 1; |
| 771 |
+ |
|
| 772 |
+ |
if (update_arg( 0 , |
| 773 |
+ |
0 , &(args_info->momentum_given), |
| 774 |
+ |
&(local_args_info.momentum_given), optarg, 0, 0, ARG_NO, |
| 775 |
+ |
check_ambiguity, override, 0, 0, |
| 776 |
+ |
"momentum", 'p', |
| 777 |
+ |
additional_error)) |
| 778 |
+ |
goto failure; |
| 779 |
+ |
|
| 780 |
+ |
break; |
| 781 |
|
|
| 782 |
|
case 0: /* Long option with no short option */ |
| 783 |
|
/* select first stuntdouble set. */ |
| 937 |
|
if ( error ) |
| 938 |
|
return (EXIT_FAILURE); |
| 939 |
|
|
| 940 |
+ |
if (optind < argc) |
| 941 |
+ |
{ |
| 942 |
+ |
int i = 0 ; |
| 943 |
+ |
int found_prog_name = 0; |
| 944 |
+ |
/* whether program name, i.e., argv[0], is in the remaining args |
| 945 |
+ |
(this may happen with some implementations of getopt, |
| 946 |
+ |
but surely not with the one included by gengetopt) */ |
| 947 |
+ |
|
| 948 |
+ |
i = optind; |
| 949 |
+ |
while (i < argc) |
| 950 |
+ |
if (argv[i++] == argv[0]) { |
| 951 |
+ |
found_prog_name = 1; |
| 952 |
+ |
break; |
| 953 |
+ |
} |
| 954 |
+ |
i = 0; |
| 955 |
+ |
|
| 956 |
+ |
args_info->inputs_num = argc - optind - found_prog_name; |
| 957 |
+ |
args_info->inputs = |
| 958 |
+ |
(char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; |
| 959 |
+ |
while (optind < argc) |
| 960 |
+ |
if (argv[optind++] != argv[0]) |
| 961 |
+ |
args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; |
| 962 |
+ |
} |
| 963 |
+ |
|
| 964 |
|
return 0; |
| 965 |
|
|
| 966 |
|
failure: |