| 1 |
|
/* |
| 2 |
< |
File autogenerated by gengetopt version 2.22 |
| 2 |
> |
File autogenerated by gengetopt version 2.22.4 |
| 3 |
|
generated with the following command: |
| 4 |
< |
gengetopt -F StaticPropsCmd -u |
| 4 |
> |
gengetopt --file-name=StaticPropsCmd --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: |
| 17 |
|
#include <stdlib.h> |
| 18 |
|
#include <string.h> |
| 19 |
|
|
| 20 |
< |
#include "getopt.h" |
| 20 |
> |
#ifndef FIX_UNUSED |
| 21 |
> |
#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ |
| 22 |
> |
#endif |
| 23 |
|
|
| 24 |
+ |
#include <getopt.h> |
| 25 |
+ |
|
| 26 |
|
#include "StaticPropsCmd.h" |
| 27 |
|
|
| 28 |
|
const char *gengetopt_args_info_purpose = ""; |
| 52 |
|
" --sele3=selection script select the third stuntdouble set", |
| 53 |
|
" --refsele=selection script\n select reference (use and only use with --gxyz)", |
| 54 |
|
" --comsele=selection script\n select stunt doubles for center-of-mass \n reference point", |
| 55 |
+ |
" --seleoffset=INT global index offset for a second object (used \n to define a vector between sites in molecule)", |
| 56 |
|
" --molname=STRING molecule name", |
| 57 |
|
" --begin=INT begin internal index", |
| 58 |
|
" --end=INT end internal index", |
| 61 |
|
" --bo bond order parameter (--rcut must be specified)", |
| 62 |
|
" --bor bond order parameter as a function of radius \n (--rcut must be specified)", |
| 63 |
|
" --bad N(theta) bond angle density within (--rcut must \n be specified)", |
| 64 |
+ |
" --count count of molecules matching selection criteria \n (and associated statistics)", |
| 65 |
|
" -g, --gofr g(r)", |
| 66 |
|
" --gofz g(z)", |
| 67 |
|
" --r_theta g(r, cos(theta))", |
| 70 |
|
" --theta_omega g(cos(theta), cos(omega))", |
| 71 |
|
" --gxyz g(x, y, z)", |
| 72 |
|
" --twodgofr 2D g(r) (Slab width --dz must be specified)", |
| 73 |
< |
" -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)", |
| 73 |
> |
" -p, --p2 p2 order parameter (--sele1 must be specified, \n --sele2 is optional)", |
| 74 |
|
" --rp2 rp2 order parameter (--sele1 and --sele2 must \n be specified)", |
| 75 |
|
" -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)", |
| 76 |
|
" -d, --density density plot", |
| 78 |
|
" --p_angle p(cos(theta))", |
| 79 |
|
" --hxy hxy", |
| 80 |
|
" --rho_r rho of R", |
| 81 |
+ |
" --angle_r angle of R", |
| 82 |
|
" --hullvol hull volume of nanoparticle", |
| 83 |
+ |
" --rodlength length of nanorod", |
| 84 |
+ |
" -Q, --tet_param tetrahedrality order parameter (Qk)", |
| 85 |
+ |
" --tet_param_z spatially-resolved tetrahedrality order \n parameter Qk(z)", |
| 86 |
+ |
" --rnemdz slab-resolved RNEMD statistics (temperature, \n density, velocity)", |
| 87 |
+ |
" --rnemdr shell-resolved RNEMD statistics (temperature, \n density, angular velocity)", |
| 88 |
|
0 |
| 89 |
|
}; |
| 90 |
|
|
| 100 |
|
void clear_args (struct gengetopt_args_info *args_info); |
| 101 |
|
|
| 102 |
|
static int |
| 103 |
< |
cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, |
| 103 |
> |
cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, |
| 104 |
|
struct cmdline_parser_params *params, const char *additional_error); |
| 105 |
|
|
| 106 |
|
static int |
| 132 |
|
args_info->sele3_given = 0 ; |
| 133 |
|
args_info->refsele_given = 0 ; |
| 134 |
|
args_info->comsele_given = 0 ; |
| 135 |
+ |
args_info->seleoffset_given = 0 ; |
| 136 |
|
args_info->molname_given = 0 ; |
| 137 |
|
args_info->begin_given = 0 ; |
| 138 |
|
args_info->end_given = 0 ; |
| 140 |
|
args_info->bo_given = 0 ; |
| 141 |
|
args_info->bor_given = 0 ; |
| 142 |
|
args_info->bad_given = 0 ; |
| 143 |
+ |
args_info->count_given = 0 ; |
| 144 |
|
args_info->gofr_given = 0 ; |
| 145 |
|
args_info->gofz_given = 0 ; |
| 146 |
|
args_info->r_theta_given = 0 ; |
| 157 |
|
args_info->p_angle_given = 0 ; |
| 158 |
|
args_info->hxy_given = 0 ; |
| 159 |
|
args_info->rho_r_given = 0 ; |
| 160 |
+ |
args_info->angle_r_given = 0 ; |
| 161 |
|
args_info->hullvol_given = 0 ; |
| 162 |
+ |
args_info->rodlength_given = 0 ; |
| 163 |
+ |
args_info->tet_param_given = 0 ; |
| 164 |
+ |
args_info->tet_param_z_given = 0 ; |
| 165 |
+ |
args_info->rnemdz_given = 0 ; |
| 166 |
+ |
args_info->rnemdr_given = 0 ; |
| 167 |
|
args_info->staticProps_group_counter = 0 ; |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
static |
| 171 |
|
void clear_args (struct gengetopt_args_info *args_info) |
| 172 |
|
{ |
| 173 |
+ |
FIX_UNUSED (args_info); |
| 174 |
|
args_info->input_arg = NULL; |
| 175 |
|
args_info->input_orig = NULL; |
| 176 |
|
args_info->output_arg = NULL; |
| 203 |
|
args_info->refsele_orig = NULL; |
| 204 |
|
args_info->comsele_arg = NULL; |
| 205 |
|
args_info->comsele_orig = NULL; |
| 206 |
+ |
args_info->seleoffset_orig = NULL; |
| 207 |
|
args_info->molname_arg = NULL; |
| 208 |
|
args_info->molname_orig = NULL; |
| 209 |
|
args_info->begin_orig = NULL; |
| 237 |
|
args_info->sele3_help = gengetopt_args_info_help[17] ; |
| 238 |
|
args_info->refsele_help = gengetopt_args_info_help[18] ; |
| 239 |
|
args_info->comsele_help = gengetopt_args_info_help[19] ; |
| 240 |
< |
args_info->molname_help = gengetopt_args_info_help[20] ; |
| 241 |
< |
args_info->begin_help = gengetopt_args_info_help[21] ; |
| 242 |
< |
args_info->end_help = gengetopt_args_info_help[22] ; |
| 243 |
< |
args_info->radius_help = gengetopt_args_info_help[23] ; |
| 244 |
< |
args_info->bo_help = gengetopt_args_info_help[25] ; |
| 245 |
< |
args_info->bor_help = gengetopt_args_info_help[26] ; |
| 246 |
< |
args_info->bad_help = gengetopt_args_info_help[27] ; |
| 247 |
< |
args_info->gofr_help = gengetopt_args_info_help[28] ; |
| 248 |
< |
args_info->gofz_help = gengetopt_args_info_help[29] ; |
| 249 |
< |
args_info->r_theta_help = gengetopt_args_info_help[30] ; |
| 250 |
< |
args_info->r_omega_help = gengetopt_args_info_help[31] ; |
| 251 |
< |
args_info->r_z_help = gengetopt_args_info_help[32] ; |
| 252 |
< |
args_info->theta_omega_help = gengetopt_args_info_help[33] ; |
| 253 |
< |
args_info->gxyz_help = gengetopt_args_info_help[34] ; |
| 254 |
< |
args_info->twodgofr_help = gengetopt_args_info_help[35] ; |
| 255 |
< |
args_info->p2_help = gengetopt_args_info_help[36] ; |
| 256 |
< |
args_info->rp2_help = gengetopt_args_info_help[37] ; |
| 257 |
< |
args_info->scd_help = gengetopt_args_info_help[38] ; |
| 258 |
< |
args_info->density_help = gengetopt_args_info_help[39] ; |
| 259 |
< |
args_info->slab_density_help = gengetopt_args_info_help[40] ; |
| 260 |
< |
args_info->p_angle_help = gengetopt_args_info_help[41] ; |
| 261 |
< |
args_info->hxy_help = gengetopt_args_info_help[42] ; |
| 262 |
< |
args_info->rho_r_help = gengetopt_args_info_help[43] ; |
| 263 |
< |
args_info->hullvol_help = gengetopt_args_info_help[44] ; |
| 240 |
> |
args_info->seleoffset_help = gengetopt_args_info_help[20] ; |
| 241 |
> |
args_info->molname_help = gengetopt_args_info_help[21] ; |
| 242 |
> |
args_info->begin_help = gengetopt_args_info_help[22] ; |
| 243 |
> |
args_info->end_help = gengetopt_args_info_help[23] ; |
| 244 |
> |
args_info->radius_help = gengetopt_args_info_help[24] ; |
| 245 |
> |
args_info->bo_help = gengetopt_args_info_help[26] ; |
| 246 |
> |
args_info->bor_help = gengetopt_args_info_help[27] ; |
| 247 |
> |
args_info->bad_help = gengetopt_args_info_help[28] ; |
| 248 |
> |
args_info->count_help = gengetopt_args_info_help[29] ; |
| 249 |
> |
args_info->gofr_help = gengetopt_args_info_help[30] ; |
| 250 |
> |
args_info->gofz_help = gengetopt_args_info_help[31] ; |
| 251 |
> |
args_info->r_theta_help = gengetopt_args_info_help[32] ; |
| 252 |
> |
args_info->r_omega_help = gengetopt_args_info_help[33] ; |
| 253 |
> |
args_info->r_z_help = gengetopt_args_info_help[34] ; |
| 254 |
> |
args_info->theta_omega_help = gengetopt_args_info_help[35] ; |
| 255 |
> |
args_info->gxyz_help = gengetopt_args_info_help[36] ; |
| 256 |
> |
args_info->twodgofr_help = gengetopt_args_info_help[37] ; |
| 257 |
> |
args_info->p2_help = gengetopt_args_info_help[38] ; |
| 258 |
> |
args_info->rp2_help = gengetopt_args_info_help[39] ; |
| 259 |
> |
args_info->scd_help = gengetopt_args_info_help[40] ; |
| 260 |
> |
args_info->density_help = gengetopt_args_info_help[41] ; |
| 261 |
> |
args_info->slab_density_help = gengetopt_args_info_help[42] ; |
| 262 |
> |
args_info->p_angle_help = gengetopt_args_info_help[43] ; |
| 263 |
> |
args_info->hxy_help = gengetopt_args_info_help[44] ; |
| 264 |
> |
args_info->rho_r_help = gengetopt_args_info_help[45] ; |
| 265 |
> |
args_info->angle_r_help = gengetopt_args_info_help[46] ; |
| 266 |
> |
args_info->hullvol_help = gengetopt_args_info_help[47] ; |
| 267 |
> |
args_info->rodlength_help = gengetopt_args_info_help[48] ; |
| 268 |
> |
args_info->tet_param_help = gengetopt_args_info_help[49] ; |
| 269 |
> |
args_info->tet_param_z_help = gengetopt_args_info_help[50] ; |
| 270 |
> |
args_info->rnemdz_help = gengetopt_args_info_help[51] ; |
| 271 |
> |
args_info->rnemdr_help = gengetopt_args_info_help[52] ; |
| 272 |
|
|
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
void |
| 276 |
|
cmdline_parser_print_version (void) |
| 277 |
|
{ |
| 278 |
< |
printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); |
| 278 |
> |
printf ("%s %s\n", |
| 279 |
> |
(strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), |
| 280 |
> |
CMDLINE_PARSER_VERSION); |
| 281 |
|
} |
| 282 |
|
|
| 283 |
|
static void print_help_common(void) { |
| 292 |
|
printf("\n"); |
| 293 |
|
|
| 294 |
|
if (strlen(gengetopt_args_info_description) > 0) |
| 295 |
< |
printf("%s\n", gengetopt_args_info_description); |
| 295 |
> |
printf("%s\n\n", gengetopt_args_info_description); |
| 296 |
|
} |
| 297 |
|
|
| 298 |
|
void |
| 311 |
|
clear_args (args_info); |
| 312 |
|
init_args_info (args_info); |
| 313 |
|
|
| 314 |
< |
args_info->inputs = NULL; |
| 314 |
> |
args_info->inputs = 0; |
| 315 |
|
args_info->inputs_num = 0; |
| 316 |
|
} |
| 317 |
|
|
| 377 |
|
free_string_field (&(args_info->refsele_orig)); |
| 378 |
|
free_string_field (&(args_info->comsele_arg)); |
| 379 |
|
free_string_field (&(args_info->comsele_orig)); |
| 380 |
+ |
free_string_field (&(args_info->seleoffset_orig)); |
| 381 |
|
free_string_field (&(args_info->molname_arg)); |
| 382 |
|
free_string_field (&(args_info->molname_orig)); |
| 383 |
|
free_string_field (&(args_info->begin_orig)); |
| 396 |
|
|
| 397 |
|
|
| 398 |
|
static void |
| 399 |
< |
write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[]) |
| 399 |
> |
write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) |
| 400 |
|
{ |
| 401 |
+ |
FIX_UNUSED (values); |
| 402 |
|
if (arg) { |
| 403 |
|
fprintf(outfile, "%s=\"%s\"\n", opt, arg); |
| 404 |
|
} else { |
| 458 |
|
write_into_file(outfile, "refsele", args_info->refsele_orig, 0); |
| 459 |
|
if (args_info->comsele_given) |
| 460 |
|
write_into_file(outfile, "comsele", args_info->comsele_orig, 0); |
| 461 |
+ |
if (args_info->seleoffset_given) |
| 462 |
+ |
write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0); |
| 463 |
|
if (args_info->molname_given) |
| 464 |
|
write_into_file(outfile, "molname", args_info->molname_orig, 0); |
| 465 |
|
if (args_info->begin_given) |
| 474 |
|
write_into_file(outfile, "bor", 0, 0 ); |
| 475 |
|
if (args_info->bad_given) |
| 476 |
|
write_into_file(outfile, "bad", 0, 0 ); |
| 477 |
+ |
if (args_info->count_given) |
| 478 |
+ |
write_into_file(outfile, "count", 0, 0 ); |
| 479 |
|
if (args_info->gofr_given) |
| 480 |
|
write_into_file(outfile, "gofr", 0, 0 ); |
| 481 |
|
if (args_info->gofz_given) |
| 508 |
|
write_into_file(outfile, "hxy", 0, 0 ); |
| 509 |
|
if (args_info->rho_r_given) |
| 510 |
|
write_into_file(outfile, "rho_r", 0, 0 ); |
| 511 |
+ |
if (args_info->angle_r_given) |
| 512 |
+ |
write_into_file(outfile, "angle_r", 0, 0 ); |
| 513 |
|
if (args_info->hullvol_given) |
| 514 |
|
write_into_file(outfile, "hullvol", 0, 0 ); |
| 515 |
+ |
if (args_info->rodlength_given) |
| 516 |
+ |
write_into_file(outfile, "rodlength", 0, 0 ); |
| 517 |
+ |
if (args_info->tet_param_given) |
| 518 |
+ |
write_into_file(outfile, "tet_param", 0, 0 ); |
| 519 |
+ |
if (args_info->tet_param_z_given) |
| 520 |
+ |
write_into_file(outfile, "tet_param_z", 0, 0 ); |
| 521 |
+ |
if (args_info->rnemdz_given) |
| 522 |
+ |
write_into_file(outfile, "rnemdz", 0, 0 ); |
| 523 |
+ |
if (args_info->rnemdr_given) |
| 524 |
+ |
write_into_file(outfile, "rnemdr", 0, 0 ); |
| 525 |
|
|
| 526 |
|
|
| 527 |
|
i = EXIT_SUCCESS; |
| 558 |
|
char * |
| 559 |
|
gengetopt_strdup (const char *s) |
| 560 |
|
{ |
| 561 |
< |
char *result = NULL; |
| 561 |
> |
char *result = 0; |
| 562 |
|
if (!s) |
| 563 |
|
return result; |
| 564 |
|
|
| 578 |
|
args_info->bo_given = 0 ; |
| 579 |
|
args_info->bor_given = 0 ; |
| 580 |
|
args_info->bad_given = 0 ; |
| 581 |
+ |
args_info->count_given = 0 ; |
| 582 |
|
args_info->gofr_given = 0 ; |
| 583 |
|
args_info->gofz_given = 0 ; |
| 584 |
|
args_info->r_theta_given = 0 ; |
| 595 |
|
args_info->p_angle_given = 0 ; |
| 596 |
|
args_info->hxy_given = 0 ; |
| 597 |
|
args_info->rho_r_given = 0 ; |
| 598 |
+ |
args_info->angle_r_given = 0 ; |
| 599 |
|
args_info->hullvol_given = 0 ; |
| 600 |
+ |
args_info->rodlength_given = 0 ; |
| 601 |
+ |
args_info->tet_param_given = 0 ; |
| 602 |
+ |
args_info->tet_param_z_given = 0 ; |
| 603 |
+ |
args_info->rnemdz_given = 0 ; |
| 604 |
+ |
args_info->rnemdr_given = 0 ; |
| 605 |
|
|
| 606 |
|
args_info->staticProps_group_counter = 0; |
| 607 |
|
} |
| 608 |
|
|
| 609 |
|
int |
| 610 |
< |
cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) |
| 610 |
> |
cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) |
| 611 |
|
{ |
| 612 |
|
return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); |
| 613 |
|
} |
| 614 |
|
|
| 615 |
|
int |
| 616 |
< |
cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info, |
| 616 |
> |
cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, |
| 617 |
|
struct cmdline_parser_params *params) |
| 618 |
|
{ |
| 619 |
|
int result; |
| 620 |
< |
result = cmdline_parser_internal (argc, argv, args_info, params, NULL); |
| 620 |
> |
result = cmdline_parser_internal (argc, argv, args_info, params, 0); |
| 621 |
|
|
| 622 |
|
if (result == EXIT_FAILURE) |
| 623 |
|
{ |
| 629 |
|
} |
| 630 |
|
|
| 631 |
|
int |
| 632 |
< |
cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) |
| 632 |
> |
cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) |
| 633 |
|
{ |
| 634 |
|
int result; |
| 635 |
|
struct cmdline_parser_params params; |
| 640 |
|
params.check_ambiguity = 0; |
| 641 |
|
params.print_errors = 1; |
| 642 |
|
|
| 643 |
< |
result = cmdline_parser_internal (argc, argv, args_info, ¶ms, NULL); |
| 643 |
> |
result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0); |
| 644 |
|
|
| 645 |
|
if (result == EXIT_FAILURE) |
| 646 |
|
{ |
| 656 |
|
{ |
| 657 |
|
int result = EXIT_SUCCESS; |
| 658 |
|
|
| 659 |
< |
if (cmdline_parser_required2(args_info, prog_name, NULL) > 0) |
| 659 |
> |
if (cmdline_parser_required2(args_info, prog_name, 0) > 0) |
| 660 |
|
result = EXIT_FAILURE; |
| 661 |
|
|
| 662 |
|
if (result == EXIT_FAILURE) |
| 672 |
|
cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error) |
| 673 |
|
{ |
| 674 |
|
int error = 0; |
| 675 |
+ |
FIX_UNUSED (additional_error); |
| 676 |
|
|
| 677 |
|
/* checks for required options */ |
| 678 |
|
if (! args_info->input_given) |
| 683 |
|
|
| 684 |
|
if (args_info->staticProps_group_counter == 0) |
| 685 |
|
{ |
| 686 |
< |
fprintf (stderr, "%s: %d options of group staticProps were given. One is required.%s\n", prog_name, args_info->staticProps_group_counter, (additional_error ? additional_error : "")); |
| 686 |
> |
fprintf (stderr, "%s: %d options of group staticProps were given. One is required%s.\n", prog_name, args_info->staticProps_group_counter, (additional_error ? additional_error : "")); |
| 687 |
|
error = 1; |
| 688 |
|
} |
| 689 |
|
|
| 717 |
|
static |
| 718 |
|
int update_arg(void *field, char **orig_field, |
| 719 |
|
unsigned int *field_given, unsigned int *prev_given, |
| 720 |
< |
char *value, char *possible_values[], const char *default_value, |
| 720 |
> |
char *value, const char *possible_values[], |
| 721 |
> |
const char *default_value, |
| 722 |
|
cmdline_parser_arg_type arg_type, |
| 723 |
|
int check_ambiguity, int override, |
| 724 |
|
int no_free, int multiple_option, |
| 729 |
|
const char *val = value; |
| 730 |
|
int found; |
| 731 |
|
char **string_field; |
| 732 |
+ |
FIX_UNUSED (field); |
| 733 |
|
|
| 734 |
|
stop_char = 0; |
| 735 |
|
found = 0; |
| 747 |
|
return 1; /* failure */ |
| 748 |
|
} |
| 749 |
|
|
| 750 |
+ |
FIX_UNUSED (default_value); |
| 751 |
|
|
| 752 |
|
if (field_given && *field_given && ! override) |
| 753 |
|
return 0; |
| 811 |
|
|
| 812 |
|
|
| 813 |
|
int |
| 814 |
< |
cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, |
| 814 |
> |
cmdline_parser_internal ( |
| 815 |
> |
int argc, char **argv, struct gengetopt_args_info *args_info, |
| 816 |
|
struct cmdline_parser_params *params, const char *additional_error) |
| 817 |
|
{ |
| 818 |
|
int c; /* Character of the parsed option. */ |
| 867 |
|
{ "sele3", 1, NULL, 0 }, |
| 868 |
|
{ "refsele", 1, NULL, 0 }, |
| 869 |
|
{ "comsele", 1, NULL, 0 }, |
| 870 |
+ |
{ "seleoffset", 1, NULL, 0 }, |
| 871 |
|
{ "molname", 1, NULL, 0 }, |
| 872 |
|
{ "begin", 1, NULL, 0 }, |
| 873 |
|
{ "end", 1, NULL, 0 }, |
| 875 |
|
{ "bo", 0, NULL, 0 }, |
| 876 |
|
{ "bor", 0, NULL, 0 }, |
| 877 |
|
{ "bad", 0, NULL, 0 }, |
| 878 |
+ |
{ "count", 0, NULL, 0 }, |
| 879 |
|
{ "gofr", 0, NULL, 'g' }, |
| 880 |
|
{ "gofz", 0, NULL, 0 }, |
| 881 |
|
{ "r_theta", 0, NULL, 0 }, |
| 892 |
|
{ "p_angle", 0, NULL, 0 }, |
| 893 |
|
{ "hxy", 0, NULL, 0 }, |
| 894 |
|
{ "rho_r", 0, NULL, 0 }, |
| 895 |
+ |
{ "angle_r", 0, NULL, 0 }, |
| 896 |
|
{ "hullvol", 0, NULL, 0 }, |
| 897 |
< |
{ NULL, 0, NULL, 0 } |
| 897 |
> |
{ "rodlength", 0, NULL, 0 }, |
| 898 |
> |
{ "tet_param", 0, NULL, 'Q' }, |
| 899 |
> |
{ "tet_param_z", 0, NULL, 0 }, |
| 900 |
> |
{ "rnemdz", 0, NULL, 0 }, |
| 901 |
> |
{ "rnemdr", 0, NULL, 0 }, |
| 902 |
> |
{ 0, 0, 0, 0 } |
| 903 |
|
}; |
| 904 |
|
|
| 905 |
< |
c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index); |
| 905 |
> |
c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index); |
| 906 |
|
|
| 907 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
| 908 |
|
|
| 1041 |
|
goto failure; |
| 1042 |
|
|
| 1043 |
|
break; |
| 1044 |
< |
case 'p': /* p2 order parameter (--sele1 and --sele2 must be specified). */ |
| 1044 |
> |
case 'p': /* p2 order parameter (--sele1 must be specified, --sele2 is optional). */ |
| 1045 |
|
|
| 1046 |
|
if (args_info->staticProps_group_counter && override) |
| 1047 |
|
reset_group_staticProps (args_info); |
| 1082 |
|
&(local_args_info.density_given), optarg, 0, 0, ARG_NO, |
| 1083 |
|
check_ambiguity, override, 0, 0, |
| 1084 |
|
"density", 'd', |
| 1085 |
+ |
additional_error)) |
| 1086 |
+ |
goto failure; |
| 1087 |
+ |
|
| 1088 |
+ |
break; |
| 1089 |
+ |
case 'Q': /* tetrahedrality order parameter (Qk). */ |
| 1090 |
+ |
|
| 1091 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1092 |
+ |
reset_group_staticProps (args_info); |
| 1093 |
+ |
args_info->staticProps_group_counter += 1; |
| 1094 |
+ |
|
| 1095 |
+ |
if (update_arg( 0 , |
| 1096 |
+ |
0 , &(args_info->tet_param_given), |
| 1097 |
+ |
&(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO, |
| 1098 |
+ |
check_ambiguity, override, 0, 0, |
| 1099 |
+ |
"tet_param", 'Q', |
| 1100 |
|
additional_error)) |
| 1101 |
|
goto failure; |
| 1102 |
|
|
| 1229 |
|
goto failure; |
| 1230 |
|
|
| 1231 |
|
} |
| 1232 |
+ |
/* global index offset for a second object (used to define a vector between sites in molecule). */ |
| 1233 |
+ |
else if (strcmp (long_options[option_index].name, "seleoffset") == 0) |
| 1234 |
+ |
{ |
| 1235 |
+ |
|
| 1236 |
+ |
|
| 1237 |
+ |
if (update_arg( (void *)&(args_info->seleoffset_arg), |
| 1238 |
+ |
&(args_info->seleoffset_orig), &(args_info->seleoffset_given), |
| 1239 |
+ |
&(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT, |
| 1240 |
+ |
check_ambiguity, override, 0, 0, |
| 1241 |
+ |
"seleoffset", '-', |
| 1242 |
+ |
additional_error)) |
| 1243 |
+ |
goto failure; |
| 1244 |
+ |
|
| 1245 |
+ |
} |
| 1246 |
|
/* molecule name. */ |
| 1247 |
|
else if (strcmp (long_options[option_index].name, "molname") == 0) |
| 1248 |
|
{ |
| 1346 |
|
&(local_args_info.bad_given), optarg, 0, 0, ARG_NO, |
| 1347 |
|
check_ambiguity, override, 0, 0, |
| 1348 |
|
"bad", '-', |
| 1349 |
+ |
additional_error)) |
| 1350 |
+ |
goto failure; |
| 1351 |
+ |
|
| 1352 |
+ |
} |
| 1353 |
+ |
/* count of molecules matching selection criteria (and associated statistics). */ |
| 1354 |
+ |
else if (strcmp (long_options[option_index].name, "count") == 0) |
| 1355 |
+ |
{ |
| 1356 |
+ |
|
| 1357 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1358 |
+ |
reset_group_staticProps (args_info); |
| 1359 |
+ |
args_info->staticProps_group_counter += 1; |
| 1360 |
+ |
|
| 1361 |
+ |
if (update_arg( 0 , |
| 1362 |
+ |
0 , &(args_info->count_given), |
| 1363 |
+ |
&(local_args_info.count_given), optarg, 0, 0, ARG_NO, |
| 1364 |
+ |
check_ambiguity, override, 0, 0, |
| 1365 |
+ |
"count", '-', |
| 1366 |
|
additional_error)) |
| 1367 |
|
goto failure; |
| 1368 |
|
|
| 1571 |
|
goto failure; |
| 1572 |
|
|
| 1573 |
|
} |
| 1574 |
+ |
/* angle of R. */ |
| 1575 |
+ |
else if (strcmp (long_options[option_index].name, "angle_r") == 0) |
| 1576 |
+ |
{ |
| 1577 |
+ |
|
| 1578 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1579 |
+ |
reset_group_staticProps (args_info); |
| 1580 |
+ |
args_info->staticProps_group_counter += 1; |
| 1581 |
+ |
|
| 1582 |
+ |
if (update_arg( 0 , |
| 1583 |
+ |
0 , &(args_info->angle_r_given), |
| 1584 |
+ |
&(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO, |
| 1585 |
+ |
check_ambiguity, override, 0, 0, |
| 1586 |
+ |
"angle_r", '-', |
| 1587 |
+ |
additional_error)) |
| 1588 |
+ |
goto failure; |
| 1589 |
+ |
|
| 1590 |
+ |
} |
| 1591 |
|
/* hull volume of nanoparticle. */ |
| 1592 |
|
else if (strcmp (long_options[option_index].name, "hullvol") == 0) |
| 1593 |
|
{ |
| 1605 |
|
goto failure; |
| 1606 |
|
|
| 1607 |
|
} |
| 1608 |
+ |
/* length of nanorod. */ |
| 1609 |
+ |
else if (strcmp (long_options[option_index].name, "rodlength") == 0) |
| 1610 |
+ |
{ |
| 1611 |
|
|
| 1612 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1613 |
+ |
reset_group_staticProps (args_info); |
| 1614 |
+ |
args_info->staticProps_group_counter += 1; |
| 1615 |
+ |
|
| 1616 |
+ |
if (update_arg( 0 , |
| 1617 |
+ |
0 , &(args_info->rodlength_given), |
| 1618 |
+ |
&(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO, |
| 1619 |
+ |
check_ambiguity, override, 0, 0, |
| 1620 |
+ |
"rodlength", '-', |
| 1621 |
+ |
additional_error)) |
| 1622 |
+ |
goto failure; |
| 1623 |
+ |
|
| 1624 |
+ |
} |
| 1625 |
+ |
/* spatially-resolved tetrahedrality order parameter Qk(z). */ |
| 1626 |
+ |
else if (strcmp (long_options[option_index].name, "tet_param_z") == 0) |
| 1627 |
+ |
{ |
| 1628 |
+ |
|
| 1629 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1630 |
+ |
reset_group_staticProps (args_info); |
| 1631 |
+ |
args_info->staticProps_group_counter += 1; |
| 1632 |
+ |
|
| 1633 |
+ |
if (update_arg( 0 , |
| 1634 |
+ |
0 , &(args_info->tet_param_z_given), |
| 1635 |
+ |
&(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO, |
| 1636 |
+ |
check_ambiguity, override, 0, 0, |
| 1637 |
+ |
"tet_param_z", '-', |
| 1638 |
+ |
additional_error)) |
| 1639 |
+ |
goto failure; |
| 1640 |
+ |
|
| 1641 |
+ |
} |
| 1642 |
+ |
/* slab-resolved RNEMD statistics (temperature, density, velocity). */ |
| 1643 |
+ |
else if (strcmp (long_options[option_index].name, "rnemdz") == 0) |
| 1644 |
+ |
{ |
| 1645 |
+ |
|
| 1646 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1647 |
+ |
reset_group_staticProps (args_info); |
| 1648 |
+ |
args_info->staticProps_group_counter += 1; |
| 1649 |
+ |
|
| 1650 |
+ |
if (update_arg( 0 , |
| 1651 |
+ |
0 , &(args_info->rnemdz_given), |
| 1652 |
+ |
&(local_args_info.rnemdz_given), optarg, 0, 0, ARG_NO, |
| 1653 |
+ |
check_ambiguity, override, 0, 0, |
| 1654 |
+ |
"rnemdz", '-', |
| 1655 |
+ |
additional_error)) |
| 1656 |
+ |
goto failure; |
| 1657 |
+ |
|
| 1658 |
+ |
} |
| 1659 |
+ |
/* shell-resolved RNEMD statistics (temperature, density, angular velocity). */ |
| 1660 |
+ |
else if (strcmp (long_options[option_index].name, "rnemdr") == 0) |
| 1661 |
+ |
{ |
| 1662 |
+ |
|
| 1663 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1664 |
+ |
reset_group_staticProps (args_info); |
| 1665 |
+ |
args_info->staticProps_group_counter += 1; |
| 1666 |
+ |
|
| 1667 |
+ |
if (update_arg( 0 , |
| 1668 |
+ |
0 , &(args_info->rnemdr_given), |
| 1669 |
+ |
&(local_args_info.rnemdr_given), optarg, 0, 0, ARG_NO, |
| 1670 |
+ |
check_ambiguity, override, 0, 0, |
| 1671 |
+ |
"rnemdr", '-', |
| 1672 |
+ |
additional_error)) |
| 1673 |
+ |
goto failure; |
| 1674 |
+ |
|
| 1675 |
+ |
} |
| 1676 |
+ |
|
| 1677 |
|
break; |
| 1678 |
|
case '?': /* Invalid option. */ |
| 1679 |
|
/* `getopt_long' already printed an error message. */ |
| 1687 |
|
|
| 1688 |
|
if (args_info->staticProps_group_counter > 1) |
| 1689 |
|
{ |
| 1690 |
< |
fprintf (stderr, "%s: %d options of group staticProps were given. One is required.%s\n", argv[0], args_info->staticProps_group_counter, (additional_error ? additional_error : "")); |
| 1690 |
> |
fprintf (stderr, "%s: %d options of group staticProps were given. One is required%s.\n", argv[0], args_info->staticProps_group_counter, (additional_error ? additional_error : "")); |
| 1691 |
|
error = 1; |
| 1692 |
|
} |
| 1693 |
|
|