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 |
|
0 |
87 |
|
}; |
88 |
|
|
98 |
|
void clear_args (struct gengetopt_args_info *args_info); |
99 |
|
|
100 |
|
static int |
101 |
< |
cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, |
101 |
> |
cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, |
102 |
|
struct cmdline_parser_params *params, const char *additional_error); |
103 |
|
|
104 |
|
static int |
130 |
|
args_info->sele3_given = 0 ; |
131 |
|
args_info->refsele_given = 0 ; |
132 |
|
args_info->comsele_given = 0 ; |
133 |
+ |
args_info->seleoffset_given = 0 ; |
134 |
|
args_info->molname_given = 0 ; |
135 |
|
args_info->begin_given = 0 ; |
136 |
|
args_info->end_given = 0 ; |
138 |
|
args_info->bo_given = 0 ; |
139 |
|
args_info->bor_given = 0 ; |
140 |
|
args_info->bad_given = 0 ; |
141 |
+ |
args_info->count_given = 0 ; |
142 |
|
args_info->gofr_given = 0 ; |
143 |
|
args_info->gofz_given = 0 ; |
144 |
|
args_info->r_theta_given = 0 ; |
155 |
|
args_info->p_angle_given = 0 ; |
156 |
|
args_info->hxy_given = 0 ; |
157 |
|
args_info->rho_r_given = 0 ; |
158 |
+ |
args_info->angle_r_given = 0 ; |
159 |
|
args_info->hullvol_given = 0 ; |
160 |
+ |
args_info->rodlength_given = 0 ; |
161 |
+ |
args_info->tet_param_given = 0 ; |
162 |
+ |
args_info->tet_param_z_given = 0 ; |
163 |
|
args_info->staticProps_group_counter = 0 ; |
164 |
|
} |
165 |
|
|
166 |
|
static |
167 |
|
void clear_args (struct gengetopt_args_info *args_info) |
168 |
|
{ |
169 |
+ |
FIX_UNUSED (args_info); |
170 |
|
args_info->input_arg = NULL; |
171 |
|
args_info->input_orig = NULL; |
172 |
|
args_info->output_arg = NULL; |
199 |
|
args_info->refsele_orig = NULL; |
200 |
|
args_info->comsele_arg = NULL; |
201 |
|
args_info->comsele_orig = NULL; |
202 |
+ |
args_info->seleoffset_orig = NULL; |
203 |
|
args_info->molname_arg = NULL; |
204 |
|
args_info->molname_orig = NULL; |
205 |
|
args_info->begin_orig = NULL; |
233 |
|
args_info->sele3_help = gengetopt_args_info_help[17] ; |
234 |
|
args_info->refsele_help = gengetopt_args_info_help[18] ; |
235 |
|
args_info->comsele_help = gengetopt_args_info_help[19] ; |
236 |
< |
args_info->molname_help = gengetopt_args_info_help[20] ; |
237 |
< |
args_info->begin_help = gengetopt_args_info_help[21] ; |
238 |
< |
args_info->end_help = gengetopt_args_info_help[22] ; |
239 |
< |
args_info->radius_help = gengetopt_args_info_help[23] ; |
240 |
< |
args_info->bo_help = gengetopt_args_info_help[25] ; |
241 |
< |
args_info->bor_help = gengetopt_args_info_help[26] ; |
242 |
< |
args_info->bad_help = gengetopt_args_info_help[27] ; |
243 |
< |
args_info->gofr_help = gengetopt_args_info_help[28] ; |
244 |
< |
args_info->gofz_help = gengetopt_args_info_help[29] ; |
245 |
< |
args_info->r_theta_help = gengetopt_args_info_help[30] ; |
246 |
< |
args_info->r_omega_help = gengetopt_args_info_help[31] ; |
247 |
< |
args_info->r_z_help = gengetopt_args_info_help[32] ; |
248 |
< |
args_info->theta_omega_help = gengetopt_args_info_help[33] ; |
249 |
< |
args_info->gxyz_help = gengetopt_args_info_help[34] ; |
250 |
< |
args_info->twodgofr_help = gengetopt_args_info_help[35] ; |
251 |
< |
args_info->p2_help = gengetopt_args_info_help[36] ; |
252 |
< |
args_info->rp2_help = gengetopt_args_info_help[37] ; |
253 |
< |
args_info->scd_help = gengetopt_args_info_help[38] ; |
254 |
< |
args_info->density_help = gengetopt_args_info_help[39] ; |
255 |
< |
args_info->slab_density_help = gengetopt_args_info_help[40] ; |
256 |
< |
args_info->p_angle_help = gengetopt_args_info_help[41] ; |
257 |
< |
args_info->hxy_help = gengetopt_args_info_help[42] ; |
258 |
< |
args_info->rho_r_help = gengetopt_args_info_help[43] ; |
259 |
< |
args_info->hullvol_help = gengetopt_args_info_help[44] ; |
236 |
> |
args_info->seleoffset_help = gengetopt_args_info_help[20] ; |
237 |
> |
args_info->molname_help = gengetopt_args_info_help[21] ; |
238 |
> |
args_info->begin_help = gengetopt_args_info_help[22] ; |
239 |
> |
args_info->end_help = gengetopt_args_info_help[23] ; |
240 |
> |
args_info->radius_help = gengetopt_args_info_help[24] ; |
241 |
> |
args_info->bo_help = gengetopt_args_info_help[26] ; |
242 |
> |
args_info->bor_help = gengetopt_args_info_help[27] ; |
243 |
> |
args_info->bad_help = gengetopt_args_info_help[28] ; |
244 |
> |
args_info->count_help = gengetopt_args_info_help[29] ; |
245 |
> |
args_info->gofr_help = gengetopt_args_info_help[30] ; |
246 |
> |
args_info->gofz_help = gengetopt_args_info_help[31] ; |
247 |
> |
args_info->r_theta_help = gengetopt_args_info_help[32] ; |
248 |
> |
args_info->r_omega_help = gengetopt_args_info_help[33] ; |
249 |
> |
args_info->r_z_help = gengetopt_args_info_help[34] ; |
250 |
> |
args_info->theta_omega_help = gengetopt_args_info_help[35] ; |
251 |
> |
args_info->gxyz_help = gengetopt_args_info_help[36] ; |
252 |
> |
args_info->twodgofr_help = gengetopt_args_info_help[37] ; |
253 |
> |
args_info->p2_help = gengetopt_args_info_help[38] ; |
254 |
> |
args_info->rp2_help = gengetopt_args_info_help[39] ; |
255 |
> |
args_info->scd_help = gengetopt_args_info_help[40] ; |
256 |
> |
args_info->density_help = gengetopt_args_info_help[41] ; |
257 |
> |
args_info->slab_density_help = gengetopt_args_info_help[42] ; |
258 |
> |
args_info->p_angle_help = gengetopt_args_info_help[43] ; |
259 |
> |
args_info->hxy_help = gengetopt_args_info_help[44] ; |
260 |
> |
args_info->rho_r_help = gengetopt_args_info_help[45] ; |
261 |
> |
args_info->angle_r_help = gengetopt_args_info_help[46] ; |
262 |
> |
args_info->hullvol_help = gengetopt_args_info_help[47] ; |
263 |
> |
args_info->rodlength_help = gengetopt_args_info_help[48] ; |
264 |
> |
args_info->tet_param_help = gengetopt_args_info_help[49] ; |
265 |
> |
args_info->tet_param_z_help = gengetopt_args_info_help[50] ; |
266 |
|
|
267 |
|
} |
268 |
|
|
269 |
|
void |
270 |
|
cmdline_parser_print_version (void) |
271 |
|
{ |
272 |
< |
printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); |
272 |
> |
printf ("%s %s\n", |
273 |
> |
(strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), |
274 |
> |
CMDLINE_PARSER_VERSION); |
275 |
|
} |
276 |
|
|
277 |
|
static void print_help_common(void) { |
286 |
|
printf("\n"); |
287 |
|
|
288 |
|
if (strlen(gengetopt_args_info_description) > 0) |
289 |
< |
printf("%s\n", gengetopt_args_info_description); |
289 |
> |
printf("%s\n\n", gengetopt_args_info_description); |
290 |
|
} |
291 |
|
|
292 |
|
void |
305 |
|
clear_args (args_info); |
306 |
|
init_args_info (args_info); |
307 |
|
|
308 |
< |
args_info->inputs = NULL; |
308 |
> |
args_info->inputs = 0; |
309 |
|
args_info->inputs_num = 0; |
310 |
|
} |
311 |
|
|
371 |
|
free_string_field (&(args_info->refsele_orig)); |
372 |
|
free_string_field (&(args_info->comsele_arg)); |
373 |
|
free_string_field (&(args_info->comsele_orig)); |
374 |
+ |
free_string_field (&(args_info->seleoffset_orig)); |
375 |
|
free_string_field (&(args_info->molname_arg)); |
376 |
|
free_string_field (&(args_info->molname_orig)); |
377 |
|
free_string_field (&(args_info->begin_orig)); |
390 |
|
|
391 |
|
|
392 |
|
static void |
393 |
< |
write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[]) |
393 |
> |
write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) |
394 |
|
{ |
395 |
+ |
FIX_UNUSED (values); |
396 |
|
if (arg) { |
397 |
|
fprintf(outfile, "%s=\"%s\"\n", opt, arg); |
398 |
|
} else { |
452 |
|
write_into_file(outfile, "refsele", args_info->refsele_orig, 0); |
453 |
|
if (args_info->comsele_given) |
454 |
|
write_into_file(outfile, "comsele", args_info->comsele_orig, 0); |
455 |
+ |
if (args_info->seleoffset_given) |
456 |
+ |
write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0); |
457 |
|
if (args_info->molname_given) |
458 |
|
write_into_file(outfile, "molname", args_info->molname_orig, 0); |
459 |
|
if (args_info->begin_given) |
468 |
|
write_into_file(outfile, "bor", 0, 0 ); |
469 |
|
if (args_info->bad_given) |
470 |
|
write_into_file(outfile, "bad", 0, 0 ); |
471 |
+ |
if (args_info->count_given) |
472 |
+ |
write_into_file(outfile, "count", 0, 0 ); |
473 |
|
if (args_info->gofr_given) |
474 |
|
write_into_file(outfile, "gofr", 0, 0 ); |
475 |
|
if (args_info->gofz_given) |
502 |
|
write_into_file(outfile, "hxy", 0, 0 ); |
503 |
|
if (args_info->rho_r_given) |
504 |
|
write_into_file(outfile, "rho_r", 0, 0 ); |
505 |
+ |
if (args_info->angle_r_given) |
506 |
+ |
write_into_file(outfile, "angle_r", 0, 0 ); |
507 |
|
if (args_info->hullvol_given) |
508 |
|
write_into_file(outfile, "hullvol", 0, 0 ); |
509 |
+ |
if (args_info->rodlength_given) |
510 |
+ |
write_into_file(outfile, "rodlength", 0, 0 ); |
511 |
+ |
if (args_info->tet_param_given) |
512 |
+ |
write_into_file(outfile, "tet_param", 0, 0 ); |
513 |
+ |
if (args_info->tet_param_z_given) |
514 |
+ |
write_into_file(outfile, "tet_param_z", 0, 0 ); |
515 |
|
|
516 |
|
|
517 |
|
i = EXIT_SUCCESS; |
548 |
|
char * |
549 |
|
gengetopt_strdup (const char *s) |
550 |
|
{ |
551 |
< |
char *result = NULL; |
551 |
> |
char *result = 0; |
552 |
|
if (!s) |
553 |
|
return result; |
554 |
|
|
568 |
|
args_info->bo_given = 0 ; |
569 |
|
args_info->bor_given = 0 ; |
570 |
|
args_info->bad_given = 0 ; |
571 |
+ |
args_info->count_given = 0 ; |
572 |
|
args_info->gofr_given = 0 ; |
573 |
|
args_info->gofz_given = 0 ; |
574 |
|
args_info->r_theta_given = 0 ; |
585 |
|
args_info->p_angle_given = 0 ; |
586 |
|
args_info->hxy_given = 0 ; |
587 |
|
args_info->rho_r_given = 0 ; |
588 |
+ |
args_info->angle_r_given = 0 ; |
589 |
|
args_info->hullvol_given = 0 ; |
590 |
+ |
args_info->rodlength_given = 0 ; |
591 |
+ |
args_info->tet_param_given = 0 ; |
592 |
+ |
args_info->tet_param_z_given = 0 ; |
593 |
|
|
594 |
|
args_info->staticProps_group_counter = 0; |
595 |
|
} |
596 |
|
|
597 |
|
int |
598 |
< |
cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) |
598 |
> |
cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) |
599 |
|
{ |
600 |
|
return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); |
601 |
|
} |
602 |
|
|
603 |
|
int |
604 |
< |
cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info, |
604 |
> |
cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, |
605 |
|
struct cmdline_parser_params *params) |
606 |
|
{ |
607 |
|
int result; |
608 |
< |
result = cmdline_parser_internal (argc, argv, args_info, params, NULL); |
608 |
> |
result = cmdline_parser_internal (argc, argv, args_info, params, 0); |
609 |
|
|
610 |
|
if (result == EXIT_FAILURE) |
611 |
|
{ |
617 |
|
} |
618 |
|
|
619 |
|
int |
620 |
< |
cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) |
620 |
> |
cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) |
621 |
|
{ |
622 |
|
int result; |
623 |
|
struct cmdline_parser_params params; |
628 |
|
params.check_ambiguity = 0; |
629 |
|
params.print_errors = 1; |
630 |
|
|
631 |
< |
result = cmdline_parser_internal (argc, argv, args_info, ¶ms, NULL); |
631 |
> |
result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0); |
632 |
|
|
633 |
|
if (result == EXIT_FAILURE) |
634 |
|
{ |
644 |
|
{ |
645 |
|
int result = EXIT_SUCCESS; |
646 |
|
|
647 |
< |
if (cmdline_parser_required2(args_info, prog_name, NULL) > 0) |
647 |
> |
if (cmdline_parser_required2(args_info, prog_name, 0) > 0) |
648 |
|
result = EXIT_FAILURE; |
649 |
|
|
650 |
|
if (result == EXIT_FAILURE) |
660 |
|
cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error) |
661 |
|
{ |
662 |
|
int error = 0; |
663 |
+ |
FIX_UNUSED (additional_error); |
664 |
|
|
665 |
|
/* checks for required options */ |
666 |
|
if (! args_info->input_given) |
671 |
|
|
672 |
|
if (args_info->staticProps_group_counter == 0) |
673 |
|
{ |
674 |
< |
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 : "")); |
674 |
> |
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 : "")); |
675 |
|
error = 1; |
676 |
|
} |
677 |
|
|
705 |
|
static |
706 |
|
int update_arg(void *field, char **orig_field, |
707 |
|
unsigned int *field_given, unsigned int *prev_given, |
708 |
< |
char *value, char *possible_values[], const char *default_value, |
708 |
> |
char *value, const char *possible_values[], |
709 |
> |
const char *default_value, |
710 |
|
cmdline_parser_arg_type arg_type, |
711 |
|
int check_ambiguity, int override, |
712 |
|
int no_free, int multiple_option, |
717 |
|
const char *val = value; |
718 |
|
int found; |
719 |
|
char **string_field; |
720 |
+ |
FIX_UNUSED (field); |
721 |
|
|
722 |
|
stop_char = 0; |
723 |
|
found = 0; |
735 |
|
return 1; /* failure */ |
736 |
|
} |
737 |
|
|
738 |
+ |
FIX_UNUSED (default_value); |
739 |
|
|
740 |
|
if (field_given && *field_given && ! override) |
741 |
|
return 0; |
799 |
|
|
800 |
|
|
801 |
|
int |
802 |
< |
cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, |
802 |
> |
cmdline_parser_internal ( |
803 |
> |
int argc, char **argv, struct gengetopt_args_info *args_info, |
804 |
|
struct cmdline_parser_params *params, const char *additional_error) |
805 |
|
{ |
806 |
|
int c; /* Character of the parsed option. */ |
855 |
|
{ "sele3", 1, NULL, 0 }, |
856 |
|
{ "refsele", 1, NULL, 0 }, |
857 |
|
{ "comsele", 1, NULL, 0 }, |
858 |
+ |
{ "seleoffset", 1, NULL, 0 }, |
859 |
|
{ "molname", 1, NULL, 0 }, |
860 |
|
{ "begin", 1, NULL, 0 }, |
861 |
|
{ "end", 1, NULL, 0 }, |
863 |
|
{ "bo", 0, NULL, 0 }, |
864 |
|
{ "bor", 0, NULL, 0 }, |
865 |
|
{ "bad", 0, NULL, 0 }, |
866 |
+ |
{ "count", 0, NULL, 0 }, |
867 |
|
{ "gofr", 0, NULL, 'g' }, |
868 |
|
{ "gofz", 0, NULL, 0 }, |
869 |
|
{ "r_theta", 0, NULL, 0 }, |
880 |
|
{ "p_angle", 0, NULL, 0 }, |
881 |
|
{ "hxy", 0, NULL, 0 }, |
882 |
|
{ "rho_r", 0, NULL, 0 }, |
883 |
+ |
{ "angle_r", 0, NULL, 0 }, |
884 |
|
{ "hullvol", 0, NULL, 0 }, |
885 |
< |
{ NULL, 0, NULL, 0 } |
885 |
> |
{ "rodlength", 0, NULL, 0 }, |
886 |
> |
{ "tet_param", 0, NULL, 'Q' }, |
887 |
> |
{ "tet_param_z", 0, NULL, 0 }, |
888 |
> |
{ 0, 0, 0, 0 } |
889 |
|
}; |
890 |
|
|
891 |
< |
c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index); |
891 |
> |
c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index); |
892 |
|
|
893 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
894 |
|
|
1027 |
|
goto failure; |
1028 |
|
|
1029 |
|
break; |
1030 |
< |
case 'p': /* p2 order parameter (--sele1 and --sele2 must be specified). */ |
1030 |
> |
case 'p': /* p2 order parameter (--sele1 must be specified, --sele2 is optional). */ |
1031 |
|
|
1032 |
|
if (args_info->staticProps_group_counter && override) |
1033 |
|
reset_group_staticProps (args_info); |
1072 |
|
goto failure; |
1073 |
|
|
1074 |
|
break; |
1075 |
+ |
case 'Q': /* tetrahedrality order parameter (Qk). */ |
1076 |
+ |
|
1077 |
+ |
if (args_info->staticProps_group_counter && override) |
1078 |
+ |
reset_group_staticProps (args_info); |
1079 |
+ |
args_info->staticProps_group_counter += 1; |
1080 |
+ |
|
1081 |
+ |
if (update_arg( 0 , |
1082 |
+ |
0 , &(args_info->tet_param_given), |
1083 |
+ |
&(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO, |
1084 |
+ |
check_ambiguity, override, 0, 0, |
1085 |
+ |
"tet_param", 'Q', |
1086 |
+ |
additional_error)) |
1087 |
+ |
goto failure; |
1088 |
+ |
|
1089 |
+ |
break; |
1090 |
|
|
1091 |
|
case 0: /* Long option with no short option */ |
1092 |
|
/* number of bins in z axis. */ |
1215 |
|
goto failure; |
1216 |
|
|
1217 |
|
} |
1218 |
+ |
/* global index offset for a second object (used to define a vector between sites in molecule). */ |
1219 |
+ |
else if (strcmp (long_options[option_index].name, "seleoffset") == 0) |
1220 |
+ |
{ |
1221 |
+ |
|
1222 |
+ |
|
1223 |
+ |
if (update_arg( (void *)&(args_info->seleoffset_arg), |
1224 |
+ |
&(args_info->seleoffset_orig), &(args_info->seleoffset_given), |
1225 |
+ |
&(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT, |
1226 |
+ |
check_ambiguity, override, 0, 0, |
1227 |
+ |
"seleoffset", '-', |
1228 |
+ |
additional_error)) |
1229 |
+ |
goto failure; |
1230 |
+ |
|
1231 |
+ |
} |
1232 |
|
/* molecule name. */ |
1233 |
|
else if (strcmp (long_options[option_index].name, "molname") == 0) |
1234 |
|
{ |
1336 |
|
goto failure; |
1337 |
|
|
1338 |
|
} |
1339 |
+ |
/* count of molecules matching selection criteria (and associated statistics). */ |
1340 |
+ |
else if (strcmp (long_options[option_index].name, "count") == 0) |
1341 |
+ |
{ |
1342 |
+ |
|
1343 |
+ |
if (args_info->staticProps_group_counter && override) |
1344 |
+ |
reset_group_staticProps (args_info); |
1345 |
+ |
args_info->staticProps_group_counter += 1; |
1346 |
+ |
|
1347 |
+ |
if (update_arg( 0 , |
1348 |
+ |
0 , &(args_info->count_given), |
1349 |
+ |
&(local_args_info.count_given), optarg, 0, 0, ARG_NO, |
1350 |
+ |
check_ambiguity, override, 0, 0, |
1351 |
+ |
"count", '-', |
1352 |
+ |
additional_error)) |
1353 |
+ |
goto failure; |
1354 |
+ |
|
1355 |
+ |
} |
1356 |
|
/* g(z). */ |
1357 |
|
else if (strcmp (long_options[option_index].name, "gofz") == 0) |
1358 |
|
{ |
1557 |
|
goto failure; |
1558 |
|
|
1559 |
|
} |
1560 |
+ |
/* angle of R. */ |
1561 |
+ |
else if (strcmp (long_options[option_index].name, "angle_r") == 0) |
1562 |
+ |
{ |
1563 |
+ |
|
1564 |
+ |
if (args_info->staticProps_group_counter && override) |
1565 |
+ |
reset_group_staticProps (args_info); |
1566 |
+ |
args_info->staticProps_group_counter += 1; |
1567 |
+ |
|
1568 |
+ |
if (update_arg( 0 , |
1569 |
+ |
0 , &(args_info->angle_r_given), |
1570 |
+ |
&(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO, |
1571 |
+ |
check_ambiguity, override, 0, 0, |
1572 |
+ |
"angle_r", '-', |
1573 |
+ |
additional_error)) |
1574 |
+ |
goto failure; |
1575 |
+ |
|
1576 |
+ |
} |
1577 |
|
/* hull volume of nanoparticle. */ |
1578 |
|
else if (strcmp (long_options[option_index].name, "hullvol") == 0) |
1579 |
|
{ |
1591 |
|
goto failure; |
1592 |
|
|
1593 |
|
} |
1594 |
+ |
/* length of nanorod. */ |
1595 |
+ |
else if (strcmp (long_options[option_index].name, "rodlength") == 0) |
1596 |
+ |
{ |
1597 |
|
|
1598 |
+ |
if (args_info->staticProps_group_counter && override) |
1599 |
+ |
reset_group_staticProps (args_info); |
1600 |
+ |
args_info->staticProps_group_counter += 1; |
1601 |
+ |
|
1602 |
+ |
if (update_arg( 0 , |
1603 |
+ |
0 , &(args_info->rodlength_given), |
1604 |
+ |
&(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO, |
1605 |
+ |
check_ambiguity, override, 0, 0, |
1606 |
+ |
"rodlength", '-', |
1607 |
+ |
additional_error)) |
1608 |
+ |
goto failure; |
1609 |
+ |
|
1610 |
+ |
} |
1611 |
+ |
/* spatially-resolved tetrahedrality order parameter Qk(z). */ |
1612 |
+ |
else if (strcmp (long_options[option_index].name, "tet_param_z") == 0) |
1613 |
+ |
{ |
1614 |
+ |
|
1615 |
+ |
if (args_info->staticProps_group_counter && override) |
1616 |
+ |
reset_group_staticProps (args_info); |
1617 |
+ |
args_info->staticProps_group_counter += 1; |
1618 |
+ |
|
1619 |
+ |
if (update_arg( 0 , |
1620 |
+ |
0 , &(args_info->tet_param_z_given), |
1621 |
+ |
&(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO, |
1622 |
+ |
check_ambiguity, override, 0, 0, |
1623 |
+ |
"tet_param_z", '-', |
1624 |
+ |
additional_error)) |
1625 |
+ |
goto failure; |
1626 |
+ |
|
1627 |
+ |
} |
1628 |
+ |
|
1629 |
|
break; |
1630 |
|
case '?': /* Invalid option. */ |
1631 |
|
/* `getopt_long' already printed an error message. */ |
1639 |
|
|
1640 |
|
if (args_info->staticProps_group_counter > 1) |
1641 |
|
{ |
1642 |
< |
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 : "")); |
1642 |
> |
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 : "")); |
1643 |
|
error = 1; |
1644 |
|
} |
1645 |
|
|