ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/staticProps/StaticPropsCmd.cpp
(Generate patch)

Comparing:
trunk/src/applications/staticProps/StaticPropsCmd.c (file contents), Revision 1454 by gezelter, Wed Jun 23 19:25:02 2010 UTC vs.
trunk/src/applications/staticProps/StaticPropsCmd.cpp (file contents), Revision 1991 by gezelter, Wed Apr 23 20:34:17 2014 UTC

# Line 1 | Line 1
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:
# Line 17 | Line 17
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 + #ifdef WIN32
25 + #include "utils/wingetopt.h"
26 + #else
27 + #include <getopt.h>
28 + #endif
29 +
30   #include "StaticPropsCmd.h"
31  
32   const char *gengetopt_args_info_purpose = "";
# Line 48 | Line 56 | const char *gengetopt_args_info_help[] = {
56    "      --sele3=selection script  select the third stuntdouble set",
57    "      --refsele=selection script\n                                select reference (use and only use with --gxyz)",
58    "      --comsele=selection script\n                                select stunt doubles for center-of-mass \n                                  reference point",
59 +  "      --seleoffset=INT          global index offset for a second object (used \n                                  to define a vector between sites in molecule)",
60 +  "      --seleoffset2=INT         global index offset for a third object (used to \n                                  define a vector between sites in molecule)",
61    "      --molname=STRING          molecule name",
62    "      --begin=INT               begin internal index",
63    "      --end=INT                 end internal index",
# Line 56 | Line 66 | const char *gengetopt_args_info_help[] = {
66    "      --bo                      bond order parameter (--rcut must be specified)",
67    "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)",
68    "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)",
69 +  "      --count                   count of molecules matching selection criteria \n                                  (and associated statistics)",
70    "  -g, --gofr                    g(r)",
71    "      --gofz                    g(z)",
72    "      --r_theta                 g(r, cos(theta))",
# Line 64 | Line 75 | const char *gengetopt_args_info_help[] = {
75    "      --theta_omega             g(cos(theta), cos(omega))",
76    "      --gxyz                    g(x, y, z)",
77    "      --twodgofr                2D g(r) (Slab width --dz must be specified)",
78 <  "  -p, --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)",
78 >  "  -p, --p2                      p2 order parameter (--sele1 must be specified, \n                                  --sele2 is optional)",
79    "      --rp2                     rp2 order parameter (--sele1 and --sele2 must \n                                  be specified)",
80    "  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)",
81    "  -d, --density                 density plot",
82    "      --slab_density            slab density",
83 <  "      --p_angle                 p(cos(theta))",
83 >  "      --p_angle                 p(cos(theta)) (--sele1 must be specified, \n                                  --sele2 is optional)",
84    "      --hxy                     hxy",
85    "      --rho_r                   rho of R",
86 +  "      --angle_r                 angle of R",
87    "      --hullvol                 hull volume of nanoparticle",
88 +  "      --rodlength               length of nanorod",
89 +  "  -Q, --tet_param               tetrahedrality order parameter (Qk)",
90 +  "      --tet_param_z             spatially-resolved tetrahedrality order \n                                  parameter Qk(z)",
91 +  "      --rnemdz                  slab-resolved RNEMD statistics (temperature, \n                                  density, velocity)",
92 +  "      --rnemdr                  shell-resolved RNEMD statistics (temperature, \n                                  density, angular velocity)",
93 +  "      --rnemdrt                 shell and angle-resolved RNEMD statistics \n                                  (temperature, density, angular velocity)",
94      0
95   };
96  
# Line 88 | Line 106 | static int
106   void clear_args (struct gengetopt_args_info *args_info);
107  
108   static int
109 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
109 > cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
110                          struct cmdline_parser_params *params, const char *additional_error);
111  
112   static int
# Line 120 | Line 138 | void clear_given (struct gengetopt_args_info *args_inf
138    args_info->sele3_given = 0 ;
139    args_info->refsele_given = 0 ;
140    args_info->comsele_given = 0 ;
141 +  args_info->seleoffset_given = 0 ;
142 +  args_info->seleoffset2_given = 0 ;
143    args_info->molname_given = 0 ;
144    args_info->begin_given = 0 ;
145    args_info->end_given = 0 ;
# Line 127 | Line 147 | void clear_given (struct gengetopt_args_info *args_inf
147    args_info->bo_given = 0 ;
148    args_info->bor_given = 0 ;
149    args_info->bad_given = 0 ;
150 +  args_info->count_given = 0 ;
151    args_info->gofr_given = 0 ;
152    args_info->gofz_given = 0 ;
153    args_info->r_theta_given = 0 ;
# Line 143 | Line 164 | void clear_given (struct gengetopt_args_info *args_inf
164    args_info->p_angle_given = 0 ;
165    args_info->hxy_given = 0 ;
166    args_info->rho_r_given = 0 ;
167 +  args_info->angle_r_given = 0 ;
168    args_info->hullvol_given = 0 ;
169 +  args_info->rodlength_given = 0 ;
170 +  args_info->tet_param_given = 0 ;
171 +  args_info->tet_param_z_given = 0 ;
172 +  args_info->rnemdz_given = 0 ;
173 +  args_info->rnemdr_given = 0 ;
174 +  args_info->rnemdrt_given = 0 ;
175    args_info->staticProps_group_counter = 0 ;
176   }
177  
178   static
179   void clear_args (struct gengetopt_args_info *args_info)
180   {
181 +  FIX_UNUSED (args_info);
182    args_info->input_arg = NULL;
183    args_info->input_orig = NULL;
184    args_info->output_arg = NULL;
# Line 182 | Line 211 | void clear_args (struct gengetopt_args_info *args_info
211    args_info->refsele_orig = NULL;
212    args_info->comsele_arg = NULL;
213    args_info->comsele_orig = NULL;
214 +  args_info->seleoffset_orig = NULL;
215 +  args_info->seleoffset2_orig = NULL;
216    args_info->molname_arg = NULL;
217    args_info->molname_orig = NULL;
218    args_info->begin_orig = NULL;
# Line 215 | Line 246 | void init_args_info(struct gengetopt_args_info *args_i
246    args_info->sele3_help = gengetopt_args_info_help[17] ;
247    args_info->refsele_help = gengetopt_args_info_help[18] ;
248    args_info->comsele_help = gengetopt_args_info_help[19] ;
249 <  args_info->molname_help = gengetopt_args_info_help[20] ;
250 <  args_info->begin_help = gengetopt_args_info_help[21] ;
251 <  args_info->end_help = gengetopt_args_info_help[22] ;
252 <  args_info->radius_help = gengetopt_args_info_help[23] ;
253 <  args_info->bo_help = gengetopt_args_info_help[25] ;
254 <  args_info->bor_help = gengetopt_args_info_help[26] ;
255 <  args_info->bad_help = gengetopt_args_info_help[27] ;
256 <  args_info->gofr_help = gengetopt_args_info_help[28] ;
257 <  args_info->gofz_help = gengetopt_args_info_help[29] ;
258 <  args_info->r_theta_help = gengetopt_args_info_help[30] ;
259 <  args_info->r_omega_help = gengetopt_args_info_help[31] ;
260 <  args_info->r_z_help = gengetopt_args_info_help[32] ;
261 <  args_info->theta_omega_help = gengetopt_args_info_help[33] ;
262 <  args_info->gxyz_help = gengetopt_args_info_help[34] ;
263 <  args_info->twodgofr_help = gengetopt_args_info_help[35] ;
264 <  args_info->p2_help = gengetopt_args_info_help[36] ;
265 <  args_info->rp2_help = gengetopt_args_info_help[37] ;
266 <  args_info->scd_help = gengetopt_args_info_help[38] ;
267 <  args_info->density_help = gengetopt_args_info_help[39] ;
268 <  args_info->slab_density_help = gengetopt_args_info_help[40] ;
269 <  args_info->p_angle_help = gengetopt_args_info_help[41] ;
270 <  args_info->hxy_help = gengetopt_args_info_help[42] ;
271 <  args_info->rho_r_help = gengetopt_args_info_help[43] ;
272 <  args_info->hullvol_help = gengetopt_args_info_help[44] ;
249 >  args_info->seleoffset_help = gengetopt_args_info_help[20] ;
250 >  args_info->seleoffset2_help = gengetopt_args_info_help[21] ;
251 >  args_info->molname_help = gengetopt_args_info_help[22] ;
252 >  args_info->begin_help = gengetopt_args_info_help[23] ;
253 >  args_info->end_help = gengetopt_args_info_help[24] ;
254 >  args_info->radius_help = gengetopt_args_info_help[25] ;
255 >  args_info->bo_help = gengetopt_args_info_help[27] ;
256 >  args_info->bor_help = gengetopt_args_info_help[28] ;
257 >  args_info->bad_help = gengetopt_args_info_help[29] ;
258 >  args_info->count_help = gengetopt_args_info_help[30] ;
259 >  args_info->gofr_help = gengetopt_args_info_help[31] ;
260 >  args_info->gofz_help = gengetopt_args_info_help[32] ;
261 >  args_info->r_theta_help = gengetopt_args_info_help[33] ;
262 >  args_info->r_omega_help = gengetopt_args_info_help[34] ;
263 >  args_info->r_z_help = gengetopt_args_info_help[35] ;
264 >  args_info->theta_omega_help = gengetopt_args_info_help[36] ;
265 >  args_info->gxyz_help = gengetopt_args_info_help[37] ;
266 >  args_info->twodgofr_help = gengetopt_args_info_help[38] ;
267 >  args_info->p2_help = gengetopt_args_info_help[39] ;
268 >  args_info->rp2_help = gengetopt_args_info_help[40] ;
269 >  args_info->scd_help = gengetopt_args_info_help[41] ;
270 >  args_info->density_help = gengetopt_args_info_help[42] ;
271 >  args_info->slab_density_help = gengetopt_args_info_help[43] ;
272 >  args_info->p_angle_help = gengetopt_args_info_help[44] ;
273 >  args_info->hxy_help = gengetopt_args_info_help[45] ;
274 >  args_info->rho_r_help = gengetopt_args_info_help[46] ;
275 >  args_info->angle_r_help = gengetopt_args_info_help[47] ;
276 >  args_info->hullvol_help = gengetopt_args_info_help[48] ;
277 >  args_info->rodlength_help = gengetopt_args_info_help[49] ;
278 >  args_info->tet_param_help = gengetopt_args_info_help[50] ;
279 >  args_info->tet_param_z_help = gengetopt_args_info_help[51] ;
280 >  args_info->rnemdz_help = gengetopt_args_info_help[52] ;
281 >  args_info->rnemdr_help = gengetopt_args_info_help[53] ;
282 >  args_info->rnemdrt_help = gengetopt_args_info_help[54] ;
283    
284   }
285  
286   void
287   cmdline_parser_print_version (void)
288   {
289 <  printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION);
289 >  printf ("%s %s\n",
290 >     (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
291 >     CMDLINE_PARSER_VERSION);
292   }
293  
294   static void print_help_common(void) {
# Line 260 | Line 303 | static void print_help_common(void) {
303    printf("\n");
304  
305    if (strlen(gengetopt_args_info_description) > 0)
306 <    printf("%s\n", gengetopt_args_info_description);
306 >    printf("%s\n\n", gengetopt_args_info_description);
307   }
308  
309   void
# Line 279 | Line 322 | cmdline_parser_init (struct gengetopt_args_info *args_
322    clear_args (args_info);
323    init_args_info (args_info);
324  
325 <  args_info->inputs = NULL;
325 >  args_info->inputs = 0;
326    args_info->inputs_num = 0;
327   }
328  
# Line 345 | Line 388 | cmdline_parser_release (struct gengetopt_args_info *ar
388    free_string_field (&(args_info->refsele_orig));
389    free_string_field (&(args_info->comsele_arg));
390    free_string_field (&(args_info->comsele_orig));
391 +  free_string_field (&(args_info->seleoffset_orig));
392 +  free_string_field (&(args_info->seleoffset2_orig));
393    free_string_field (&(args_info->molname_arg));
394    free_string_field (&(args_info->molname_orig));
395    free_string_field (&(args_info->begin_orig));
# Line 363 | Line 408 | static void
408  
409  
410   static void
411 < write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[])
411 > write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
412   {
413 +  FIX_UNUSED (values);
414    if (arg) {
415      fprintf(outfile, "%s=\"%s\"\n", opt, arg);
416    } else {
# Line 424 | Line 470 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
470      write_into_file(outfile, "refsele", args_info->refsele_orig, 0);
471    if (args_info->comsele_given)
472      write_into_file(outfile, "comsele", args_info->comsele_orig, 0);
473 +  if (args_info->seleoffset_given)
474 +    write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0);
475 +  if (args_info->seleoffset2_given)
476 +    write_into_file(outfile, "seleoffset2", args_info->seleoffset2_orig, 0);
477    if (args_info->molname_given)
478      write_into_file(outfile, "molname", args_info->molname_orig, 0);
479    if (args_info->begin_given)
# Line 438 | Line 488 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
488      write_into_file(outfile, "bor", 0, 0 );
489    if (args_info->bad_given)
490      write_into_file(outfile, "bad", 0, 0 );
491 +  if (args_info->count_given)
492 +    write_into_file(outfile, "count", 0, 0 );
493    if (args_info->gofr_given)
494      write_into_file(outfile, "gofr", 0, 0 );
495    if (args_info->gofz_given)
# Line 470 | Line 522 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
522      write_into_file(outfile, "hxy", 0, 0 );
523    if (args_info->rho_r_given)
524      write_into_file(outfile, "rho_r", 0, 0 );
525 +  if (args_info->angle_r_given)
526 +    write_into_file(outfile, "angle_r", 0, 0 );
527    if (args_info->hullvol_given)
528      write_into_file(outfile, "hullvol", 0, 0 );
529 +  if (args_info->rodlength_given)
530 +    write_into_file(outfile, "rodlength", 0, 0 );
531 +  if (args_info->tet_param_given)
532 +    write_into_file(outfile, "tet_param", 0, 0 );
533 +  if (args_info->tet_param_z_given)
534 +    write_into_file(outfile, "tet_param_z", 0, 0 );
535 +  if (args_info->rnemdz_given)
536 +    write_into_file(outfile, "rnemdz", 0, 0 );
537 +  if (args_info->rnemdr_given)
538 +    write_into_file(outfile, "rnemdr", 0, 0 );
539 +  if (args_info->rnemdrt_given)
540 +    write_into_file(outfile, "rnemdrt", 0, 0 );
541    
542  
543    i = EXIT_SUCCESS;
# Line 508 | Line 574 | gengetopt_strdup (const char *s)
574   char *
575   gengetopt_strdup (const char *s)
576   {
577 <  char *result = NULL;
577 >  char *result = 0;
578    if (!s)
579      return result;
580  
# Line 528 | Line 594 | reset_group_staticProps(struct gengetopt_args_info *ar
594    args_info->bo_given = 0 ;
595    args_info->bor_given = 0 ;
596    args_info->bad_given = 0 ;
597 +  args_info->count_given = 0 ;
598    args_info->gofr_given = 0 ;
599    args_info->gofz_given = 0 ;
600    args_info->r_theta_given = 0 ;
# Line 544 | Line 611 | reset_group_staticProps(struct gengetopt_args_info *ar
611    args_info->p_angle_given = 0 ;
612    args_info->hxy_given = 0 ;
613    args_info->rho_r_given = 0 ;
614 +  args_info->angle_r_given = 0 ;
615    args_info->hullvol_given = 0 ;
616 +  args_info->rodlength_given = 0 ;
617 +  args_info->tet_param_given = 0 ;
618 +  args_info->tet_param_z_given = 0 ;
619 +  args_info->rnemdz_given = 0 ;
620 +  args_info->rnemdr_given = 0 ;
621 +  args_info->rnemdrt_given = 0 ;
622  
623    args_info->staticProps_group_counter = 0;
624   }
625  
626   int
627 < cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info)
627 > cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
628   {
629    return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
630   }
631  
632   int
633 < cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info,
633 > cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
634                     struct cmdline_parser_params *params)
635   {
636    int result;
637 <  result = cmdline_parser_internal (argc, argv, args_info, params, NULL);
637 >  result = cmdline_parser_internal (argc, argv, args_info, params, 0);
638  
639    if (result == EXIT_FAILURE)
640      {
# Line 572 | Line 646 | int
646   }
647  
648   int
649 < cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
649 > cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
650   {
651    int result;
652    struct cmdline_parser_params params;
# Line 583 | Line 657 | cmdline_parser2 (int argc, char * const *argv, struct
657    params.check_ambiguity = 0;
658    params.print_errors = 1;
659  
660 <  result = cmdline_parser_internal (argc, argv, args_info, &params, NULL);
660 >  result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
661  
662    if (result == EXIT_FAILURE)
663      {
# Line 599 | Line 673 | cmdline_parser_required (struct gengetopt_args_info *a
673   {
674    int result = EXIT_SUCCESS;
675  
676 <  if (cmdline_parser_required2(args_info, prog_name, NULL) > 0)
676 >  if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
677      result = EXIT_FAILURE;
678  
679    if (result == EXIT_FAILURE)
# Line 615 | Line 689 | cmdline_parser_required2 (struct gengetopt_args_info *
689   cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error)
690   {
691    int error = 0;
692 +  FIX_UNUSED (additional_error);
693  
694    /* checks for required options */
695    if (! args_info->input_given)
# Line 625 | Line 700 | cmdline_parser_required2 (struct gengetopt_args_info *
700    
701    if (args_info->staticProps_group_counter == 0)
702      {
703 <      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 : ""));
703 >      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 : ""));
704        error = 1;
705      }
706    
# Line 659 | Line 734 | int update_arg(void *field, char **orig_field,
734   static
735   int update_arg(void *field, char **orig_field,
736                 unsigned int *field_given, unsigned int *prev_given,
737 <               char *value, char *possible_values[], const char *default_value,
737 >               char *value, const char *possible_values[],
738 >               const char *default_value,
739                 cmdline_parser_arg_type arg_type,
740                 int check_ambiguity, int override,
741                 int no_free, int multiple_option,
# Line 670 | Line 746 | int update_arg(void *field, char **orig_field,
746    const char *val = value;
747    int found;
748    char **string_field;
749 +  FIX_UNUSED (field);
750  
751    stop_char = 0;
752    found = 0;
# Line 687 | Line 764 | int update_arg(void *field, char **orig_field,
764        return 1; /* failure */
765      }
766  
767 +  FIX_UNUSED (default_value);
768      
769    if (field_given && *field_given && ! override)
770      return 0;
# Line 750 | Line 828 | int
828  
829  
830   int
831 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
831 > cmdline_parser_internal (
832 >  int argc, char **argv, struct gengetopt_args_info *args_info,
833                          struct cmdline_parser_params *params, const char *additional_error)
834   {
835    int c;        /* Character of the parsed option.  */
# Line 805 | Line 884 | cmdline_parser_internal (int argc, char * const *argv,
884          { "sele3",      1, NULL, 0 },
885          { "refsele",    1, NULL, 0 },
886          { "comsele",    1, NULL, 0 },
887 +        { "seleoffset", 1, NULL, 0 },
888 +        { "seleoffset2",        1, NULL, 0 },
889          { "molname",    1, NULL, 0 },
890          { "begin",      1, NULL, 0 },
891          { "end",        1, NULL, 0 },
# Line 812 | Line 893 | cmdline_parser_internal (int argc, char * const *argv,
893          { "bo", 0, NULL, 0 },
894          { "bor",        0, NULL, 0 },
895          { "bad",        0, NULL, 0 },
896 +        { "count",      0, NULL, 0 },
897          { "gofr",       0, NULL, 'g' },
898          { "gofz",       0, NULL, 0 },
899          { "r_theta",    0, NULL, 0 },
# Line 828 | Line 910 | cmdline_parser_internal (int argc, char * const *argv,
910          { "p_angle",    0, NULL, 0 },
911          { "hxy",        0, NULL, 0 },
912          { "rho_r",      0, NULL, 0 },
913 +        { "angle_r",    0, NULL, 0 },
914          { "hullvol",    0, NULL, 0 },
915 <        { NULL, 0, NULL, 0 }
915 >        { "rodlength",  0, NULL, 0 },
916 >        { "tet_param",  0, NULL, 'Q' },
917 >        { "tet_param_z",        0, NULL, 0 },
918 >        { "rnemdz",     0, NULL, 0 },
919 >        { "rnemdr",     0, NULL, 0 },
920 >        { "rnemdrt",    0, NULL, 0 },
921 >        { 0,  0, 0, 0 }
922        };
923  
924 <      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index);
924 >      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index);
925  
926        if (c == -1) break;       /* Exit from `while (1)' loop.  */
927  
# Line 971 | Line 1060 | cmdline_parser_internal (int argc, char * const *argv,
1060              goto failure;
1061          
1062            break;
1063 <        case 'p':       /* p2 order parameter (--sele1 and --sele2 must be specified).  */
1063 >        case 'p':       /* p2 order parameter (--sele1 must be specified, --sele2 is optional).  */
1064          
1065            if (args_info->staticProps_group_counter && override)
1066              reset_group_staticProps (args_info);
# Line 1016 | Line 1105 | cmdline_parser_internal (int argc, char * const *argv,
1105              goto failure;
1106          
1107            break;
1108 +        case 'Q':       /* tetrahedrality order parameter (Qk).  */
1109 +        
1110 +          if (args_info->staticProps_group_counter && override)
1111 +            reset_group_staticProps (args_info);
1112 +          args_info->staticProps_group_counter += 1;
1113 +        
1114 +          if (update_arg( 0 ,
1115 +               0 , &(args_info->tet_param_given),
1116 +              &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO,
1117 +              check_ambiguity, override, 0, 0,
1118 +              "tet_param", 'Q',
1119 +              additional_error))
1120 +            goto failure;
1121 +        
1122 +          break;
1123  
1124          case 0: /* Long option with no short option */
1125            /* number of bins in z axis.  */
# Line 1144 | Line 1248 | cmdline_parser_internal (int argc, char * const *argv,
1248                goto failure;
1249            
1250            }
1251 +          /* global index offset for a second object (used to define a vector between sites in molecule).  */
1252 +          else if (strcmp (long_options[option_index].name, "seleoffset") == 0)
1253 +          {
1254 +          
1255 +          
1256 +            if (update_arg( (void *)&(args_info->seleoffset_arg),
1257 +                 &(args_info->seleoffset_orig), &(args_info->seleoffset_given),
1258 +                &(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT,
1259 +                check_ambiguity, override, 0, 0,
1260 +                "seleoffset", '-',
1261 +                additional_error))
1262 +              goto failure;
1263 +          
1264 +          }
1265 +          /* global index offset for a third object (used to define a vector between sites in molecule).  */
1266 +          else if (strcmp (long_options[option_index].name, "seleoffset2") == 0)
1267 +          {
1268 +          
1269 +          
1270 +            if (update_arg( (void *)&(args_info->seleoffset2_arg),
1271 +                 &(args_info->seleoffset2_orig), &(args_info->seleoffset2_given),
1272 +                &(local_args_info.seleoffset2_given), optarg, 0, 0, ARG_INT,
1273 +                check_ambiguity, override, 0, 0,
1274 +                "seleoffset2", '-',
1275 +                additional_error))
1276 +              goto failure;
1277 +          
1278 +          }
1279            /* molecule name.  */
1280            else if (strcmp (long_options[option_index].name, "molname") == 0)
1281            {
# Line 1251 | Line 1383 | cmdline_parser_internal (int argc, char * const *argv,
1383                goto failure;
1384            
1385            }
1386 +          /* count of molecules matching selection criteria (and associated statistics).  */
1387 +          else if (strcmp (long_options[option_index].name, "count") == 0)
1388 +          {
1389 +          
1390 +            if (args_info->staticProps_group_counter && override)
1391 +              reset_group_staticProps (args_info);
1392 +            args_info->staticProps_group_counter += 1;
1393 +          
1394 +            if (update_arg( 0 ,
1395 +                 0 , &(args_info->count_given),
1396 +                &(local_args_info.count_given), optarg, 0, 0, ARG_NO,
1397 +                check_ambiguity, override, 0, 0,
1398 +                "count", '-',
1399 +                additional_error))
1400 +              goto failure;
1401 +          
1402 +          }
1403            /* g(z).  */
1404            else if (strcmp (long_options[option_index].name, "gofz") == 0)
1405            {
# Line 1404 | Line 1553 | cmdline_parser_internal (int argc, char * const *argv,
1553                goto failure;
1554            
1555            }
1556 <          /* p(cos(theta)).  */
1556 >          /* p(cos(theta)) (--sele1 must be specified, --sele2 is optional).  */
1557            else if (strcmp (long_options[option_index].name, "p_angle") == 0)
1558            {
1559            
# Line 1451 | Line 1600 | cmdline_parser_internal (int argc, char * const *argv,
1600                  &(local_args_info.rho_r_given), optarg, 0, 0, ARG_NO,
1601                  check_ambiguity, override, 0, 0,
1602                  "rho_r", '-',
1603 +                additional_error))
1604 +              goto failure;
1605 +          
1606 +          }
1607 +          /* angle of R.  */
1608 +          else if (strcmp (long_options[option_index].name, "angle_r") == 0)
1609 +          {
1610 +          
1611 +            if (args_info->staticProps_group_counter && override)
1612 +              reset_group_staticProps (args_info);
1613 +            args_info->staticProps_group_counter += 1;
1614 +          
1615 +            if (update_arg( 0 ,
1616 +                 0 , &(args_info->angle_r_given),
1617 +                &(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO,
1618 +                check_ambiguity, override, 0, 0,
1619 +                "angle_r", '-',
1620                  additional_error))
1621                goto failure;
1622            
# Line 1472 | Line 1638 | cmdline_parser_internal (int argc, char * const *argv,
1638                goto failure;
1639            
1640            }
1641 +          /* length of nanorod.  */
1642 +          else if (strcmp (long_options[option_index].name, "rodlength") == 0)
1643 +          {
1644            
1645 +            if (args_info->staticProps_group_counter && override)
1646 +              reset_group_staticProps (args_info);
1647 +            args_info->staticProps_group_counter += 1;
1648 +          
1649 +            if (update_arg( 0 ,
1650 +                 0 , &(args_info->rodlength_given),
1651 +                &(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO,
1652 +                check_ambiguity, override, 0, 0,
1653 +                "rodlength", '-',
1654 +                additional_error))
1655 +              goto failure;
1656 +          
1657 +          }
1658 +          /* spatially-resolved tetrahedrality order parameter Qk(z).  */
1659 +          else if (strcmp (long_options[option_index].name, "tet_param_z") == 0)
1660 +          {
1661 +          
1662 +            if (args_info->staticProps_group_counter && override)
1663 +              reset_group_staticProps (args_info);
1664 +            args_info->staticProps_group_counter += 1;
1665 +          
1666 +            if (update_arg( 0 ,
1667 +                 0 , &(args_info->tet_param_z_given),
1668 +                &(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO,
1669 +                check_ambiguity, override, 0, 0,
1670 +                "tet_param_z", '-',
1671 +                additional_error))
1672 +              goto failure;
1673 +          
1674 +          }
1675 +          /* slab-resolved RNEMD statistics (temperature, density, velocity).  */
1676 +          else if (strcmp (long_options[option_index].name, "rnemdz") == 0)
1677 +          {
1678 +          
1679 +            if (args_info->staticProps_group_counter && override)
1680 +              reset_group_staticProps (args_info);
1681 +            args_info->staticProps_group_counter += 1;
1682 +          
1683 +            if (update_arg( 0 ,
1684 +                 0 , &(args_info->rnemdz_given),
1685 +                &(local_args_info.rnemdz_given), optarg, 0, 0, ARG_NO,
1686 +                check_ambiguity, override, 0, 0,
1687 +                "rnemdz", '-',
1688 +                additional_error))
1689 +              goto failure;
1690 +          
1691 +          }
1692 +          /* shell-resolved RNEMD statistics (temperature, density, angular velocity).  */
1693 +          else if (strcmp (long_options[option_index].name, "rnemdr") == 0)
1694 +          {
1695 +          
1696 +            if (args_info->staticProps_group_counter && override)
1697 +              reset_group_staticProps (args_info);
1698 +            args_info->staticProps_group_counter += 1;
1699 +          
1700 +            if (update_arg( 0 ,
1701 +                 0 , &(args_info->rnemdr_given),
1702 +                &(local_args_info.rnemdr_given), optarg, 0, 0, ARG_NO,
1703 +                check_ambiguity, override, 0, 0,
1704 +                "rnemdr", '-',
1705 +                additional_error))
1706 +              goto failure;
1707 +          
1708 +          }
1709 +          /* shell and angle-resolved RNEMD statistics (temperature, density, angular velocity).  */
1710 +          else if (strcmp (long_options[option_index].name, "rnemdrt") == 0)
1711 +          {
1712 +          
1713 +            if (args_info->staticProps_group_counter && override)
1714 +              reset_group_staticProps (args_info);
1715 +            args_info->staticProps_group_counter += 1;
1716 +          
1717 +            if (update_arg( 0 ,
1718 +                 0 , &(args_info->rnemdrt_given),
1719 +                &(local_args_info.rnemdrt_given), optarg, 0, 0, ARG_NO,
1720 +                check_ambiguity, override, 0, 0,
1721 +                "rnemdrt", '-',
1722 +                additional_error))
1723 +              goto failure;
1724 +          
1725 +          }
1726 +          
1727            break;
1728          case '?':       /* Invalid option.  */
1729            /* `getopt_long' already printed an error message.  */
# Line 1486 | Line 1737 | cmdline_parser_internal (int argc, char * const *argv,
1737  
1738    if (args_info->staticProps_group_counter > 1)
1739      {
1740 <      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 : ""));
1740 >      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 : ""));
1741        error = 1;
1742      }
1743    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines