| 1 |
|
/* |
| 2 |
|
File autogenerated by gengetopt version 2.22 |
| 3 |
|
generated with the following command: |
| 4 |
< |
gengetopt -F StaticPropsCmd |
| 4 |
> |
gengetopt -F StaticPropsCmd -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: |
| 23 |
|
|
| 24 |
|
const char *gengetopt_args_info_purpose = ""; |
| 25 |
|
|
| 26 |
< |
const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]..."; |
| 26 |
> |
const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]... [FILES]..."; |
| 27 |
|
|
| 28 |
|
const char *gengetopt_args_info_description = ""; |
| 29 |
|
|
| 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 |
|
" -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)", |
| 40 |
|
" -c, --rcut=DOUBLE cutoff radius (rcut)", |
| 41 |
+ |
" --dz=DOUBLE slab width (dz)", |
| 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", |
| 55 |
|
" --bo bond order parameter (--rcut must be specified)", |
| 56 |
|
" --bor bond order parameter as a function of radius \n (--rcut must be specified)", |
| 57 |
|
" --bad N(theta) bond angle density within (--rcut must \n be specified)", |
| 58 |
+ |
" --count count of molecules matching selection criteria \n (and associated statistics)", |
| 59 |
|
" -g, --gofr g(r)", |
| 60 |
|
" --gofz g(z)", |
| 61 |
|
" --r_theta g(r, cos(theta))", |
| 62 |
|
" --r_omega g(r, cos(omega))", |
| 63 |
|
" --theta_omega g(cos(theta), cos(omega))", |
| 64 |
|
" --gxyz g(x, y, z)", |
| 65 |
+ |
" --twodgofr 2D g(r) (Slab width --dz must be specified)", |
| 66 |
|
" -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)", |
| 67 |
|
" --rp2 rp2 order parameter (--sele1 and --sele2 must \n be specified)", |
| 68 |
|
" -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)", |
| 69 |
|
" -d, --density density plot", |
| 70 |
|
" --slab_density slab density", |
| 71 |
+ |
" --p_angle p(cos(theta))", |
| 72 |
|
" --hxy hxy", |
| 73 |
|
" --rho_r rho of R", |
| 74 |
+ |
" --angle_r angle of R", |
| 75 |
|
" --hullvol hull volume of nanoparticle", |
| 76 |
|
0 |
| 77 |
|
}; |
| 109 |
|
args_info->nbins_x_given = 0 ; |
| 110 |
|
args_info->nbins_y_given = 0 ; |
| 111 |
|
args_info->nanglebins_given = 0 ; |
| 106 |
– |
args_info->length_given = 0 ; |
| 112 |
|
args_info->rcut_given = 0 ; |
| 113 |
+ |
args_info->dz_given = 0 ; |
| 114 |
+ |
args_info->length_given = 0 ; |
| 115 |
+ |
args_info->zlength_given = 0 ; |
| 116 |
|
args_info->zoffset_given = 0 ; |
| 117 |
|
args_info->sele1_given = 0 ; |
| 118 |
|
args_info->sele2_given = 0 ; |
| 126 |
|
args_info->bo_given = 0 ; |
| 127 |
|
args_info->bor_given = 0 ; |
| 128 |
|
args_info->bad_given = 0 ; |
| 129 |
+ |
args_info->count_given = 0 ; |
| 130 |
|
args_info->gofr_given = 0 ; |
| 131 |
|
args_info->gofz_given = 0 ; |
| 132 |
|
args_info->r_theta_given = 0 ; |
| 133 |
|
args_info->r_omega_given = 0 ; |
| 134 |
|
args_info->theta_omega_given = 0 ; |
| 135 |
|
args_info->gxyz_given = 0 ; |
| 136 |
+ |
args_info->twodgofr_given = 0 ; |
| 137 |
|
args_info->p2_given = 0 ; |
| 138 |
|
args_info->rp2_given = 0 ; |
| 139 |
|
args_info->scd_given = 0 ; |
| 140 |
|
args_info->density_given = 0 ; |
| 141 |
|
args_info->slab_density_given = 0 ; |
| 142 |
+ |
args_info->p_angle_given = 0 ; |
| 143 |
|
args_info->hxy_given = 0 ; |
| 144 |
|
args_info->rho_r_given = 0 ; |
| 145 |
+ |
args_info->angle_r_given = 0 ; |
| 146 |
|
args_info->hullvol_given = 0 ; |
| 147 |
|
args_info->staticProps_group_counter = 0 ; |
| 148 |
|
} |
| 164 |
|
args_info->nbins_y_orig = NULL; |
| 165 |
|
args_info->nanglebins_arg = 50; |
| 166 |
|
args_info->nanglebins_orig = NULL; |
| 155 |
– |
args_info->length_orig = NULL; |
| 167 |
|
args_info->rcut_orig = NULL; |
| 168 |
+ |
args_info->dz_orig = NULL; |
| 169 |
+ |
args_info->length_orig = NULL; |
| 170 |
+ |
args_info->zlength_orig = NULL; |
| 171 |
|
args_info->zoffset_arg = 0; |
| 172 |
|
args_info->zoffset_orig = NULL; |
| 173 |
|
args_info->sele1_arg = NULL; |
| 201 |
|
args_info->nbins_help = gengetopt_args_info_help[5] ; |
| 202 |
|
args_info->nbins_x_help = gengetopt_args_info_help[6] ; |
| 203 |
|
args_info->nbins_y_help = gengetopt_args_info_help[7] ; |
| 204 |
< |
args_info->nanglebins_help = gengetopt_args_info_help[8] ; |
| 205 |
< |
args_info->length_help = gengetopt_args_info_help[9] ; |
| 204 |
> |
args_info->nbins_z_help = gengetopt_args_info_help[8] ; |
| 205 |
> |
args_info->nanglebins_help = gengetopt_args_info_help[9] ; |
| 206 |
|
args_info->rcut_help = gengetopt_args_info_help[10] ; |
| 207 |
< |
args_info->zoffset_help = gengetopt_args_info_help[11] ; |
| 208 |
< |
args_info->sele1_help = gengetopt_args_info_help[12] ; |
| 209 |
< |
args_info->sele2_help = gengetopt_args_info_help[13] ; |
| 210 |
< |
args_info->sele3_help = gengetopt_args_info_help[14] ; |
| 211 |
< |
args_info->refsele_help = gengetopt_args_info_help[15] ; |
| 212 |
< |
args_info->comsele_help = gengetopt_args_info_help[16] ; |
| 213 |
< |
args_info->molname_help = gengetopt_args_info_help[17] ; |
| 214 |
< |
args_info->begin_help = gengetopt_args_info_help[18] ; |
| 215 |
< |
args_info->end_help = gengetopt_args_info_help[19] ; |
| 216 |
< |
args_info->radius_help = gengetopt_args_info_help[20] ; |
| 217 |
< |
args_info->bo_help = gengetopt_args_info_help[22] ; |
| 218 |
< |
args_info->bor_help = gengetopt_args_info_help[23] ; |
| 219 |
< |
args_info->bad_help = gengetopt_args_info_help[24] ; |
| 220 |
< |
args_info->gofr_help = gengetopt_args_info_help[25] ; |
| 221 |
< |
args_info->gofz_help = gengetopt_args_info_help[26] ; |
| 222 |
< |
args_info->r_theta_help = gengetopt_args_info_help[27] ; |
| 223 |
< |
args_info->r_omega_help = gengetopt_args_info_help[28] ; |
| 224 |
< |
args_info->theta_omega_help = gengetopt_args_info_help[29] ; |
| 225 |
< |
args_info->gxyz_help = gengetopt_args_info_help[30] ; |
| 226 |
< |
args_info->p2_help = gengetopt_args_info_help[31] ; |
| 227 |
< |
args_info->rp2_help = gengetopt_args_info_help[32] ; |
| 228 |
< |
args_info->scd_help = gengetopt_args_info_help[33] ; |
| 229 |
< |
args_info->density_help = gengetopt_args_info_help[34] ; |
| 230 |
< |
args_info->slab_density_help = gengetopt_args_info_help[35] ; |
| 231 |
< |
args_info->hxy_help = gengetopt_args_info_help[36] ; |
| 232 |
< |
args_info->rho_r_help = gengetopt_args_info_help[37] ; |
| 233 |
< |
args_info->hullvol_help = gengetopt_args_info_help[38] ; |
| 207 |
> |
args_info->dz_help = gengetopt_args_info_help[11] ; |
| 208 |
> |
args_info->length_help = gengetopt_args_info_help[12] ; |
| 209 |
> |
args_info->zlength_help = gengetopt_args_info_help[13] ; |
| 210 |
> |
args_info->zoffset_help = gengetopt_args_info_help[14] ; |
| 211 |
> |
args_info->sele1_help = gengetopt_args_info_help[15] ; |
| 212 |
> |
args_info->sele2_help = gengetopt_args_info_help[16] ; |
| 213 |
> |
args_info->sele3_help = gengetopt_args_info_help[17] ; |
| 214 |
> |
args_info->refsele_help = gengetopt_args_info_help[18] ; |
| 215 |
> |
args_info->comsele_help = gengetopt_args_info_help[19] ; |
| 216 |
> |
args_info->molname_help = gengetopt_args_info_help[20] ; |
| 217 |
> |
args_info->begin_help = gengetopt_args_info_help[21] ; |
| 218 |
> |
args_info->end_help = gengetopt_args_info_help[22] ; |
| 219 |
> |
args_info->radius_help = gengetopt_args_info_help[23] ; |
| 220 |
> |
args_info->bo_help = gengetopt_args_info_help[25] ; |
| 221 |
> |
args_info->bor_help = gengetopt_args_info_help[26] ; |
| 222 |
> |
args_info->bad_help = gengetopt_args_info_help[27] ; |
| 223 |
> |
args_info->count_help = gengetopt_args_info_help[28] ; |
| 224 |
> |
args_info->gofr_help = gengetopt_args_info_help[29] ; |
| 225 |
> |
args_info->gofz_help = gengetopt_args_info_help[30] ; |
| 226 |
> |
args_info->r_theta_help = gengetopt_args_info_help[31] ; |
| 227 |
> |
args_info->r_omega_help = gengetopt_args_info_help[32] ; |
| 228 |
> |
args_info->r_z_help = gengetopt_args_info_help[33] ; |
| 229 |
> |
args_info->theta_omega_help = gengetopt_args_info_help[34] ; |
| 230 |
> |
args_info->gxyz_help = gengetopt_args_info_help[35] ; |
| 231 |
> |
args_info->twodgofr_help = gengetopt_args_info_help[36] ; |
| 232 |
> |
args_info->p2_help = gengetopt_args_info_help[37] ; |
| 233 |
> |
args_info->rp2_help = gengetopt_args_info_help[38] ; |
| 234 |
> |
args_info->scd_help = gengetopt_args_info_help[39] ; |
| 235 |
> |
args_info->density_help = gengetopt_args_info_help[40] ; |
| 236 |
> |
args_info->slab_density_help = gengetopt_args_info_help[41] ; |
| 237 |
> |
args_info->p_angle_help = gengetopt_args_info_help[42] ; |
| 238 |
> |
args_info->hxy_help = gengetopt_args_info_help[43] ; |
| 239 |
> |
args_info->rho_r_help = gengetopt_args_info_help[44] ; |
| 240 |
> |
args_info->hullvol_help = gengetopt_args_info_help[45] ; |
| 241 |
|
|
| 242 |
|
} |
| 243 |
|
|
| 277 |
|
clear_given (args_info); |
| 278 |
|
clear_args (args_info); |
| 279 |
|
init_args_info (args_info); |
| 280 |
+ |
|
| 281 |
+ |
args_info->inputs = NULL; |
| 282 |
+ |
args_info->inputs_num = 0; |
| 283 |
|
} |
| 284 |
|
|
| 285 |
|
void |
| 318 |
|
static void |
| 319 |
|
cmdline_parser_release (struct gengetopt_args_info *args_info) |
| 320 |
|
{ |
| 321 |
< |
|
| 321 |
> |
unsigned int i; |
| 322 |
|
free_string_field (&(args_info->input_arg)); |
| 323 |
|
free_string_field (&(args_info->input_orig)); |
| 324 |
|
free_string_field (&(args_info->output_arg)); |
| 328 |
|
free_string_field (&(args_info->nbins_x_orig)); |
| 329 |
|
free_string_field (&(args_info->nbins_y_orig)); |
| 330 |
|
free_string_field (&(args_info->nanglebins_orig)); |
| 307 |
– |
free_string_field (&(args_info->length_orig)); |
| 331 |
|
free_string_field (&(args_info->rcut_orig)); |
| 332 |
+ |
free_string_field (&(args_info->dz_orig)); |
| 333 |
+ |
free_string_field (&(args_info->length_orig)); |
| 334 |
+ |
free_string_field (&(args_info->zlength_orig)); |
| 335 |
|
free_string_field (&(args_info->zoffset_orig)); |
| 336 |
|
free_string_field (&(args_info->sele1_arg)); |
| 337 |
|
free_string_field (&(args_info->sele1_orig)); |
| 350 |
|
free_string_field (&(args_info->radius_orig)); |
| 351 |
|
|
| 352 |
|
|
| 353 |
+ |
for (i = 0; i < args_info->inputs_num; ++i) |
| 354 |
+ |
free (args_info->inputs [i]); |
| 355 |
|
|
| 356 |
+ |
if (args_info->inputs_num) |
| 357 |
+ |
free (args_info->inputs); |
| 358 |
+ |
|
| 359 |
|
clear_given (args_info); |
| 360 |
|
} |
| 361 |
|
|
| 400 |
|
write_into_file(outfile, "nbins_y", args_info->nbins_y_orig, 0); |
| 401 |
|
if (args_info->nanglebins_given) |
| 402 |
|
write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0); |
| 372 |
– |
if (args_info->length_given) |
| 373 |
– |
write_into_file(outfile, "length", args_info->length_orig, 0); |
| 403 |
|
if (args_info->rcut_given) |
| 404 |
|
write_into_file(outfile, "rcut", args_info->rcut_orig, 0); |
| 405 |
+ |
if (args_info->dz_given) |
| 406 |
+ |
write_into_file(outfile, "dz", args_info->dz_orig, 0); |
| 407 |
+ |
if (args_info->length_given) |
| 408 |
+ |
write_into_file(outfile, "length", args_info->length_orig, 0); |
| 409 |
+ |
if (args_info->zlength_given) |
| 410 |
+ |
write_into_file(outfile, "zlength", args_info->zlength_orig, 0); |
| 411 |
|
if (args_info->zoffset_given) |
| 412 |
|
write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0); |
| 413 |
|
if (args_info->sele1_given) |
| 434 |
|
write_into_file(outfile, "bor", 0, 0 ); |
| 435 |
|
if (args_info->bad_given) |
| 436 |
|
write_into_file(outfile, "bad", 0, 0 ); |
| 437 |
+ |
if (args_info->count_given) |
| 438 |
+ |
write_into_file(outfile, "count", 0, 0 ); |
| 439 |
|
if (args_info->gofr_given) |
| 440 |
|
write_into_file(outfile, "gofr", 0, 0 ); |
| 441 |
|
if (args_info->gofz_given) |
| 448 |
|
write_into_file(outfile, "theta_omega", 0, 0 ); |
| 449 |
|
if (args_info->gxyz_given) |
| 450 |
|
write_into_file(outfile, "gxyz", 0, 0 ); |
| 451 |
+ |
if (args_info->twodgofr_given) |
| 452 |
+ |
write_into_file(outfile, "twodgofr", 0, 0 ); |
| 453 |
|
if (args_info->p2_given) |
| 454 |
|
write_into_file(outfile, "p2", 0, 0 ); |
| 455 |
|
if (args_info->rp2_given) |
| 460 |
|
write_into_file(outfile, "density", 0, 0 ); |
| 461 |
|
if (args_info->slab_density_given) |
| 462 |
|
write_into_file(outfile, "slab_density", 0, 0 ); |
| 463 |
+ |
if (args_info->p_angle_given) |
| 464 |
+ |
write_into_file(outfile, "p_angle", 0, 0 ); |
| 465 |
|
if (args_info->hxy_given) |
| 466 |
|
write_into_file(outfile, "hxy", 0, 0 ); |
| 467 |
|
if (args_info->rho_r_given) |
| 468 |
|
write_into_file(outfile, "rho_r", 0, 0 ); |
| 469 |
+ |
if (args_info->angle_r_given) |
| 470 |
+ |
write_into_file(outfile, "angle_r", 0, 0 ); |
| 471 |
|
if (args_info->hullvol_given) |
| 472 |
|
write_into_file(outfile, "hullvol", 0, 0 ); |
| 473 |
|
|
| 526 |
|
args_info->bo_given = 0 ; |
| 527 |
|
args_info->bor_given = 0 ; |
| 528 |
|
args_info->bad_given = 0 ; |
| 529 |
+ |
args_info->count_given = 0 ; |
| 530 |
|
args_info->gofr_given = 0 ; |
| 531 |
|
args_info->gofz_given = 0 ; |
| 532 |
|
args_info->r_theta_given = 0 ; |
| 533 |
|
args_info->r_omega_given = 0 ; |
| 534 |
|
args_info->theta_omega_given = 0 ; |
| 535 |
|
args_info->gxyz_given = 0 ; |
| 536 |
+ |
args_info->twodgofr_given = 0 ; |
| 537 |
|
args_info->p2_given = 0 ; |
| 538 |
|
args_info->rp2_given = 0 ; |
| 539 |
|
args_info->scd_given = 0 ; |
| 540 |
|
args_info->density_given = 0 ; |
| 541 |
|
args_info->slab_density_given = 0 ; |
| 542 |
+ |
args_info->p_angle_given = 0 ; |
| 543 |
|
args_info->hxy_given = 0 ; |
| 544 |
|
args_info->rho_r_given = 0 ; |
| 545 |
+ |
args_info->angle_r_given = 0 ; |
| 546 |
|
args_info->hullvol_given = 0 ; |
| 547 |
|
|
| 548 |
|
args_info->staticProps_group_counter = 0; |
| 793 |
|
{ "nbins_x", 1, NULL, 'x' }, |
| 794 |
|
{ "nbins_y", 1, NULL, 'y' }, |
| 795 |
|
{ "nanglebins", 1, NULL, 'a' }, |
| 749 |
– |
{ "length", 1, NULL, 0 }, |
| 796 |
|
{ "rcut", 1, NULL, 'c' }, |
| 797 |
+ |
{ "dz", 1, NULL, 0 }, |
| 798 |
+ |
{ "length", 1, NULL, 0 }, |
| 799 |
+ |
{ "zlength", 1, NULL, 0 }, |
| 800 |
|
{ "zoffset", 1, NULL, 'z' }, |
| 801 |
|
{ "sele1", 1, NULL, 0 }, |
| 802 |
|
{ "sele2", 1, NULL, 0 }, |
| 810 |
|
{ "bo", 0, NULL, 0 }, |
| 811 |
|
{ "bor", 0, NULL, 0 }, |
| 812 |
|
{ "bad", 0, NULL, 0 }, |
| 813 |
+ |
{ "count", 0, NULL, 0 }, |
| 814 |
|
{ "gofr", 0, NULL, 'g' }, |
| 815 |
|
{ "gofz", 0, NULL, 0 }, |
| 816 |
|
{ "r_theta", 0, NULL, 0 }, |
| 817 |
|
{ "r_omega", 0, NULL, 0 }, |
| 818 |
|
{ "theta_omega", 0, NULL, 0 }, |
| 819 |
|
{ "gxyz", 0, NULL, 0 }, |
| 820 |
+ |
{ "twodgofr", 0, NULL, 0 }, |
| 821 |
|
{ "p2", 0, NULL, 'p' }, |
| 822 |
|
{ "rp2", 0, NULL, 0 }, |
| 823 |
|
{ "scd", 0, NULL, 's' }, |
| 824 |
|
{ "density", 0, NULL, 'd' }, |
| 825 |
|
{ "slab_density", 0, NULL, 0 }, |
| 826 |
+ |
{ "p_angle", 0, NULL, 0 }, |
| 827 |
|
{ "hxy", 0, NULL, 0 }, |
| 828 |
|
{ "rho_r", 0, NULL, 0 }, |
| 829 |
+ |
{ "angle_r", 0, NULL, 0 }, |
| 830 |
|
{ "hullvol", 0, NULL, 0 }, |
| 831 |
|
{ NULL, 0, NULL, 0 } |
| 832 |
|
}; |
| 1017 |
|
break; |
| 1018 |
|
|
| 1019 |
|
case 0: /* Long option with no short option */ |
| 1020 |
+ |
/* slab width (dz). */ |
| 1021 |
+ |
else if (strcmp (long_options[option_index].name, "dz") == 0) |
| 1022 |
+ |
{ |
| 1023 |
+ |
|
| 1024 |
+ |
|
| 1025 |
+ |
if (update_arg( (void *)&(args_info->dz_arg), |
| 1026 |
+ |
&(args_info->dz_orig), &(args_info->dz_given), |
| 1027 |
+ |
&(local_args_info.dz_given), optarg, 0, 0, ARG_DOUBLE, |
| 1028 |
+ |
check_ambiguity, override, 0, 0, |
| 1029 |
+ |
"dz", '-', |
| 1030 |
+ |
additional_error)) |
| 1031 |
+ |
goto failure; |
| 1032 |
+ |
|
| 1033 |
+ |
} |
| 1034 |
|
/* maximum length (Defaults to 1/2 smallest length of first frame). */ |
| 1035 |
|
if (strcmp (long_options[option_index].name, "length") == 0) |
| 1036 |
|
{ |
| 1041 |
|
&(local_args_info.length_given), optarg, 0, 0, ARG_DOUBLE, |
| 1042 |
|
check_ambiguity, override, 0, 0, |
| 1043 |
|
"length", '-', |
| 1044 |
+ |
additional_error)) |
| 1045 |
+ |
goto failure; |
| 1046 |
+ |
|
| 1047 |
+ |
} |
| 1048 |
+ |
/* maximum length (Defaults to 1/2 smallest length of first frame). */ |
| 1049 |
+ |
else if (strcmp (long_options[option_index].name, "zlength") == 0) |
| 1050 |
+ |
{ |
| 1051 |
+ |
|
| 1052 |
+ |
|
| 1053 |
+ |
if (update_arg( (void *)&(args_info->zlength_arg), |
| 1054 |
+ |
&(args_info->zlength_orig), &(args_info->zlength_given), |
| 1055 |
+ |
&(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE, |
| 1056 |
+ |
check_ambiguity, override, 0, 0, |
| 1057 |
+ |
"zlength", '-', |
| 1058 |
|
additional_error)) |
| 1059 |
|
goto failure; |
| 1060 |
|
|
| 1232 |
|
&(local_args_info.bad_given), optarg, 0, 0, ARG_NO, |
| 1233 |
|
check_ambiguity, override, 0, 0, |
| 1234 |
|
"bad", '-', |
| 1235 |
+ |
additional_error)) |
| 1236 |
+ |
goto failure; |
| 1237 |
+ |
|
| 1238 |
+ |
} |
| 1239 |
+ |
/* count of molecules matching selection criteria (and associated statistics). */ |
| 1240 |
+ |
else if (strcmp (long_options[option_index].name, "count") == 0) |
| 1241 |
+ |
{ |
| 1242 |
+ |
|
| 1243 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1244 |
+ |
reset_group_staticProps (args_info); |
| 1245 |
+ |
args_info->staticProps_group_counter += 1; |
| 1246 |
+ |
|
| 1247 |
+ |
if (update_arg( 0 , |
| 1248 |
+ |
0 , &(args_info->count_given), |
| 1249 |
+ |
&(local_args_info.count_given), optarg, 0, 0, ARG_NO, |
| 1250 |
+ |
check_ambiguity, override, 0, 0, |
| 1251 |
+ |
"count", '-', |
| 1252 |
|
additional_error)) |
| 1253 |
|
goto failure; |
| 1254 |
|
|
| 1338 |
|
goto failure; |
| 1339 |
|
|
| 1340 |
|
} |
| 1341 |
+ |
/* 2D g(r) (Slab width --dz must be specified). */ |
| 1342 |
+ |
else if (strcmp (long_options[option_index].name, "twodgofr") == 0) |
| 1343 |
+ |
{ |
| 1344 |
+ |
|
| 1345 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1346 |
+ |
reset_group_staticProps (args_info); |
| 1347 |
+ |
args_info->staticProps_group_counter += 1; |
| 1348 |
+ |
|
| 1349 |
+ |
if (update_arg( 0 , |
| 1350 |
+ |
0 , &(args_info->twodgofr_given), |
| 1351 |
+ |
&(local_args_info.twodgofr_given), optarg, 0, 0, ARG_NO, |
| 1352 |
+ |
check_ambiguity, override, 0, 0, |
| 1353 |
+ |
"twodgofr", '-', |
| 1354 |
+ |
additional_error)) |
| 1355 |
+ |
goto failure; |
| 1356 |
+ |
|
| 1357 |
+ |
} |
| 1358 |
|
/* rp2 order parameter (--sele1 and --sele2 must be specified). */ |
| 1359 |
|
else if (strcmp (long_options[option_index].name, "rp2") == 0) |
| 1360 |
|
{ |
| 1389 |
|
goto failure; |
| 1390 |
|
|
| 1391 |
|
} |
| 1392 |
+ |
/* p(cos(theta)). */ |
| 1393 |
+ |
else if (strcmp (long_options[option_index].name, "p_angle") == 0) |
| 1394 |
+ |
{ |
| 1395 |
+ |
|
| 1396 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1397 |
+ |
reset_group_staticProps (args_info); |
| 1398 |
+ |
args_info->staticProps_group_counter += 1; |
| 1399 |
+ |
|
| 1400 |
+ |
if (update_arg( 0 , |
| 1401 |
+ |
0 , &(args_info->p_angle_given), |
| 1402 |
+ |
&(local_args_info.p_angle_given), optarg, 0, 0, ARG_NO, |
| 1403 |
+ |
check_ambiguity, override, 0, 0, |
| 1404 |
+ |
"p_angle", '-', |
| 1405 |
+ |
additional_error)) |
| 1406 |
+ |
goto failure; |
| 1407 |
+ |
|
| 1408 |
+ |
} |
| 1409 |
|
/* hxy. */ |
| 1410 |
|
else if (strcmp (long_options[option_index].name, "hxy") == 0) |
| 1411 |
|
{ |
| 1440 |
|
goto failure; |
| 1441 |
|
|
| 1442 |
|
} |
| 1443 |
+ |
/* angle of R. */ |
| 1444 |
+ |
else if (strcmp (long_options[option_index].name, "angle_r") == 0) |
| 1445 |
+ |
{ |
| 1446 |
+ |
|
| 1447 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1448 |
+ |
reset_group_staticProps (args_info); |
| 1449 |
+ |
args_info->staticProps_group_counter += 1; |
| 1450 |
+ |
|
| 1451 |
+ |
if (update_arg( 0 , |
| 1452 |
+ |
0 , &(args_info->angle_r_given), |
| 1453 |
+ |
&(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO, |
| 1454 |
+ |
check_ambiguity, override, 0, 0, |
| 1455 |
+ |
"angle_r", '-', |
| 1456 |
+ |
additional_error)) |
| 1457 |
+ |
goto failure; |
| 1458 |
+ |
|
| 1459 |
+ |
} |
| 1460 |
|
/* hull volume of nanoparticle. */ |
| 1461 |
|
else if (strcmp (long_options[option_index].name, "hullvol") == 0) |
| 1462 |
|
{ |
| 1504 |
|
if ( error ) |
| 1505 |
|
return (EXIT_FAILURE); |
| 1506 |
|
|
| 1507 |
+ |
if (optind < argc) |
| 1508 |
+ |
{ |
| 1509 |
+ |
int i = 0 ; |
| 1510 |
+ |
int found_prog_name = 0; |
| 1511 |
+ |
/* whether program name, i.e., argv[0], is in the remaining args |
| 1512 |
+ |
(this may happen with some implementations of getopt, |
| 1513 |
+ |
but surely not with the one included by gengetopt) */ |
| 1514 |
+ |
|
| 1515 |
+ |
i = optind; |
| 1516 |
+ |
while (i < argc) |
| 1517 |
+ |
if (argv[i++] == argv[0]) { |
| 1518 |
+ |
found_prog_name = 1; |
| 1519 |
+ |
break; |
| 1520 |
+ |
} |
| 1521 |
+ |
i = 0; |
| 1522 |
+ |
|
| 1523 |
+ |
args_info->inputs_num = argc - optind - found_prog_name; |
| 1524 |
+ |
args_info->inputs = |
| 1525 |
+ |
(char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; |
| 1526 |
+ |
while (optind < argc) |
| 1527 |
+ |
if (argv[optind++] != argv[0]) |
| 1528 |
+ |
args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; |
| 1529 |
+ |
} |
| 1530 |
+ |
|
| 1531 |
|
return 0; |
| 1532 |
|
|
| 1533 |
|
failure: |