36 |
|
" -b, --nbins=INT number of bins (general purpose) \n (default=`100')", |
37 |
|
" -x, --nbins_x=INT number of bins in x axis (default=`100')", |
38 |
|
" -y, --nbins_y=INT number of bins in y axis (default=`100')", |
39 |
+ |
" --nbins_z=INT number of bins in z axis (default=`100')", |
40 |
|
" -a, --nanglebins=INT number of bins for cos(angle) (default=`50')", |
40 |
– |
" --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", |
41 |
|
" -c, --rcut=DOUBLE cutoff radius (rcut)", |
42 |
+ |
" --dz=DOUBLE slab width (dz)", |
43 |
+ |
" --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", |
44 |
+ |
" --zlength=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", |
45 |
|
" -z, --zoffset=DOUBLE Where to set the zero for the slab_density \n calculation (default=`0')", |
46 |
|
" --sele1=selection script select the first stuntdouble set", |
47 |
|
" --sele2=selection script select the second stuntdouble set", |
56 |
|
" --bo bond order parameter (--rcut must be specified)", |
57 |
|
" --bor bond order parameter as a function of radius \n (--rcut must be specified)", |
58 |
|
" --bad N(theta) bond angle density within (--rcut must \n be specified)", |
59 |
+ |
" --count count of molecules matching selection criteria \n (and associated statistics)", |
60 |
|
" -g, --gofr g(r)", |
61 |
|
" --gofz g(z)", |
62 |
|
" --r_theta g(r, cos(theta))", |
63 |
|
" --r_omega g(r, cos(omega))", |
64 |
+ |
" --r_z g(r, z)", |
65 |
|
" --theta_omega g(cos(theta), cos(omega))", |
66 |
|
" --gxyz g(x, y, z)", |
67 |
+ |
" --twodgofr 2D g(r) (Slab width --dz must be specified)", |
68 |
|
" -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)", |
69 |
|
" --rp2 rp2 order parameter (--sele1 and --sele2 must \n be specified)", |
70 |
|
" -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)", |
109 |
|
args_info->nbins_given = 0 ; |
110 |
|
args_info->nbins_x_given = 0 ; |
111 |
|
args_info->nbins_y_given = 0 ; |
112 |
+ |
args_info->nbins_z_given = 0 ; |
113 |
|
args_info->nanglebins_given = 0 ; |
107 |
– |
args_info->length_given = 0 ; |
114 |
|
args_info->rcut_given = 0 ; |
115 |
+ |
args_info->dz_given = 0 ; |
116 |
+ |
args_info->length_given = 0 ; |
117 |
+ |
args_info->zlength_given = 0 ; |
118 |
|
args_info->zoffset_given = 0 ; |
119 |
|
args_info->sele1_given = 0 ; |
120 |
|
args_info->sele2_given = 0 ; |
128 |
|
args_info->bo_given = 0 ; |
129 |
|
args_info->bor_given = 0 ; |
130 |
|
args_info->bad_given = 0 ; |
131 |
+ |
args_info->count_given = 0 ; |
132 |
|
args_info->gofr_given = 0 ; |
133 |
|
args_info->gofz_given = 0 ; |
134 |
|
args_info->r_theta_given = 0 ; |
135 |
|
args_info->r_omega_given = 0 ; |
136 |
+ |
args_info->r_z_given = 0 ; |
137 |
|
args_info->theta_omega_given = 0 ; |
138 |
|
args_info->gxyz_given = 0 ; |
139 |
+ |
args_info->twodgofr_given = 0 ; |
140 |
|
args_info->p2_given = 0 ; |
141 |
|
args_info->rp2_given = 0 ; |
142 |
|
args_info->scd_given = 0 ; |
164 |
|
args_info->nbins_x_orig = NULL; |
165 |
|
args_info->nbins_y_arg = 100; |
166 |
|
args_info->nbins_y_orig = NULL; |
167 |
+ |
args_info->nbins_z_arg = 100; |
168 |
+ |
args_info->nbins_z_orig = NULL; |
169 |
|
args_info->nanglebins_arg = 50; |
170 |
|
args_info->nanglebins_orig = NULL; |
157 |
– |
args_info->length_orig = NULL; |
171 |
|
args_info->rcut_orig = NULL; |
172 |
+ |
args_info->dz_orig = NULL; |
173 |
+ |
args_info->length_orig = NULL; |
174 |
+ |
args_info->zlength_orig = NULL; |
175 |
|
args_info->zoffset_arg = 0; |
176 |
|
args_info->zoffset_orig = NULL; |
177 |
|
args_info->sele1_arg = NULL; |
205 |
|
args_info->nbins_help = gengetopt_args_info_help[5] ; |
206 |
|
args_info->nbins_x_help = gengetopt_args_info_help[6] ; |
207 |
|
args_info->nbins_y_help = gengetopt_args_info_help[7] ; |
208 |
< |
args_info->nanglebins_help = gengetopt_args_info_help[8] ; |
209 |
< |
args_info->length_help = gengetopt_args_info_help[9] ; |
208 |
> |
args_info->nbins_z_help = gengetopt_args_info_help[8] ; |
209 |
> |
args_info->nanglebins_help = gengetopt_args_info_help[9] ; |
210 |
|
args_info->rcut_help = gengetopt_args_info_help[10] ; |
211 |
< |
args_info->zoffset_help = gengetopt_args_info_help[11] ; |
212 |
< |
args_info->sele1_help = gengetopt_args_info_help[12] ; |
213 |
< |
args_info->sele2_help = gengetopt_args_info_help[13] ; |
214 |
< |
args_info->sele3_help = gengetopt_args_info_help[14] ; |
215 |
< |
args_info->refsele_help = gengetopt_args_info_help[15] ; |
216 |
< |
args_info->comsele_help = gengetopt_args_info_help[16] ; |
217 |
< |
args_info->molname_help = gengetopt_args_info_help[17] ; |
218 |
< |
args_info->begin_help = gengetopt_args_info_help[18] ; |
219 |
< |
args_info->end_help = gengetopt_args_info_help[19] ; |
220 |
< |
args_info->radius_help = gengetopt_args_info_help[20] ; |
221 |
< |
args_info->bo_help = gengetopt_args_info_help[22] ; |
222 |
< |
args_info->bor_help = gengetopt_args_info_help[23] ; |
223 |
< |
args_info->bad_help = gengetopt_args_info_help[24] ; |
224 |
< |
args_info->gofr_help = gengetopt_args_info_help[25] ; |
225 |
< |
args_info->gofz_help = gengetopt_args_info_help[26] ; |
226 |
< |
args_info->r_theta_help = gengetopt_args_info_help[27] ; |
227 |
< |
args_info->r_omega_help = gengetopt_args_info_help[28] ; |
228 |
< |
args_info->theta_omega_help = gengetopt_args_info_help[29] ; |
229 |
< |
args_info->gxyz_help = gengetopt_args_info_help[30] ; |
230 |
< |
args_info->p2_help = gengetopt_args_info_help[31] ; |
231 |
< |
args_info->rp2_help = gengetopt_args_info_help[32] ; |
232 |
< |
args_info->scd_help = gengetopt_args_info_help[33] ; |
233 |
< |
args_info->density_help = gengetopt_args_info_help[34] ; |
234 |
< |
args_info->slab_density_help = gengetopt_args_info_help[35] ; |
235 |
< |
args_info->p_angle_help = gengetopt_args_info_help[36] ; |
236 |
< |
args_info->hxy_help = gengetopt_args_info_help[37] ; |
237 |
< |
args_info->rho_r_help = gengetopt_args_info_help[38] ; |
238 |
< |
args_info->hullvol_help = gengetopt_args_info_help[39] ; |
211 |
> |
args_info->dz_help = gengetopt_args_info_help[11] ; |
212 |
> |
args_info->length_help = gengetopt_args_info_help[12] ; |
213 |
> |
args_info->zlength_help = gengetopt_args_info_help[13] ; |
214 |
> |
args_info->zoffset_help = gengetopt_args_info_help[14] ; |
215 |
> |
args_info->sele1_help = gengetopt_args_info_help[15] ; |
216 |
> |
args_info->sele2_help = gengetopt_args_info_help[16] ; |
217 |
> |
args_info->sele3_help = gengetopt_args_info_help[17] ; |
218 |
> |
args_info->refsele_help = gengetopt_args_info_help[18] ; |
219 |
> |
args_info->comsele_help = gengetopt_args_info_help[19] ; |
220 |
> |
args_info->molname_help = gengetopt_args_info_help[20] ; |
221 |
> |
args_info->begin_help = gengetopt_args_info_help[21] ; |
222 |
> |
args_info->end_help = gengetopt_args_info_help[22] ; |
223 |
> |
args_info->radius_help = gengetopt_args_info_help[23] ; |
224 |
> |
args_info->bo_help = gengetopt_args_info_help[25] ; |
225 |
> |
args_info->bor_help = gengetopt_args_info_help[26] ; |
226 |
> |
args_info->bad_help = gengetopt_args_info_help[27] ; |
227 |
> |
args_info->count_help = gengetopt_args_info_help[28] ; |
228 |
> |
args_info->gofr_help = gengetopt_args_info_help[29] ; |
229 |
> |
args_info->gofz_help = gengetopt_args_info_help[30] ; |
230 |
> |
args_info->r_theta_help = gengetopt_args_info_help[31] ; |
231 |
> |
args_info->r_omega_help = gengetopt_args_info_help[32] ; |
232 |
> |
args_info->r_z_help = gengetopt_args_info_help[33] ; |
233 |
> |
args_info->theta_omega_help = gengetopt_args_info_help[34] ; |
234 |
> |
args_info->gxyz_help = gengetopt_args_info_help[35] ; |
235 |
> |
args_info->twodgofr_help = gengetopt_args_info_help[36] ; |
236 |
> |
args_info->p2_help = gengetopt_args_info_help[37] ; |
237 |
> |
args_info->rp2_help = gengetopt_args_info_help[38] ; |
238 |
> |
args_info->scd_help = gengetopt_args_info_help[39] ; |
239 |
> |
args_info->density_help = gengetopt_args_info_help[40] ; |
240 |
> |
args_info->slab_density_help = gengetopt_args_info_help[41] ; |
241 |
> |
args_info->p_angle_help = gengetopt_args_info_help[42] ; |
242 |
> |
args_info->hxy_help = gengetopt_args_info_help[43] ; |
243 |
> |
args_info->rho_r_help = gengetopt_args_info_help[44] ; |
244 |
> |
args_info->hullvol_help = gengetopt_args_info_help[45] ; |
245 |
|
|
246 |
|
} |
247 |
|
|
331 |
|
free_string_field (&(args_info->nbins_orig)); |
332 |
|
free_string_field (&(args_info->nbins_x_orig)); |
333 |
|
free_string_field (&(args_info->nbins_y_orig)); |
334 |
+ |
free_string_field (&(args_info->nbins_z_orig)); |
335 |
|
free_string_field (&(args_info->nanglebins_orig)); |
313 |
– |
free_string_field (&(args_info->length_orig)); |
336 |
|
free_string_field (&(args_info->rcut_orig)); |
337 |
+ |
free_string_field (&(args_info->dz_orig)); |
338 |
+ |
free_string_field (&(args_info->length_orig)); |
339 |
+ |
free_string_field (&(args_info->zlength_orig)); |
340 |
|
free_string_field (&(args_info->zoffset_orig)); |
341 |
|
free_string_field (&(args_info->sele1_arg)); |
342 |
|
free_string_field (&(args_info->sele1_orig)); |
403 |
|
write_into_file(outfile, "nbins_x", args_info->nbins_x_orig, 0); |
404 |
|
if (args_info->nbins_y_given) |
405 |
|
write_into_file(outfile, "nbins_y", args_info->nbins_y_orig, 0); |
406 |
+ |
if (args_info->nbins_z_given) |
407 |
+ |
write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0); |
408 |
|
if (args_info->nanglebins_given) |
409 |
|
write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0); |
383 |
– |
if (args_info->length_given) |
384 |
– |
write_into_file(outfile, "length", args_info->length_orig, 0); |
410 |
|
if (args_info->rcut_given) |
411 |
|
write_into_file(outfile, "rcut", args_info->rcut_orig, 0); |
412 |
+ |
if (args_info->dz_given) |
413 |
+ |
write_into_file(outfile, "dz", args_info->dz_orig, 0); |
414 |
+ |
if (args_info->length_given) |
415 |
+ |
write_into_file(outfile, "length", args_info->length_orig, 0); |
416 |
+ |
if (args_info->zlength_given) |
417 |
+ |
write_into_file(outfile, "zlength", args_info->zlength_orig, 0); |
418 |
|
if (args_info->zoffset_given) |
419 |
|
write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0); |
420 |
|
if (args_info->sele1_given) |
441 |
|
write_into_file(outfile, "bor", 0, 0 ); |
442 |
|
if (args_info->bad_given) |
443 |
|
write_into_file(outfile, "bad", 0, 0 ); |
444 |
+ |
if (args_info->count_given) |
445 |
+ |
write_into_file(outfile, "count", 0, 0 ); |
446 |
|
if (args_info->gofr_given) |
447 |
|
write_into_file(outfile, "gofr", 0, 0 ); |
448 |
|
if (args_info->gofz_given) |
451 |
|
write_into_file(outfile, "r_theta", 0, 0 ); |
452 |
|
if (args_info->r_omega_given) |
453 |
|
write_into_file(outfile, "r_omega", 0, 0 ); |
454 |
+ |
if (args_info->r_z_given) |
455 |
+ |
write_into_file(outfile, "r_z", 0, 0 ); |
456 |
|
if (args_info->theta_omega_given) |
457 |
|
write_into_file(outfile, "theta_omega", 0, 0 ); |
458 |
|
if (args_info->gxyz_given) |
459 |
|
write_into_file(outfile, "gxyz", 0, 0 ); |
460 |
+ |
if (args_info->twodgofr_given) |
461 |
+ |
write_into_file(outfile, "twodgofr", 0, 0 ); |
462 |
|
if (args_info->p2_given) |
463 |
|
write_into_file(outfile, "p2", 0, 0 ); |
464 |
|
if (args_info->rp2_given) |
533 |
|
args_info->bo_given = 0 ; |
534 |
|
args_info->bor_given = 0 ; |
535 |
|
args_info->bad_given = 0 ; |
536 |
+ |
args_info->count_given = 0 ; |
537 |
|
args_info->gofr_given = 0 ; |
538 |
|
args_info->gofz_given = 0 ; |
539 |
|
args_info->r_theta_given = 0 ; |
540 |
|
args_info->r_omega_given = 0 ; |
541 |
+ |
args_info->r_z_given = 0 ; |
542 |
|
args_info->theta_omega_given = 0 ; |
543 |
|
args_info->gxyz_given = 0 ; |
544 |
+ |
args_info->twodgofr_given = 0 ; |
545 |
|
args_info->p2_given = 0 ; |
546 |
|
args_info->rp2_given = 0 ; |
547 |
|
args_info->scd_given = 0 ; |
799 |
|
{ "nbins", 1, NULL, 'b' }, |
800 |
|
{ "nbins_x", 1, NULL, 'x' }, |
801 |
|
{ "nbins_y", 1, NULL, 'y' }, |
802 |
+ |
{ "nbins_z", 1, NULL, 0 }, |
803 |
|
{ "nanglebins", 1, NULL, 'a' }, |
763 |
– |
{ "length", 1, NULL, 0 }, |
804 |
|
{ "rcut", 1, NULL, 'c' }, |
805 |
+ |
{ "dz", 1, NULL, 0 }, |
806 |
+ |
{ "length", 1, NULL, 0 }, |
807 |
+ |
{ "zlength", 1, NULL, 0 }, |
808 |
|
{ "zoffset", 1, NULL, 'z' }, |
809 |
|
{ "sele1", 1, NULL, 0 }, |
810 |
|
{ "sele2", 1, NULL, 0 }, |
818 |
|
{ "bo", 0, NULL, 0 }, |
819 |
|
{ "bor", 0, NULL, 0 }, |
820 |
|
{ "bad", 0, NULL, 0 }, |
821 |
+ |
{ "count", 0, NULL, 0 }, |
822 |
|
{ "gofr", 0, NULL, 'g' }, |
823 |
|
{ "gofz", 0, NULL, 0 }, |
824 |
|
{ "r_theta", 0, NULL, 0 }, |
825 |
|
{ "r_omega", 0, NULL, 0 }, |
826 |
+ |
{ "r_z", 0, NULL, 0 }, |
827 |
|
{ "theta_omega", 0, NULL, 0 }, |
828 |
|
{ "gxyz", 0, NULL, 0 }, |
829 |
+ |
{ "twodgofr", 0, NULL, 0 }, |
830 |
|
{ "p2", 0, NULL, 'p' }, |
831 |
|
{ "rp2", 0, NULL, 0 }, |
832 |
|
{ "scd", 0, NULL, 's' }, |
1025 |
|
break; |
1026 |
|
|
1027 |
|
case 0: /* Long option with no short option */ |
1028 |
+ |
/* number of bins in z axis. */ |
1029 |
+ |
if (strcmp (long_options[option_index].name, "nbins_z") == 0) |
1030 |
+ |
{ |
1031 |
+ |
|
1032 |
+ |
|
1033 |
+ |
if (update_arg( (void *)&(args_info->nbins_z_arg), |
1034 |
+ |
&(args_info->nbins_z_orig), &(args_info->nbins_z_given), |
1035 |
+ |
&(local_args_info.nbins_z_given), optarg, 0, "100", ARG_INT, |
1036 |
+ |
check_ambiguity, override, 0, 0, |
1037 |
+ |
"nbins_z", '-', |
1038 |
+ |
additional_error)) |
1039 |
+ |
goto failure; |
1040 |
+ |
|
1041 |
+ |
} |
1042 |
+ |
/* slab width (dz). */ |
1043 |
+ |
else if (strcmp (long_options[option_index].name, "dz") == 0) |
1044 |
+ |
{ |
1045 |
+ |
|
1046 |
+ |
|
1047 |
+ |
if (update_arg( (void *)&(args_info->dz_arg), |
1048 |
+ |
&(args_info->dz_orig), &(args_info->dz_given), |
1049 |
+ |
&(local_args_info.dz_given), optarg, 0, 0, ARG_DOUBLE, |
1050 |
+ |
check_ambiguity, override, 0, 0, |
1051 |
+ |
"dz", '-', |
1052 |
+ |
additional_error)) |
1053 |
+ |
goto failure; |
1054 |
+ |
|
1055 |
+ |
} |
1056 |
|
/* maximum length (Defaults to 1/2 smallest length of first frame). */ |
1057 |
< |
if (strcmp (long_options[option_index].name, "length") == 0) |
1057 |
> |
else if (strcmp (long_options[option_index].name, "length") == 0) |
1058 |
|
{ |
1059 |
|
|
1060 |
|
|
1067 |
|
goto failure; |
1068 |
|
|
1069 |
|
} |
1070 |
+ |
/* maximum length (Defaults to 1/2 smallest length of first frame). */ |
1071 |
+ |
else if (strcmp (long_options[option_index].name, "zlength") == 0) |
1072 |
+ |
{ |
1073 |
+ |
|
1074 |
+ |
|
1075 |
+ |
if (update_arg( (void *)&(args_info->zlength_arg), |
1076 |
+ |
&(args_info->zlength_orig), &(args_info->zlength_given), |
1077 |
+ |
&(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE, |
1078 |
+ |
check_ambiguity, override, 0, 0, |
1079 |
+ |
"zlength", '-', |
1080 |
+ |
additional_error)) |
1081 |
+ |
goto failure; |
1082 |
+ |
|
1083 |
+ |
} |
1084 |
|
/* select the first stuntdouble set. */ |
1085 |
|
else if (strcmp (long_options[option_index].name, "sele1") == 0) |
1086 |
|
{ |
1258 |
|
goto failure; |
1259 |
|
|
1260 |
|
} |
1261 |
+ |
/* count of molecules matching selection criteria (and associated statistics). */ |
1262 |
+ |
else if (strcmp (long_options[option_index].name, "count") == 0) |
1263 |
+ |
{ |
1264 |
+ |
|
1265 |
+ |
if (args_info->staticProps_group_counter && override) |
1266 |
+ |
reset_group_staticProps (args_info); |
1267 |
+ |
args_info->staticProps_group_counter += 1; |
1268 |
+ |
|
1269 |
+ |
if (update_arg( 0 , |
1270 |
+ |
0 , &(args_info->count_given), |
1271 |
+ |
&(local_args_info.count_given), optarg, 0, 0, ARG_NO, |
1272 |
+ |
check_ambiguity, override, 0, 0, |
1273 |
+ |
"count", '-', |
1274 |
+ |
additional_error)) |
1275 |
+ |
goto failure; |
1276 |
+ |
|
1277 |
+ |
} |
1278 |
|
/* g(z). */ |
1279 |
|
else if (strcmp (long_options[option_index].name, "gofz") == 0) |
1280 |
|
{ |
1326 |
|
goto failure; |
1327 |
|
|
1328 |
|
} |
1329 |
+ |
/* g(r, z). */ |
1330 |
+ |
else if (strcmp (long_options[option_index].name, "r_z") == 0) |
1331 |
+ |
{ |
1332 |
+ |
|
1333 |
+ |
if (args_info->staticProps_group_counter && override) |
1334 |
+ |
reset_group_staticProps (args_info); |
1335 |
+ |
args_info->staticProps_group_counter += 1; |
1336 |
+ |
|
1337 |
+ |
if (update_arg( 0 , |
1338 |
+ |
0 , &(args_info->r_z_given), |
1339 |
+ |
&(local_args_info.r_z_given), optarg, 0, 0, ARG_NO, |
1340 |
+ |
check_ambiguity, override, 0, 0, |
1341 |
+ |
"r_z", '-', |
1342 |
+ |
additional_error)) |
1343 |
+ |
goto failure; |
1344 |
+ |
|
1345 |
+ |
} |
1346 |
|
/* g(cos(theta), cos(omega)). */ |
1347 |
|
else if (strcmp (long_options[option_index].name, "theta_omega") == 0) |
1348 |
|
{ |
1377 |
|
goto failure; |
1378 |
|
|
1379 |
|
} |
1380 |
+ |
/* 2D g(r) (Slab width --dz must be specified). */ |
1381 |
+ |
else if (strcmp (long_options[option_index].name, "twodgofr") == 0) |
1382 |
+ |
{ |
1383 |
+ |
|
1384 |
+ |
if (args_info->staticProps_group_counter && override) |
1385 |
+ |
reset_group_staticProps (args_info); |
1386 |
+ |
args_info->staticProps_group_counter += 1; |
1387 |
+ |
|
1388 |
+ |
if (update_arg( 0 , |
1389 |
+ |
0 , &(args_info->twodgofr_given), |
1390 |
+ |
&(local_args_info.twodgofr_given), optarg, 0, 0, ARG_NO, |
1391 |
+ |
check_ambiguity, override, 0, 0, |
1392 |
+ |
"twodgofr", '-', |
1393 |
+ |
additional_error)) |
1394 |
+ |
goto failure; |
1395 |
+ |
|
1396 |
+ |
} |
1397 |
|
/* rp2 order parameter (--sele1 and --sele2 must be specified). */ |
1398 |
|
else if (strcmp (long_options[option_index].name, "rp2") == 0) |
1399 |
|
{ |