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 |
|
|
52 |
|
" -d, --dcorr dipole correlation function", |
53 |
|
" -l, --lcorr Lengendre 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", |
60 |
|
" --helfandEcorr Helfand moment for thermal conductvity", |
61 |
|
" -p, --momentum Helfand momentum for viscosity", |
62 |
|
" --stresscorr Stress tensor correlation function", |
63 |
+ |
" -b, --bondcorr Bond extension correlation function", |
64 |
+ |
" -f, --freqfluccorr Frequency Fluctuation correlation function", |
65 |
|
0 |
66 |
|
}; |
67 |
|
|
103 |
|
args_info->dcorr_given = 0 ; |
104 |
|
args_info->lcorr_given = 0 ; |
105 |
|
args_info->lcorrZ_given = 0 ; |
106 |
+ |
args_info->cohZ_given = 0 ; |
107 |
|
args_info->sdcorr_given = 0 ; |
108 |
|
args_info->r_rcorr_given = 0 ; |
109 |
|
args_info->thetacorr_given = 0 ; |
111 |
|
args_info->helfandEcorr_given = 0 ; |
112 |
|
args_info->momentum_given = 0 ; |
113 |
|
args_info->stresscorr_given = 0 ; |
114 |
+ |
args_info->bondcorr_given = 0 ; |
115 |
+ |
args_info->freqfluccorr_given = 0 ; |
116 |
|
args_info->dynamicProps_group_counter = 0 ; |
117 |
|
} |
118 |
|
|
156 |
|
args_info->dcorr_help = gengetopt_args_info_help[13] ; |
157 |
|
args_info->lcorr_help = gengetopt_args_info_help[14] ; |
158 |
|
args_info->lcorrZ_help = gengetopt_args_info_help[15] ; |
159 |
< |
args_info->sdcorr_help = gengetopt_args_info_help[16] ; |
160 |
< |
args_info->r_rcorr_help = gengetopt_args_info_help[17] ; |
161 |
< |
args_info->thetacorr_help = gengetopt_args_info_help[18] ; |
162 |
< |
args_info->drcorr_help = gengetopt_args_info_help[19] ; |
163 |
< |
args_info->helfandEcorr_help = gengetopt_args_info_help[20] ; |
164 |
< |
args_info->momentum_help = gengetopt_args_info_help[21] ; |
165 |
< |
args_info->stresscorr_help = gengetopt_args_info_help[22] ; |
159 |
> |
args_info->cohZ_help = gengetopt_args_info_help[16] ; |
160 |
> |
args_info->sdcorr_help = gengetopt_args_info_help[17] ; |
161 |
> |
args_info->r_rcorr_help = gengetopt_args_info_help[18] ; |
162 |
> |
args_info->thetacorr_help = gengetopt_args_info_help[19] ; |
163 |
> |
args_info->drcorr_help = gengetopt_args_info_help[20] ; |
164 |
> |
args_info->helfandEcorr_help = gengetopt_args_info_help[21] ; |
165 |
> |
args_info->momentum_help = gengetopt_args_info_help[22] ; |
166 |
> |
args_info->stresscorr_help = gengetopt_args_info_help[23] ; |
167 |
> |
args_info->bondcorr_help = gengetopt_args_info_help[24] ; |
168 |
> |
args_info->freqfluccorr_help = gengetopt_args_info_help[25] ; |
169 |
|
|
170 |
|
} |
171 |
|
|
326 |
|
write_into_file(outfile, "lcorr", 0, 0 ); |
327 |
|
if (args_info->lcorrZ_given) |
328 |
|
write_into_file(outfile, "lcorrZ", 0, 0 ); |
329 |
+ |
if (args_info->cohZ_given) |
330 |
+ |
write_into_file(outfile, "cohZ", 0, 0 ); |
331 |
|
if (args_info->sdcorr_given) |
332 |
|
write_into_file(outfile, "sdcorr", 0, 0 ); |
333 |
|
if (args_info->r_rcorr_given) |
342 |
|
write_into_file(outfile, "momentum", 0, 0 ); |
343 |
|
if (args_info->stresscorr_given) |
344 |
|
write_into_file(outfile, "stresscorr", 0, 0 ); |
345 |
+ |
if (args_info->bondcorr_given) |
346 |
+ |
write_into_file(outfile, "bondcorr", 0, 0 ); |
347 |
+ |
if (args_info->freqfluccorr_given) |
348 |
+ |
write_into_file(outfile, "freqfluccorr", 0, 0 ); |
349 |
|
|
350 |
|
|
351 |
|
i = EXIT_SUCCESS; |
405 |
|
args_info->dcorr_given = 0 ; |
406 |
|
args_info->lcorr_given = 0 ; |
407 |
|
args_info->lcorrZ_given = 0 ; |
408 |
+ |
args_info->cohZ_given = 0 ; |
409 |
|
args_info->sdcorr_given = 0 ; |
410 |
|
args_info->r_rcorr_given = 0 ; |
411 |
|
args_info->thetacorr_given = 0 ; |
413 |
|
args_info->helfandEcorr_given = 0 ; |
414 |
|
args_info->momentum_given = 0 ; |
415 |
|
args_info->stresscorr_given = 0 ; |
416 |
+ |
args_info->bondcorr_given = 0 ; |
417 |
+ |
args_info->freqfluccorr_given = 0 ; |
418 |
|
|
419 |
|
args_info->dynamicProps_group_counter = 0; |
420 |
|
} |
671 |
|
{ "dcorr", 0, NULL, 'd' }, |
672 |
|
{ "lcorr", 0, NULL, 'l' }, |
673 |
|
{ "lcorrZ", 0, NULL, 0 }, |
674 |
+ |
{ "cohZ", 0, NULL, 0 }, |
675 |
|
{ "sdcorr", 0, NULL, 'M' }, |
676 |
|
{ "r_rcorr", 0, NULL, 0 }, |
677 |
|
{ "thetacorr", 0, NULL, 0 }, |
679 |
|
{ "helfandEcorr", 0, NULL, 0 }, |
680 |
|
{ "momentum", 0, NULL, 'p' }, |
681 |
|
{ "stresscorr", 0, NULL, 0 }, |
682 |
+ |
{ "bondcorr", 0, NULL, 'b' }, |
683 |
+ |
{ "freqfluccorr", 0, NULL, 'f' }, |
684 |
|
{ 0, 0, 0, 0 } |
685 |
|
}; |
686 |
|
|
687 |
< |
c = getopt_long (argc, argv, "hVi:o:z:m:srvdlMp", long_options, &option_index); |
687 |
> |
c = getopt_long (argc, argv, "hVi:o:z:m:srvdlMpbf", long_options, &option_index); |
688 |
|
|
689 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
690 |
|
|
849 |
|
&(local_args_info.momentum_given), optarg, 0, 0, ARG_NO, |
850 |
|
check_ambiguity, override, 0, 0, |
851 |
|
"momentum", 'p', |
852 |
+ |
additional_error)) |
853 |
+ |
goto failure; |
854 |
+ |
|
855 |
+ |
break; |
856 |
+ |
case 'b': /* Bond extension correlation function. */ |
857 |
+ |
|
858 |
+ |
if (args_info->dynamicProps_group_counter && override) |
859 |
+ |
reset_group_dynamicProps (args_info); |
860 |
+ |
args_info->dynamicProps_group_counter += 1; |
861 |
+ |
|
862 |
+ |
if (update_arg( 0 , |
863 |
+ |
0 , &(args_info->bondcorr_given), |
864 |
+ |
&(local_args_info.bondcorr_given), optarg, 0, 0, ARG_NO, |
865 |
+ |
check_ambiguity, override, 0, 0, |
866 |
+ |
"bondcorr", 'b', |
867 |
|
additional_error)) |
868 |
|
goto failure; |
869 |
|
|
870 |
|
break; |
871 |
+ |
case 'f': /* Frequency Fluctuation correlation function. */ |
872 |
+ |
|
873 |
+ |
if (args_info->dynamicProps_group_counter && override) |
874 |
+ |
reset_group_dynamicProps (args_info); |
875 |
+ |
args_info->dynamicProps_group_counter += 1; |
876 |
+ |
|
877 |
+ |
if (update_arg( 0 , |
878 |
+ |
0 , &(args_info->freqfluccorr_given), |
879 |
+ |
&(local_args_info.freqfluccorr_given), optarg, 0, 0, ARG_NO, |
880 |
+ |
check_ambiguity, override, 0, 0, |
881 |
+ |
"freqfluccorr", 'f', |
882 |
+ |
additional_error)) |
883 |
+ |
goto failure; |
884 |
+ |
|
885 |
+ |
break; |
886 |
|
|
887 |
|
case 0: /* Long option with no short option */ |
888 |
|
/* select first stuntdouble set. */ |
944 |
|
goto failure; |
945 |
|
|
946 |
|
} |
947 |
+ |
/* Lengendre correlation function for OH bond vectors binned by Z. */ |
948 |
+ |
else if (strcmp (long_options[option_index].name, "cohZ") == 0) |
949 |
+ |
{ |
950 |
+ |
|
951 |
+ |
if (args_info->dynamicProps_group_counter && override) |
952 |
+ |
reset_group_dynamicProps (args_info); |
953 |
+ |
args_info->dynamicProps_group_counter += 1; |
954 |
+ |
|
955 |
+ |
if (update_arg( 0 , |
956 |
+ |
0 , &(args_info->cohZ_given), |
957 |
+ |
&(local_args_info.cohZ_given), optarg, 0, 0, ARG_NO, |
958 |
+ |
check_ambiguity, override, 0, 0, |
959 |
+ |
"cohZ", '-', |
960 |
+ |
additional_error)) |
961 |
+ |
goto failure; |
962 |
+ |
|
963 |
+ |
} |
964 |
|
/* Radial rmsd. */ |
965 |
|
else if (strcmp (long_options[option_index].name, "r_rcorr") == 0) |
966 |
|
{ |