1 |
|
/* |
2 |
|
File autogenerated by gengetopt version 2.22.4 |
3 |
|
generated with the following command: |
4 |
< |
gengetopt -F DynamicPropsCmd -u |
4 |
> |
gengetopt --file-name=DynamicPropsCmd --unamed-opts |
5 |
|
|
6 |
|
The developers of gengetopt consider the fixed text that goes in all |
7 |
|
gengetopt output files to be in the public domain: |
21 |
|
#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ |
22 |
|
#endif |
23 |
|
|
24 |
+ |
#ifdef WIN32 |
25 |
+ |
#include "utils/wingetopt.h" |
26 |
+ |
#else |
27 |
|
#include <getopt.h> |
28 |
+ |
#endif |
29 |
|
|
30 |
|
#include "DynamicPropsCmd.h" |
31 |
|
|
43 |
|
" --sele1=selection script select first stuntdouble set", |
44 |
|
" --sele2=selection script select second stuntdouble set (if sele2 is not \n set, use script from sele1)", |
45 |
|
" --order=INT Lengendre Polynomial Order", |
46 |
+ |
" -z, --nzbins=INT Number of Z bins (default=`100')", |
47 |
|
" -m, --memory=memory specification\n Available memory (defaults to 2G) \n (default=`2G')", |
48 |
|
"\n Group: dynamicProps\n an option of this group is required", |
49 |
+ |
" -s, --selecorr selection correlation function", |
50 |
|
" -r, --rcorr rmsd", |
51 |
|
" -v, --vcorr velocity correlation function", |
52 |
|
" -d, --dcorr dipole correlation function", |
53 |
|
" -l, --lcorr Lengendre correlation function", |
54 |
< |
" -s, --sdcorr System dipole correlation function", |
54 |
> |
" --lcorrZ Lengendre correlation function binned by Z", |
55 |
> |
" --cohZ Lengendre correlation function for OH bond \n vectors binned by Z", |
56 |
> |
" -M, --sdcorr System dipole correlation function", |
57 |
|
" --r_rcorr Radial rmsd", |
58 |
|
" --thetacorr Angular rmsd", |
59 |
|
" --drcorr Directional rmsd for particles with unit \n vectors", |
93 |
|
args_info->sele1_given = 0 ; |
94 |
|
args_info->sele2_given = 0 ; |
95 |
|
args_info->order_given = 0 ; |
96 |
+ |
args_info->nzbins_given = 0 ; |
97 |
|
args_info->memory_given = 0 ; |
98 |
+ |
args_info->selecorr_given = 0 ; |
99 |
|
args_info->rcorr_given = 0 ; |
100 |
|
args_info->vcorr_given = 0 ; |
101 |
|
args_info->dcorr_given = 0 ; |
102 |
|
args_info->lcorr_given = 0 ; |
103 |
+ |
args_info->lcorrZ_given = 0 ; |
104 |
+ |
args_info->cohZ_given = 0 ; |
105 |
|
args_info->sdcorr_given = 0 ; |
106 |
|
args_info->r_rcorr_given = 0 ; |
107 |
|
args_info->thetacorr_given = 0 ; |
125 |
|
args_info->sele2_arg = NULL; |
126 |
|
args_info->sele2_orig = NULL; |
127 |
|
args_info->order_orig = NULL; |
128 |
+ |
args_info->nzbins_arg = 100; |
129 |
+ |
args_info->nzbins_orig = NULL; |
130 |
|
args_info->memory_arg = gengetopt_strdup ("2G"); |
131 |
|
args_info->memory_orig = NULL; |
132 |
|
|
144 |
|
args_info->sele1_help = gengetopt_args_info_help[4] ; |
145 |
|
args_info->sele2_help = gengetopt_args_info_help[5] ; |
146 |
|
args_info->order_help = gengetopt_args_info_help[6] ; |
147 |
< |
args_info->memory_help = gengetopt_args_info_help[7] ; |
148 |
< |
args_info->rcorr_help = gengetopt_args_info_help[9] ; |
149 |
< |
args_info->vcorr_help = gengetopt_args_info_help[10] ; |
150 |
< |
args_info->dcorr_help = gengetopt_args_info_help[11] ; |
151 |
< |
args_info->lcorr_help = gengetopt_args_info_help[12] ; |
152 |
< |
args_info->sdcorr_help = gengetopt_args_info_help[13] ; |
153 |
< |
args_info->r_rcorr_help = gengetopt_args_info_help[14] ; |
154 |
< |
args_info->thetacorr_help = gengetopt_args_info_help[15] ; |
155 |
< |
args_info->drcorr_help = gengetopt_args_info_help[16] ; |
156 |
< |
args_info->helfandEcorr_help = gengetopt_args_info_help[17] ; |
157 |
< |
args_info->momentum_help = gengetopt_args_info_help[18] ; |
158 |
< |
args_info->stresscorr_help = gengetopt_args_info_help[19] ; |
147 |
> |
args_info->nzbins_help = gengetopt_args_info_help[7] ; |
148 |
> |
args_info->memory_help = gengetopt_args_info_help[8] ; |
149 |
> |
args_info->selecorr_help = gengetopt_args_info_help[10] ; |
150 |
> |
args_info->rcorr_help = gengetopt_args_info_help[11] ; |
151 |
> |
args_info->vcorr_help = gengetopt_args_info_help[12] ; |
152 |
> |
args_info->dcorr_help = gengetopt_args_info_help[13] ; |
153 |
> |
args_info->lcorr_help = gengetopt_args_info_help[14] ; |
154 |
> |
args_info->lcorrZ_help = gengetopt_args_info_help[15] ; |
155 |
> |
args_info->cohZ_help = gengetopt_args_info_help[16] ; |
156 |
> |
args_info->sdcorr_help = gengetopt_args_info_help[17] ; |
157 |
> |
args_info->r_rcorr_help = gengetopt_args_info_help[18] ; |
158 |
> |
args_info->thetacorr_help = gengetopt_args_info_help[19] ; |
159 |
> |
args_info->drcorr_help = gengetopt_args_info_help[20] ; |
160 |
> |
args_info->helfandEcorr_help = gengetopt_args_info_help[21] ; |
161 |
> |
args_info->momentum_help = gengetopt_args_info_help[22] ; |
162 |
> |
args_info->stresscorr_help = gengetopt_args_info_help[23] ; |
163 |
|
|
164 |
|
} |
165 |
|
|
252 |
|
free_string_field (&(args_info->sele2_arg)); |
253 |
|
free_string_field (&(args_info->sele2_orig)); |
254 |
|
free_string_field (&(args_info->order_orig)); |
255 |
+ |
free_string_field (&(args_info->nzbins_orig)); |
256 |
|
free_string_field (&(args_info->memory_arg)); |
257 |
|
free_string_field (&(args_info->memory_orig)); |
258 |
|
|
304 |
|
write_into_file(outfile, "sele2", args_info->sele2_orig, 0); |
305 |
|
if (args_info->order_given) |
306 |
|
write_into_file(outfile, "order", args_info->order_orig, 0); |
307 |
+ |
if (args_info->nzbins_given) |
308 |
+ |
write_into_file(outfile, "nzbins", args_info->nzbins_orig, 0); |
309 |
|
if (args_info->memory_given) |
310 |
|
write_into_file(outfile, "memory", args_info->memory_orig, 0); |
311 |
+ |
if (args_info->selecorr_given) |
312 |
+ |
write_into_file(outfile, "selecorr", 0, 0 ); |
313 |
|
if (args_info->rcorr_given) |
314 |
|
write_into_file(outfile, "rcorr", 0, 0 ); |
315 |
|
if (args_info->vcorr_given) |
318 |
|
write_into_file(outfile, "dcorr", 0, 0 ); |
319 |
|
if (args_info->lcorr_given) |
320 |
|
write_into_file(outfile, "lcorr", 0, 0 ); |
321 |
+ |
if (args_info->lcorrZ_given) |
322 |
+ |
write_into_file(outfile, "lcorrZ", 0, 0 ); |
323 |
+ |
if (args_info->cohZ_given) |
324 |
+ |
write_into_file(outfile, "cohZ", 0, 0 ); |
325 |
|
if (args_info->sdcorr_given) |
326 |
|
write_into_file(outfile, "sdcorr", 0, 0 ); |
327 |
|
if (args_info->r_rcorr_given) |
389 |
|
if (! args_info->dynamicProps_group_counter) |
390 |
|
return; |
391 |
|
|
392 |
+ |
args_info->selecorr_given = 0 ; |
393 |
|
args_info->rcorr_given = 0 ; |
394 |
|
args_info->vcorr_given = 0 ; |
395 |
|
args_info->dcorr_given = 0 ; |
396 |
|
args_info->lcorr_given = 0 ; |
397 |
+ |
args_info->lcorrZ_given = 0 ; |
398 |
+ |
args_info->cohZ_given = 0 ; |
399 |
|
args_info->sdcorr_given = 0 ; |
400 |
|
args_info->r_rcorr_given = 0 ; |
401 |
|
args_info->thetacorr_given = 0 ; |
651 |
|
{ "sele1", 1, NULL, 0 }, |
652 |
|
{ "sele2", 1, NULL, 0 }, |
653 |
|
{ "order", 1, NULL, 0 }, |
654 |
+ |
{ "nzbins", 1, NULL, 'z' }, |
655 |
|
{ "memory", 1, NULL, 'm' }, |
656 |
+ |
{ "selecorr", 0, NULL, 's' }, |
657 |
|
{ "rcorr", 0, NULL, 'r' }, |
658 |
|
{ "vcorr", 0, NULL, 'v' }, |
659 |
|
{ "dcorr", 0, NULL, 'd' }, |
660 |
|
{ "lcorr", 0, NULL, 'l' }, |
661 |
< |
{ "sdcorr", 0, NULL, 's' }, |
661 |
> |
{ "lcorrZ", 0, NULL, 0 }, |
662 |
> |
{ "cohZ", 0, NULL, 0 }, |
663 |
> |
{ "sdcorr", 0, NULL, 'M' }, |
664 |
|
{ "r_rcorr", 0, NULL, 0 }, |
665 |
|
{ "thetacorr", 0, NULL, 0 }, |
666 |
|
{ "drcorr", 0, NULL, 0 }, |
670 |
|
{ 0, 0, 0, 0 } |
671 |
|
}; |
672 |
|
|
673 |
< |
c = getopt_long (argc, argv, "hVi:o:m:rvdlsp", long_options, &option_index); |
673 |
> |
c = getopt_long (argc, argv, "hVi:o:z:m:srvdlMp", long_options, &option_index); |
674 |
|
|
675 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
676 |
|
|
710 |
|
goto failure; |
711 |
|
|
712 |
|
break; |
713 |
+ |
case 'z': /* Number of Z bins. */ |
714 |
+ |
|
715 |
+ |
|
716 |
+ |
if (update_arg( (void *)&(args_info->nzbins_arg), |
717 |
+ |
&(args_info->nzbins_orig), &(args_info->nzbins_given), |
718 |
+ |
&(local_args_info.nzbins_given), optarg, 0, "100", ARG_INT, |
719 |
+ |
check_ambiguity, override, 0, 0, |
720 |
+ |
"nzbins", 'z', |
721 |
+ |
additional_error)) |
722 |
+ |
goto failure; |
723 |
+ |
|
724 |
+ |
break; |
725 |
|
case 'm': /* Available memory (defaults to 2G). */ |
726 |
|
|
727 |
|
|
734 |
|
goto failure; |
735 |
|
|
736 |
|
break; |
737 |
+ |
case 's': /* selection correlation function. */ |
738 |
+ |
|
739 |
+ |
if (args_info->dynamicProps_group_counter && override) |
740 |
+ |
reset_group_dynamicProps (args_info); |
741 |
+ |
args_info->dynamicProps_group_counter += 1; |
742 |
+ |
|
743 |
+ |
if (update_arg( 0 , |
744 |
+ |
0 , &(args_info->selecorr_given), |
745 |
+ |
&(local_args_info.selecorr_given), optarg, 0, 0, ARG_NO, |
746 |
+ |
check_ambiguity, override, 0, 0, |
747 |
+ |
"selecorr", 's', |
748 |
+ |
additional_error)) |
749 |
+ |
goto failure; |
750 |
+ |
|
751 |
+ |
break; |
752 |
|
case 'r': /* rmsd. */ |
753 |
|
|
754 |
|
if (args_info->dynamicProps_group_counter && override) |
809 |
|
goto failure; |
810 |
|
|
811 |
|
break; |
812 |
< |
case 's': /* System dipole correlation function. */ |
812 |
> |
case 'M': /* System dipole correlation function. */ |
813 |
|
|
814 |
|
if (args_info->dynamicProps_group_counter && override) |
815 |
|
reset_group_dynamicProps (args_info); |
819 |
|
0 , &(args_info->sdcorr_given), |
820 |
|
&(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO, |
821 |
|
check_ambiguity, override, 0, 0, |
822 |
< |
"sdcorr", 's', |
822 |
> |
"sdcorr", 'M', |
823 |
|
additional_error)) |
824 |
|
goto failure; |
825 |
|
|
883 |
|
goto failure; |
884 |
|
|
885 |
|
} |
886 |
+ |
/* Lengendre correlation function binned by Z. */ |
887 |
+ |
else if (strcmp (long_options[option_index].name, "lcorrZ") == 0) |
888 |
+ |
{ |
889 |
+ |
|
890 |
+ |
if (args_info->dynamicProps_group_counter && override) |
891 |
+ |
reset_group_dynamicProps (args_info); |
892 |
+ |
args_info->dynamicProps_group_counter += 1; |
893 |
+ |
|
894 |
+ |
if (update_arg( 0 , |
895 |
+ |
0 , &(args_info->lcorrZ_given), |
896 |
+ |
&(local_args_info.lcorrZ_given), optarg, 0, 0, ARG_NO, |
897 |
+ |
check_ambiguity, override, 0, 0, |
898 |
+ |
"lcorrZ", '-', |
899 |
+ |
additional_error)) |
900 |
+ |
goto failure; |
901 |
+ |
|
902 |
+ |
} |
903 |
+ |
/* Lengendre correlation function for OH bond vectors binned by Z. */ |
904 |
+ |
else if (strcmp (long_options[option_index].name, "cohZ") == 0) |
905 |
+ |
{ |
906 |
+ |
|
907 |
+ |
if (args_info->dynamicProps_group_counter && override) |
908 |
+ |
reset_group_dynamicProps (args_info); |
909 |
+ |
args_info->dynamicProps_group_counter += 1; |
910 |
+ |
|
911 |
+ |
if (update_arg( 0 , |
912 |
+ |
0 , &(args_info->cohZ_given), |
913 |
+ |
&(local_args_info.cohZ_given), optarg, 0, 0, ARG_NO, |
914 |
+ |
check_ambiguity, override, 0, 0, |
915 |
+ |
"cohZ", '-', |
916 |
+ |
additional_error)) |
917 |
+ |
goto failure; |
918 |
+ |
|
919 |
+ |
} |
920 |
|
/* Radial rmsd. */ |
921 |
|
else if (strcmp (long_options[option_index].name, "r_rcorr") == 0) |
922 |
|
{ |