| 1 |
|
/* |
| 2 |
|
File autogenerated by gengetopt version 2.22 |
| 3 |
|
generated with the following command: |
| 4 |
< |
gengetopt -F StaticPropsCmd -u |
| 4 |
> |
gengetopt -F StaticPropsCmd |
| 5 |
|
|
| 6 |
|
The developers of gengetopt consider the fixed text that goes in all |
| 7 |
|
gengetopt output files to be in the public domain: |
| 23 |
|
|
| 24 |
|
const char *gengetopt_args_info_purpose = ""; |
| 25 |
|
|
| 26 |
< |
const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]... [FILES]..."; |
| 26 |
> |
const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]..."; |
| 27 |
|
|
| 28 |
|
const char *gengetopt_args_info_description = ""; |
| 29 |
|
|
| 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 |
+ |
" --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", |
| 43 |
+ |
" --zlength=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", |
| 44 |
|
" -z, --zoffset=DOUBLE Where to set the zero for the slab_density \n calculation (default=`0')", |
| 45 |
|
" --sele1=selection script select the first stuntdouble set", |
| 46 |
|
" --sele2=selection script select the second stuntdouble set", |
| 59 |
|
" --gofz g(z)", |
| 60 |
|
" --r_theta g(r, cos(theta))", |
| 61 |
|
" --r_omega g(r, cos(omega))", |
| 62 |
+ |
" --r_z g(r, z)", |
| 63 |
|
" --theta_omega g(cos(theta), cos(omega))", |
| 64 |
|
" --gxyz g(x, y, z)", |
| 65 |
|
" -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)", |
| 106 |
|
args_info->nbins_given = 0 ; |
| 107 |
|
args_info->nbins_x_given = 0 ; |
| 108 |
|
args_info->nbins_y_given = 0 ; |
| 109 |
+ |
args_info->nbins_z_given = 0 ; |
| 110 |
|
args_info->nanglebins_given = 0 ; |
| 107 |
– |
args_info->length_given = 0 ; |
| 111 |
|
args_info->rcut_given = 0 ; |
| 112 |
+ |
args_info->length_given = 0 ; |
| 113 |
+ |
args_info->zlength_given = 0 ; |
| 114 |
|
args_info->zoffset_given = 0 ; |
| 115 |
|
args_info->sele1_given = 0 ; |
| 116 |
|
args_info->sele2_given = 0 ; |
| 128 |
|
args_info->gofz_given = 0 ; |
| 129 |
|
args_info->r_theta_given = 0 ; |
| 130 |
|
args_info->r_omega_given = 0 ; |
| 131 |
+ |
args_info->r_z_given = 0 ; |
| 132 |
|
args_info->theta_omega_given = 0 ; |
| 133 |
|
args_info->gxyz_given = 0 ; |
| 134 |
|
args_info->p2_given = 0 ; |
| 158 |
|
args_info->nbins_x_orig = NULL; |
| 159 |
|
args_info->nbins_y_arg = 100; |
| 160 |
|
args_info->nbins_y_orig = NULL; |
| 161 |
+ |
args_info->nbins_z_arg = 100; |
| 162 |
+ |
args_info->nbins_z_orig = NULL; |
| 163 |
|
args_info->nanglebins_arg = 50; |
| 164 |
|
args_info->nanglebins_orig = NULL; |
| 157 |
– |
args_info->length_orig = NULL; |
| 165 |
|
args_info->rcut_orig = NULL; |
| 166 |
+ |
args_info->length_orig = NULL; |
| 167 |
+ |
args_info->zlength_orig = NULL; |
| 168 |
|
args_info->zoffset_arg = 0; |
| 169 |
|
args_info->zoffset_orig = NULL; |
| 170 |
|
args_info->sele1_arg = NULL; |
| 198 |
|
args_info->nbins_help = gengetopt_args_info_help[5] ; |
| 199 |
|
args_info->nbins_x_help = gengetopt_args_info_help[6] ; |
| 200 |
|
args_info->nbins_y_help = gengetopt_args_info_help[7] ; |
| 201 |
< |
args_info->nanglebins_help = gengetopt_args_info_help[8] ; |
| 202 |
< |
args_info->length_help = gengetopt_args_info_help[9] ; |
| 201 |
> |
args_info->nbins_z_help = gengetopt_args_info_help[8] ; |
| 202 |
> |
args_info->nanglebins_help = gengetopt_args_info_help[9] ; |
| 203 |
|
args_info->rcut_help = gengetopt_args_info_help[10] ; |
| 204 |
< |
args_info->zoffset_help = gengetopt_args_info_help[11] ; |
| 205 |
< |
args_info->sele1_help = gengetopt_args_info_help[12] ; |
| 206 |
< |
args_info->sele2_help = gengetopt_args_info_help[13] ; |
| 207 |
< |
args_info->sele3_help = gengetopt_args_info_help[14] ; |
| 208 |
< |
args_info->refsele_help = gengetopt_args_info_help[15] ; |
| 209 |
< |
args_info->comsele_help = gengetopt_args_info_help[16] ; |
| 210 |
< |
args_info->molname_help = gengetopt_args_info_help[17] ; |
| 211 |
< |
args_info->begin_help = gengetopt_args_info_help[18] ; |
| 212 |
< |
args_info->end_help = gengetopt_args_info_help[19] ; |
| 213 |
< |
args_info->radius_help = gengetopt_args_info_help[20] ; |
| 214 |
< |
args_info->bo_help = gengetopt_args_info_help[22] ; |
| 215 |
< |
args_info->bor_help = gengetopt_args_info_help[23] ; |
| 216 |
< |
args_info->bad_help = gengetopt_args_info_help[24] ; |
| 217 |
< |
args_info->gofr_help = gengetopt_args_info_help[25] ; |
| 218 |
< |
args_info->gofz_help = gengetopt_args_info_help[26] ; |
| 219 |
< |
args_info->r_theta_help = gengetopt_args_info_help[27] ; |
| 220 |
< |
args_info->r_omega_help = gengetopt_args_info_help[28] ; |
| 221 |
< |
args_info->theta_omega_help = gengetopt_args_info_help[29] ; |
| 222 |
< |
args_info->gxyz_help = gengetopt_args_info_help[30] ; |
| 223 |
< |
args_info->p2_help = gengetopt_args_info_help[31] ; |
| 224 |
< |
args_info->rp2_help = gengetopt_args_info_help[32] ; |
| 225 |
< |
args_info->scd_help = gengetopt_args_info_help[33] ; |
| 226 |
< |
args_info->density_help = gengetopt_args_info_help[34] ; |
| 227 |
< |
args_info->slab_density_help = gengetopt_args_info_help[35] ; |
| 228 |
< |
args_info->p_angle_help = gengetopt_args_info_help[36] ; |
| 229 |
< |
args_info->hxy_help = gengetopt_args_info_help[37] ; |
| 230 |
< |
args_info->rho_r_help = gengetopt_args_info_help[38] ; |
| 231 |
< |
args_info->hullvol_help = gengetopt_args_info_help[39] ; |
| 204 |
> |
args_info->length_help = gengetopt_args_info_help[11] ; |
| 205 |
> |
args_info->zlength_help = gengetopt_args_info_help[12] ; |
| 206 |
> |
args_info->zoffset_help = gengetopt_args_info_help[13] ; |
| 207 |
> |
args_info->sele1_help = gengetopt_args_info_help[14] ; |
| 208 |
> |
args_info->sele2_help = gengetopt_args_info_help[15] ; |
| 209 |
> |
args_info->sele3_help = gengetopt_args_info_help[16] ; |
| 210 |
> |
args_info->refsele_help = gengetopt_args_info_help[17] ; |
| 211 |
> |
args_info->comsele_help = gengetopt_args_info_help[18] ; |
| 212 |
> |
args_info->molname_help = gengetopt_args_info_help[19] ; |
| 213 |
> |
args_info->begin_help = gengetopt_args_info_help[20] ; |
| 214 |
> |
args_info->end_help = gengetopt_args_info_help[21] ; |
| 215 |
> |
args_info->radius_help = gengetopt_args_info_help[22] ; |
| 216 |
> |
args_info->bo_help = gengetopt_args_info_help[24] ; |
| 217 |
> |
args_info->bor_help = gengetopt_args_info_help[25] ; |
| 218 |
> |
args_info->bad_help = gengetopt_args_info_help[26] ; |
| 219 |
> |
args_info->gofr_help = gengetopt_args_info_help[27] ; |
| 220 |
> |
args_info->gofz_help = gengetopt_args_info_help[28] ; |
| 221 |
> |
args_info->r_theta_help = gengetopt_args_info_help[29] ; |
| 222 |
> |
args_info->r_omega_help = gengetopt_args_info_help[30] ; |
| 223 |
> |
args_info->r_z_help = gengetopt_args_info_help[31] ; |
| 224 |
> |
args_info->theta_omega_help = gengetopt_args_info_help[32] ; |
| 225 |
> |
args_info->gxyz_help = gengetopt_args_info_help[33] ; |
| 226 |
> |
args_info->p2_help = gengetopt_args_info_help[34] ; |
| 227 |
> |
args_info->rp2_help = gengetopt_args_info_help[35] ; |
| 228 |
> |
args_info->scd_help = gengetopt_args_info_help[36] ; |
| 229 |
> |
args_info->density_help = gengetopt_args_info_help[37] ; |
| 230 |
> |
args_info->slab_density_help = gengetopt_args_info_help[38] ; |
| 231 |
> |
args_info->p_angle_help = gengetopt_args_info_help[39] ; |
| 232 |
> |
args_info->hxy_help = gengetopt_args_info_help[40] ; |
| 233 |
> |
args_info->rho_r_help = gengetopt_args_info_help[41] ; |
| 234 |
> |
args_info->hullvol_help = gengetopt_args_info_help[42] ; |
| 235 |
|
|
| 236 |
|
} |
| 237 |
|
|
| 271 |
|
clear_given (args_info); |
| 272 |
|
clear_args (args_info); |
| 273 |
|
init_args_info (args_info); |
| 262 |
– |
|
| 263 |
– |
args_info->inputs = NULL; |
| 264 |
– |
args_info->inputs_num = 0; |
| 274 |
|
} |
| 275 |
|
|
| 276 |
|
void |
| 309 |
|
static void |
| 310 |
|
cmdline_parser_release (struct gengetopt_args_info *args_info) |
| 311 |
|
{ |
| 312 |
< |
unsigned int i; |
| 312 |
> |
|
| 313 |
|
free_string_field (&(args_info->input_arg)); |
| 314 |
|
free_string_field (&(args_info->input_orig)); |
| 315 |
|
free_string_field (&(args_info->output_arg)); |
| 318 |
|
free_string_field (&(args_info->nbins_orig)); |
| 319 |
|
free_string_field (&(args_info->nbins_x_orig)); |
| 320 |
|
free_string_field (&(args_info->nbins_y_orig)); |
| 321 |
+ |
free_string_field (&(args_info->nbins_z_orig)); |
| 322 |
|
free_string_field (&(args_info->nanglebins_orig)); |
| 313 |
– |
free_string_field (&(args_info->length_orig)); |
| 323 |
|
free_string_field (&(args_info->rcut_orig)); |
| 324 |
+ |
free_string_field (&(args_info->length_orig)); |
| 325 |
+ |
free_string_field (&(args_info->zlength_orig)); |
| 326 |
|
free_string_field (&(args_info->zoffset_orig)); |
| 327 |
|
free_string_field (&(args_info->sele1_arg)); |
| 328 |
|
free_string_field (&(args_info->sele1_orig)); |
| 341 |
|
free_string_field (&(args_info->radius_orig)); |
| 342 |
|
|
| 343 |
|
|
| 333 |
– |
for (i = 0; i < args_info->inputs_num; ++i) |
| 334 |
– |
free (args_info->inputs [i]); |
| 344 |
|
|
| 336 |
– |
if (args_info->inputs_num) |
| 337 |
– |
free (args_info->inputs); |
| 338 |
– |
|
| 345 |
|
clear_given (args_info); |
| 346 |
|
} |
| 347 |
|
|
| 384 |
|
write_into_file(outfile, "nbins_x", args_info->nbins_x_orig, 0); |
| 385 |
|
if (args_info->nbins_y_given) |
| 386 |
|
write_into_file(outfile, "nbins_y", args_info->nbins_y_orig, 0); |
| 387 |
+ |
if (args_info->nbins_z_given) |
| 388 |
+ |
write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0); |
| 389 |
|
if (args_info->nanglebins_given) |
| 390 |
|
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); |
| 391 |
|
if (args_info->rcut_given) |
| 392 |
|
write_into_file(outfile, "rcut", args_info->rcut_orig, 0); |
| 393 |
+ |
if (args_info->length_given) |
| 394 |
+ |
write_into_file(outfile, "length", args_info->length_orig, 0); |
| 395 |
+ |
if (args_info->zlength_given) |
| 396 |
+ |
write_into_file(outfile, "zlength", args_info->zlength_orig, 0); |
| 397 |
|
if (args_info->zoffset_given) |
| 398 |
|
write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0); |
| 399 |
|
if (args_info->sele1_given) |
| 428 |
|
write_into_file(outfile, "r_theta", 0, 0 ); |
| 429 |
|
if (args_info->r_omega_given) |
| 430 |
|
write_into_file(outfile, "r_omega", 0, 0 ); |
| 431 |
+ |
if (args_info->r_z_given) |
| 432 |
+ |
write_into_file(outfile, "r_z", 0, 0 ); |
| 433 |
|
if (args_info->theta_omega_given) |
| 434 |
|
write_into_file(outfile, "theta_omega", 0, 0 ); |
| 435 |
|
if (args_info->gxyz_given) |
| 512 |
|
args_info->gofz_given = 0 ; |
| 513 |
|
args_info->r_theta_given = 0 ; |
| 514 |
|
args_info->r_omega_given = 0 ; |
| 515 |
+ |
args_info->r_z_given = 0 ; |
| 516 |
|
args_info->theta_omega_given = 0 ; |
| 517 |
|
args_info->gxyz_given = 0 ; |
| 518 |
|
args_info->p2_given = 0 ; |
| 772 |
|
{ "nbins", 1, NULL, 'b' }, |
| 773 |
|
{ "nbins_x", 1, NULL, 'x' }, |
| 774 |
|
{ "nbins_y", 1, NULL, 'y' }, |
| 775 |
+ |
{ "nbins_z", 1, NULL, 0 }, |
| 776 |
|
{ "nanglebins", 1, NULL, 'a' }, |
| 763 |
– |
{ "length", 1, NULL, 0 }, |
| 777 |
|
{ "rcut", 1, NULL, 'c' }, |
| 778 |
+ |
{ "length", 1, NULL, 0 }, |
| 779 |
+ |
{ "zlength", 1, NULL, 0 }, |
| 780 |
|
{ "zoffset", 1, NULL, 'z' }, |
| 781 |
|
{ "sele1", 1, NULL, 0 }, |
| 782 |
|
{ "sele2", 1, NULL, 0 }, |
| 794 |
|
{ "gofz", 0, NULL, 0 }, |
| 795 |
|
{ "r_theta", 0, NULL, 0 }, |
| 796 |
|
{ "r_omega", 0, NULL, 0 }, |
| 797 |
+ |
{ "r_z", 0, NULL, 0 }, |
| 798 |
|
{ "theta_omega", 0, NULL, 0 }, |
| 799 |
|
{ "gxyz", 0, NULL, 0 }, |
| 800 |
|
{ "p2", 0, NULL, 'p' }, |
| 995 |
|
break; |
| 996 |
|
|
| 997 |
|
case 0: /* Long option with no short option */ |
| 998 |
+ |
/* number of bins in z axis. */ |
| 999 |
+ |
if (strcmp (long_options[option_index].name, "nbins_z") == 0) |
| 1000 |
+ |
{ |
| 1001 |
+ |
|
| 1002 |
+ |
|
| 1003 |
+ |
if (update_arg( (void *)&(args_info->nbins_z_arg), |
| 1004 |
+ |
&(args_info->nbins_z_orig), &(args_info->nbins_z_given), |
| 1005 |
+ |
&(local_args_info.nbins_z_given), optarg, 0, "100", ARG_INT, |
| 1006 |
+ |
check_ambiguity, override, 0, 0, |
| 1007 |
+ |
"nbins_z", '-', |
| 1008 |
+ |
additional_error)) |
| 1009 |
+ |
goto failure; |
| 1010 |
+ |
|
| 1011 |
+ |
} |
| 1012 |
|
/* maximum length (Defaults to 1/2 smallest length of first frame). */ |
| 1013 |
< |
if (strcmp (long_options[option_index].name, "length") == 0) |
| 1013 |
> |
else if (strcmp (long_options[option_index].name, "length") == 0) |
| 1014 |
|
{ |
| 1015 |
|
|
| 1016 |
|
|
| 1023 |
|
goto failure; |
| 1024 |
|
|
| 1025 |
|
} |
| 1026 |
+ |
/* maximum length (Defaults to 1/2 smallest length of first frame). */ |
| 1027 |
+ |
else if (strcmp (long_options[option_index].name, "zlength") == 0) |
| 1028 |
+ |
{ |
| 1029 |
+ |
|
| 1030 |
+ |
|
| 1031 |
+ |
if (update_arg( (void *)&(args_info->zlength_arg), |
| 1032 |
+ |
&(args_info->zlength_orig), &(args_info->zlength_given), |
| 1033 |
+ |
&(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE, |
| 1034 |
+ |
check_ambiguity, override, 0, 0, |
| 1035 |
+ |
"zlength", '-', |
| 1036 |
+ |
additional_error)) |
| 1037 |
+ |
goto failure; |
| 1038 |
+ |
|
| 1039 |
+ |
} |
| 1040 |
|
/* select the first stuntdouble set. */ |
| 1041 |
|
else if (strcmp (long_options[option_index].name, "sele1") == 0) |
| 1042 |
|
{ |
| 1261 |
|
&(local_args_info.r_omega_given), optarg, 0, 0, ARG_NO, |
| 1262 |
|
check_ambiguity, override, 0, 0, |
| 1263 |
|
"r_omega", '-', |
| 1264 |
+ |
additional_error)) |
| 1265 |
+ |
goto failure; |
| 1266 |
+ |
|
| 1267 |
+ |
} |
| 1268 |
+ |
/* g(r, z). */ |
| 1269 |
+ |
else if (strcmp (long_options[option_index].name, "r_z") == 0) |
| 1270 |
+ |
{ |
| 1271 |
+ |
|
| 1272 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1273 |
+ |
reset_group_staticProps (args_info); |
| 1274 |
+ |
args_info->staticProps_group_counter += 1; |
| 1275 |
+ |
|
| 1276 |
+ |
if (update_arg( 0 , |
| 1277 |
+ |
0 , &(args_info->r_z_given), |
| 1278 |
+ |
&(local_args_info.r_z_given), optarg, 0, 0, ARG_NO, |
| 1279 |
+ |
check_ambiguity, override, 0, 0, |
| 1280 |
+ |
"r_z", '-', |
| 1281 |
|
additional_error)) |
| 1282 |
|
goto failure; |
| 1283 |
|
|
| 1448 |
|
if ( error ) |
| 1449 |
|
return (EXIT_FAILURE); |
| 1450 |
|
|
| 1390 |
– |
if (optind < argc) |
| 1391 |
– |
{ |
| 1392 |
– |
int i = 0 ; |
| 1393 |
– |
int found_prog_name = 0; |
| 1394 |
– |
/* whether program name, i.e., argv[0], is in the remaining args |
| 1395 |
– |
(this may happen with some implementations of getopt, |
| 1396 |
– |
but surely not with the one included by gengetopt) */ |
| 1397 |
– |
|
| 1398 |
– |
i = optind; |
| 1399 |
– |
while (i < argc) |
| 1400 |
– |
if (argv[i++] == argv[0]) { |
| 1401 |
– |
found_prog_name = 1; |
| 1402 |
– |
break; |
| 1403 |
– |
} |
| 1404 |
– |
i = 0; |
| 1405 |
– |
|
| 1406 |
– |
args_info->inputs_num = argc - optind - found_prog_name; |
| 1407 |
– |
args_info->inputs = |
| 1408 |
– |
(char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; |
| 1409 |
– |
while (optind < argc) |
| 1410 |
– |
if (argv[optind++] != argv[0]) |
| 1411 |
– |
args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; |
| 1412 |
– |
} |
| 1413 |
– |
|
| 1451 |
|
return 0; |
| 1452 |
|
|
| 1453 |
|
failure: |