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

Comparing:
branches/development/src/applications/staticProps/StaticPropsCmd.c (file contents), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC vs.
trunk/src/applications/staticProps/StaticPropsCmd.cpp (file contents), Revision 1992 by gezelter, Thu Apr 24 17:30:00 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",
64    "      --radius=DOUBLE           nanoparticle radius",
65    "\n Group: staticProps\n   an option of this group is required",
66    "      --bo                      bond order parameter (--rcut must be specified)",
67 <  "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)",
67 >  "      --ior                     icosahedral bond order parameter as a function \n                                  of radius (--rcut must be specified)",
68 >  "      --for                     FCC bond order parameter as a function of \n                                  radius (--rcut must be specified)",
69    "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)",
70 +  "      --count                   count of molecules matching selection criteria \n                                  (and associated statistics)",
71    "  -g, --gofr                    g(r)",
72    "      --gofz                    g(z)",
73    "      --r_theta                 g(r, cos(theta))",
# Line 64 | Line 76 | const char *gengetopt_args_info_help[] = {
76    "      --theta_omega             g(cos(theta), cos(omega))",
77    "      --gxyz                    g(x, y, z)",
78    "      --twodgofr                2D g(r) (Slab width --dz must be specified)",
79 <  "  -p, --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)",
79 >  "  -p, --p2                      p2 order parameter (--sele1 must be specified, \n                                  --sele2 is optional)",
80    "      --rp2                     rp2 order parameter (--sele1 and --sele2 must \n                                  be specified)",
81    "  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)",
82    "  -d, --density                 density plot",
83    "      --slab_density            slab density",
84 <  "      --p_angle                 p(cos(theta))",
84 >  "      --p_angle                 p(cos(theta)) (--sele1 must be specified, \n                                  --sele2 is optional)",
85    "      --hxy                     hxy",
86    "      --rho_r                   rho of R",
87 +  "      --angle_r                 angle of R",
88    "      --hullvol                 hull volume of nanoparticle",
89 +  "      --rodlength               length of nanorod",
90 +  "  -Q, --tet_param               tetrahedrality order parameter (Qk)",
91 +  "      --tet_param_z             spatially-resolved tetrahedrality order \n                                  parameter Qk(z)",
92 +  "      --rnemdz                  slab-resolved RNEMD statistics (temperature, \n                                  density, velocity)",
93 +  "      --rnemdr                  shell-resolved RNEMD statistics (temperature, \n                                  density, angular velocity)",
94 +  "      --rnemdrt                 shell and angle-resolved RNEMD statistics \n                                  (temperature, density, angular velocity)",
95      0
96   };
97  
# Line 88 | Line 107 | static int
107   void clear_args (struct gengetopt_args_info *args_info);
108  
109   static int
110 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
110 > cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
111                          struct cmdline_parser_params *params, const char *additional_error);
112  
113   static int
# Line 120 | Line 139 | void clear_given (struct gengetopt_args_info *args_inf
139    args_info->sele3_given = 0 ;
140    args_info->refsele_given = 0 ;
141    args_info->comsele_given = 0 ;
142 +  args_info->seleoffset_given = 0 ;
143 +  args_info->seleoffset2_given = 0 ;
144    args_info->molname_given = 0 ;
145    args_info->begin_given = 0 ;
146    args_info->end_given = 0 ;
147    args_info->radius_given = 0 ;
148    args_info->bo_given = 0 ;
149 <  args_info->bor_given = 0 ;
149 >  args_info->ior_given = 0 ;
150 >  args_info->for_given = 0 ;
151    args_info->bad_given = 0 ;
152 +  args_info->count_given = 0 ;
153    args_info->gofr_given = 0 ;
154    args_info->gofz_given = 0 ;
155    args_info->r_theta_given = 0 ;
# Line 143 | Line 166 | void clear_given (struct gengetopt_args_info *args_inf
166    args_info->p_angle_given = 0 ;
167    args_info->hxy_given = 0 ;
168    args_info->rho_r_given = 0 ;
169 +  args_info->angle_r_given = 0 ;
170    args_info->hullvol_given = 0 ;
171 +  args_info->rodlength_given = 0 ;
172 +  args_info->tet_param_given = 0 ;
173 +  args_info->tet_param_z_given = 0 ;
174 +  args_info->rnemdz_given = 0 ;
175 +  args_info->rnemdr_given = 0 ;
176 +  args_info->rnemdrt_given = 0 ;
177    args_info->staticProps_group_counter = 0 ;
178   }
179  
180   static
181   void clear_args (struct gengetopt_args_info *args_info)
182   {
183 +  FIX_UNUSED (args_info);
184    args_info->input_arg = NULL;
185    args_info->input_orig = NULL;
186    args_info->output_arg = NULL;
# Line 182 | Line 213 | void clear_args (struct gengetopt_args_info *args_info
213    args_info->refsele_orig = NULL;
214    args_info->comsele_arg = NULL;
215    args_info->comsele_orig = NULL;
216 +  args_info->seleoffset_orig = NULL;
217 +  args_info->seleoffset2_orig = NULL;
218    args_info->molname_arg = NULL;
219    args_info->molname_orig = NULL;
220    args_info->begin_orig = NULL;
# Line 215 | Line 248 | void init_args_info(struct gengetopt_args_info *args_i
248    args_info->sele3_help = gengetopt_args_info_help[17] ;
249    args_info->refsele_help = gengetopt_args_info_help[18] ;
250    args_info->comsele_help = gengetopt_args_info_help[19] ;
251 <  args_info->molname_help = gengetopt_args_info_help[20] ;
252 <  args_info->begin_help = gengetopt_args_info_help[21] ;
253 <  args_info->end_help = gengetopt_args_info_help[22] ;
254 <  args_info->radius_help = gengetopt_args_info_help[23] ;
255 <  args_info->bo_help = gengetopt_args_info_help[25] ;
256 <  args_info->bor_help = gengetopt_args_info_help[26] ;
257 <  args_info->bad_help = gengetopt_args_info_help[27] ;
258 <  args_info->gofr_help = gengetopt_args_info_help[28] ;
259 <  args_info->gofz_help = gengetopt_args_info_help[29] ;
260 <  args_info->r_theta_help = gengetopt_args_info_help[30] ;
261 <  args_info->r_omega_help = gengetopt_args_info_help[31] ;
262 <  args_info->r_z_help = gengetopt_args_info_help[32] ;
263 <  args_info->theta_omega_help = gengetopt_args_info_help[33] ;
264 <  args_info->gxyz_help = gengetopt_args_info_help[34] ;
265 <  args_info->twodgofr_help = gengetopt_args_info_help[35] ;
266 <  args_info->p2_help = gengetopt_args_info_help[36] ;
267 <  args_info->rp2_help = gengetopt_args_info_help[37] ;
268 <  args_info->scd_help = gengetopt_args_info_help[38] ;
269 <  args_info->density_help = gengetopt_args_info_help[39] ;
270 <  args_info->slab_density_help = gengetopt_args_info_help[40] ;
271 <  args_info->p_angle_help = gengetopt_args_info_help[41] ;
272 <  args_info->hxy_help = gengetopt_args_info_help[42] ;
273 <  args_info->rho_r_help = gengetopt_args_info_help[43] ;
274 <  args_info->hullvol_help = gengetopt_args_info_help[44] ;
251 >  args_info->seleoffset_help = gengetopt_args_info_help[20] ;
252 >  args_info->seleoffset2_help = gengetopt_args_info_help[21] ;
253 >  args_info->molname_help = gengetopt_args_info_help[22] ;
254 >  args_info->begin_help = gengetopt_args_info_help[23] ;
255 >  args_info->end_help = gengetopt_args_info_help[24] ;
256 >  args_info->radius_help = gengetopt_args_info_help[25] ;
257 >  args_info->bo_help = gengetopt_args_info_help[27] ;
258 >  args_info->ior_help = gengetopt_args_info_help[28] ;
259 >  args_info->for_help = gengetopt_args_info_help[29] ;
260 >  args_info->bad_help = gengetopt_args_info_help[30] ;
261 >  args_info->count_help = gengetopt_args_info_help[31] ;
262 >  args_info->gofr_help = gengetopt_args_info_help[32] ;
263 >  args_info->gofz_help = gengetopt_args_info_help[33] ;
264 >  args_info->r_theta_help = gengetopt_args_info_help[34] ;
265 >  args_info->r_omega_help = gengetopt_args_info_help[35] ;
266 >  args_info->r_z_help = gengetopt_args_info_help[36] ;
267 >  args_info->theta_omega_help = gengetopt_args_info_help[37] ;
268 >  args_info->gxyz_help = gengetopt_args_info_help[38] ;
269 >  args_info->twodgofr_help = gengetopt_args_info_help[39] ;
270 >  args_info->p2_help = gengetopt_args_info_help[40] ;
271 >  args_info->rp2_help = gengetopt_args_info_help[41] ;
272 >  args_info->scd_help = gengetopt_args_info_help[42] ;
273 >  args_info->density_help = gengetopt_args_info_help[43] ;
274 >  args_info->slab_density_help = gengetopt_args_info_help[44] ;
275 >  args_info->p_angle_help = gengetopt_args_info_help[45] ;
276 >  args_info->hxy_help = gengetopt_args_info_help[46] ;
277 >  args_info->rho_r_help = gengetopt_args_info_help[47] ;
278 >  args_info->angle_r_help = gengetopt_args_info_help[48] ;
279 >  args_info->hullvol_help = gengetopt_args_info_help[49] ;
280 >  args_info->rodlength_help = gengetopt_args_info_help[50] ;
281 >  args_info->tet_param_help = gengetopt_args_info_help[51] ;
282 >  args_info->tet_param_z_help = gengetopt_args_info_help[52] ;
283 >  args_info->rnemdz_help = gengetopt_args_info_help[53] ;
284 >  args_info->rnemdr_help = gengetopt_args_info_help[54] ;
285 >  args_info->rnemdrt_help = gengetopt_args_info_help[55] ;
286    
287   }
288  
289   void
290   cmdline_parser_print_version (void)
291   {
292 <  printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION);
292 >  printf ("%s %s\n",
293 >     (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
294 >     CMDLINE_PARSER_VERSION);
295   }
296  
297   static void print_help_common(void) {
# Line 260 | Line 306 | static void print_help_common(void) {
306    printf("\n");
307  
308    if (strlen(gengetopt_args_info_description) > 0)
309 <    printf("%s\n", gengetopt_args_info_description);
309 >    printf("%s\n\n", gengetopt_args_info_description);
310   }
311  
312   void
# Line 279 | Line 325 | cmdline_parser_init (struct gengetopt_args_info *args_
325    clear_args (args_info);
326    init_args_info (args_info);
327  
328 <  args_info->inputs = NULL;
328 >  args_info->inputs = 0;
329    args_info->inputs_num = 0;
330   }
331  
# Line 345 | Line 391 | cmdline_parser_release (struct gengetopt_args_info *ar
391    free_string_field (&(args_info->refsele_orig));
392    free_string_field (&(args_info->comsele_arg));
393    free_string_field (&(args_info->comsele_orig));
394 +  free_string_field (&(args_info->seleoffset_orig));
395 +  free_string_field (&(args_info->seleoffset2_orig));
396    free_string_field (&(args_info->molname_arg));
397    free_string_field (&(args_info->molname_orig));
398    free_string_field (&(args_info->begin_orig));
# Line 363 | Line 411 | static void
411  
412  
413   static void
414 < write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[])
414 > write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
415   {
416 +  FIX_UNUSED (values);
417    if (arg) {
418      fprintf(outfile, "%s=\"%s\"\n", opt, arg);
419    } else {
# Line 424 | Line 473 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
473      write_into_file(outfile, "refsele", args_info->refsele_orig, 0);
474    if (args_info->comsele_given)
475      write_into_file(outfile, "comsele", args_info->comsele_orig, 0);
476 +  if (args_info->seleoffset_given)
477 +    write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0);
478 +  if (args_info->seleoffset2_given)
479 +    write_into_file(outfile, "seleoffset2", args_info->seleoffset2_orig, 0);
480    if (args_info->molname_given)
481      write_into_file(outfile, "molname", args_info->molname_orig, 0);
482    if (args_info->begin_given)
# Line 434 | Line 487 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
487      write_into_file(outfile, "radius", args_info->radius_orig, 0);
488    if (args_info->bo_given)
489      write_into_file(outfile, "bo", 0, 0 );
490 <  if (args_info->bor_given)
491 <    write_into_file(outfile, "bor", 0, 0 );
490 >  if (args_info->ior_given)
491 >    write_into_file(outfile, "ior", 0, 0 );
492 >  if (args_info->for_given)
493 >    write_into_file(outfile, "for", 0, 0 );
494    if (args_info->bad_given)
495      write_into_file(outfile, "bad", 0, 0 );
496 +  if (args_info->count_given)
497 +    write_into_file(outfile, "count", 0, 0 );
498    if (args_info->gofr_given)
499      write_into_file(outfile, "gofr", 0, 0 );
500    if (args_info->gofz_given)
# Line 470 | Line 527 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
527      write_into_file(outfile, "hxy", 0, 0 );
528    if (args_info->rho_r_given)
529      write_into_file(outfile, "rho_r", 0, 0 );
530 +  if (args_info->angle_r_given)
531 +    write_into_file(outfile, "angle_r", 0, 0 );
532    if (args_info->hullvol_given)
533      write_into_file(outfile, "hullvol", 0, 0 );
534 +  if (args_info->rodlength_given)
535 +    write_into_file(outfile, "rodlength", 0, 0 );
536 +  if (args_info->tet_param_given)
537 +    write_into_file(outfile, "tet_param", 0, 0 );
538 +  if (args_info->tet_param_z_given)
539 +    write_into_file(outfile, "tet_param_z", 0, 0 );
540 +  if (args_info->rnemdz_given)
541 +    write_into_file(outfile, "rnemdz", 0, 0 );
542 +  if (args_info->rnemdr_given)
543 +    write_into_file(outfile, "rnemdr", 0, 0 );
544 +  if (args_info->rnemdrt_given)
545 +    write_into_file(outfile, "rnemdrt", 0, 0 );
546    
547  
548    i = EXIT_SUCCESS;
# Line 508 | Line 579 | gengetopt_strdup (const char *s)
579   char *
580   gengetopt_strdup (const char *s)
581   {
582 <  char *result = NULL;
582 >  char *result = 0;
583    if (!s)
584      return result;
585  
# Line 526 | Line 597 | reset_group_staticProps(struct gengetopt_args_info *ar
597      return;
598    
599    args_info->bo_given = 0 ;
600 <  args_info->bor_given = 0 ;
600 >  args_info->ior_given = 0 ;
601 >  args_info->for_given = 0 ;
602    args_info->bad_given = 0 ;
603 +  args_info->count_given = 0 ;
604    args_info->gofr_given = 0 ;
605    args_info->gofz_given = 0 ;
606    args_info->r_theta_given = 0 ;
# Line 544 | Line 617 | reset_group_staticProps(struct gengetopt_args_info *ar
617    args_info->p_angle_given = 0 ;
618    args_info->hxy_given = 0 ;
619    args_info->rho_r_given = 0 ;
620 +  args_info->angle_r_given = 0 ;
621    args_info->hullvol_given = 0 ;
622 +  args_info->rodlength_given = 0 ;
623 +  args_info->tet_param_given = 0 ;
624 +  args_info->tet_param_z_given = 0 ;
625 +  args_info->rnemdz_given = 0 ;
626 +  args_info->rnemdr_given = 0 ;
627 +  args_info->rnemdrt_given = 0 ;
628  
629    args_info->staticProps_group_counter = 0;
630   }
631  
632   int
633 < cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info)
633 > cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
634   {
635    return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
636   }
637  
638   int
639 < cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info,
639 > cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
640                     struct cmdline_parser_params *params)
641   {
642    int result;
643 <  result = cmdline_parser_internal (argc, argv, args_info, params, NULL);
643 >  result = cmdline_parser_internal (argc, argv, args_info, params, 0);
644  
645    if (result == EXIT_FAILURE)
646      {
# Line 572 | Line 652 | int
652   }
653  
654   int
655 < cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
655 > cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
656   {
657    int result;
658    struct cmdline_parser_params params;
# Line 583 | Line 663 | cmdline_parser2 (int argc, char * const *argv, struct
663    params.check_ambiguity = 0;
664    params.print_errors = 1;
665  
666 <  result = cmdline_parser_internal (argc, argv, args_info, &params, NULL);
666 >  result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
667  
668    if (result == EXIT_FAILURE)
669      {
# Line 599 | Line 679 | cmdline_parser_required (struct gengetopt_args_info *a
679   {
680    int result = EXIT_SUCCESS;
681  
682 <  if (cmdline_parser_required2(args_info, prog_name, NULL) > 0)
682 >  if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
683      result = EXIT_FAILURE;
684  
685    if (result == EXIT_FAILURE)
# Line 615 | Line 695 | cmdline_parser_required2 (struct gengetopt_args_info *
695   cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error)
696   {
697    int error = 0;
698 +  FIX_UNUSED (additional_error);
699  
700    /* checks for required options */
701    if (! args_info->input_given)
# Line 625 | Line 706 | cmdline_parser_required2 (struct gengetopt_args_info *
706    
707    if (args_info->staticProps_group_counter == 0)
708      {
709 <      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 : ""));
709 >      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 : ""));
710        error = 1;
711      }
712    
# Line 659 | Line 740 | int update_arg(void *field, char **orig_field,
740   static
741   int update_arg(void *field, char **orig_field,
742                 unsigned int *field_given, unsigned int *prev_given,
743 <               char *value, char *possible_values[], const char *default_value,
743 >               char *value, const char *possible_values[],
744 >               const char *default_value,
745                 cmdline_parser_arg_type arg_type,
746                 int check_ambiguity, int override,
747                 int no_free, int multiple_option,
# Line 670 | Line 752 | int update_arg(void *field, char **orig_field,
752    const char *val = value;
753    int found;
754    char **string_field;
755 +  FIX_UNUSED (field);
756  
757    stop_char = 0;
758    found = 0;
# Line 687 | Line 770 | int update_arg(void *field, char **orig_field,
770        return 1; /* failure */
771      }
772  
773 +  FIX_UNUSED (default_value);
774      
775    if (field_given && *field_given && ! override)
776      return 0;
# Line 750 | Line 834 | int
834  
835  
836   int
837 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
837 > cmdline_parser_internal (
838 >  int argc, char **argv, struct gengetopt_args_info *args_info,
839                          struct cmdline_parser_params *params, const char *additional_error)
840   {
841    int c;        /* Character of the parsed option.  */
# Line 805 | Line 890 | cmdline_parser_internal (int argc, char * const *argv,
890          { "sele3",      1, NULL, 0 },
891          { "refsele",    1, NULL, 0 },
892          { "comsele",    1, NULL, 0 },
893 +        { "seleoffset", 1, NULL, 0 },
894 +        { "seleoffset2",        1, NULL, 0 },
895          { "molname",    1, NULL, 0 },
896          { "begin",      1, NULL, 0 },
897          { "end",        1, NULL, 0 },
898          { "radius",     1, NULL, 0 },
899          { "bo", 0, NULL, 0 },
900 <        { "bor",        0, NULL, 0 },
900 >        { "ior",        0, NULL, 0 },
901 >        { "for",        0, NULL, 0 },
902          { "bad",        0, NULL, 0 },
903 +        { "count",      0, NULL, 0 },
904          { "gofr",       0, NULL, 'g' },
905          { "gofz",       0, NULL, 0 },
906          { "r_theta",    0, NULL, 0 },
# Line 828 | Line 917 | cmdline_parser_internal (int argc, char * const *argv,
917          { "p_angle",    0, NULL, 0 },
918          { "hxy",        0, NULL, 0 },
919          { "rho_r",      0, NULL, 0 },
920 +        { "angle_r",    0, NULL, 0 },
921          { "hullvol",    0, NULL, 0 },
922 <        { NULL, 0, NULL, 0 }
922 >        { "rodlength",  0, NULL, 0 },
923 >        { "tet_param",  0, NULL, 'Q' },
924 >        { "tet_param_z",        0, NULL, 0 },
925 >        { "rnemdz",     0, NULL, 0 },
926 >        { "rnemdr",     0, NULL, 0 },
927 >        { "rnemdrt",    0, NULL, 0 },
928 >        { 0,  0, 0, 0 }
929        };
930  
931 <      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index);
931 >      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index);
932  
933        if (c == -1) break;       /* Exit from `while (1)' loop.  */
934  
# Line 971 | Line 1067 | cmdline_parser_internal (int argc, char * const *argv,
1067              goto failure;
1068          
1069            break;
1070 <        case 'p':       /* p2 order parameter (--sele1 and --sele2 must be specified).  */
1070 >        case 'p':       /* p2 order parameter (--sele1 must be specified, --sele2 is optional).  */
1071          
1072            if (args_info->staticProps_group_counter && override)
1073              reset_group_staticProps (args_info);
# Line 1016 | Line 1112 | cmdline_parser_internal (int argc, char * const *argv,
1112              goto failure;
1113          
1114            break;
1115 +        case 'Q':       /* tetrahedrality order parameter (Qk).  */
1116 +        
1117 +          if (args_info->staticProps_group_counter && override)
1118 +            reset_group_staticProps (args_info);
1119 +          args_info->staticProps_group_counter += 1;
1120 +        
1121 +          if (update_arg( 0 ,
1122 +               0 , &(args_info->tet_param_given),
1123 +              &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO,
1124 +              check_ambiguity, override, 0, 0,
1125 +              "tet_param", 'Q',
1126 +              additional_error))
1127 +            goto failure;
1128 +        
1129 +          break;
1130  
1131          case 0: /* Long option with no short option */
1132            /* number of bins in z axis.  */
# Line 1140 | Line 1251 | cmdline_parser_internal (int argc, char * const *argv,
1251                  &(local_args_info.comsele_given), optarg, 0, 0, ARG_STRING,
1252                  check_ambiguity, override, 0, 0,
1253                  "comsele", '-',
1254 +                additional_error))
1255 +              goto failure;
1256 +          
1257 +          }
1258 +          /* global index offset for a second object (used to define a vector between sites in molecule).  */
1259 +          else if (strcmp (long_options[option_index].name, "seleoffset") == 0)
1260 +          {
1261 +          
1262 +          
1263 +            if (update_arg( (void *)&(args_info->seleoffset_arg),
1264 +                 &(args_info->seleoffset_orig), &(args_info->seleoffset_given),
1265 +                &(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT,
1266 +                check_ambiguity, override, 0, 0,
1267 +                "seleoffset", '-',
1268                  additional_error))
1269                goto failure;
1270            
1271            }
1272 +          /* global index offset for a third object (used to define a vector between sites in molecule).  */
1273 +          else if (strcmp (long_options[option_index].name, "seleoffset2") == 0)
1274 +          {
1275 +          
1276 +          
1277 +            if (update_arg( (void *)&(args_info->seleoffset2_arg),
1278 +                 &(args_info->seleoffset2_orig), &(args_info->seleoffset2_given),
1279 +                &(local_args_info.seleoffset2_given), optarg, 0, 0, ARG_INT,
1280 +                check_ambiguity, override, 0, 0,
1281 +                "seleoffset2", '-',
1282 +                additional_error))
1283 +              goto failure;
1284 +          
1285 +          }
1286            /* molecule name.  */
1287            else if (strcmp (long_options[option_index].name, "molname") == 0)
1288            {
# Line 1217 | Line 1356 | cmdline_parser_internal (int argc, char * const *argv,
1356                goto failure;
1357            
1358            }
1359 <          /* bond order parameter as a function of radius (--rcut must be specified).  */
1360 <          else if (strcmp (long_options[option_index].name, "bor") == 0)
1359 >          /* icosahedral bond order parameter as a function of radius (--rcut must be specified).  */
1360 >          else if (strcmp (long_options[option_index].name, "ior") == 0)
1361 >          {
1362 >          
1363 >            if (args_info->staticProps_group_counter && override)
1364 >              reset_group_staticProps (args_info);
1365 >            args_info->staticProps_group_counter += 1;
1366 >          
1367 >            if (update_arg( 0 ,
1368 >                 0 , &(args_info->ior_given),
1369 >                &(local_args_info.ior_given), optarg, 0, 0, ARG_NO,
1370 >                check_ambiguity, override, 0, 0,
1371 >                "ior", '-',
1372 >                additional_error))
1373 >              goto failure;
1374 >          
1375 >          }
1376 >          /* FCC bond order parameter as a function of radius (--rcut must be specified).  */
1377 >          else if (strcmp (long_options[option_index].name, "for") == 0)
1378            {
1379            
1380              if (args_info->staticProps_group_counter && override)
# Line 1226 | Line 1382 | cmdline_parser_internal (int argc, char * const *argv,
1382              args_info->staticProps_group_counter += 1;
1383            
1384              if (update_arg( 0 ,
1385 <                 0 , &(args_info->bor_given),
1386 <                &(local_args_info.bor_given), optarg, 0, 0, ARG_NO,
1385 >                 0 , &(args_info->for_given),
1386 >                &(local_args_info.for_given), optarg, 0, 0, ARG_NO,
1387                  check_ambiguity, override, 0, 0,
1388 <                "bor", '-',
1388 >                "for", '-',
1389                  additional_error))
1390                goto failure;
1391            
# Line 1251 | Line 1407 | cmdline_parser_internal (int argc, char * const *argv,
1407                goto failure;
1408            
1409            }
1410 +          /* count of molecules matching selection criteria (and associated statistics).  */
1411 +          else if (strcmp (long_options[option_index].name, "count") == 0)
1412 +          {
1413 +          
1414 +            if (args_info->staticProps_group_counter && override)
1415 +              reset_group_staticProps (args_info);
1416 +            args_info->staticProps_group_counter += 1;
1417 +          
1418 +            if (update_arg( 0 ,
1419 +                 0 , &(args_info->count_given),
1420 +                &(local_args_info.count_given), optarg, 0, 0, ARG_NO,
1421 +                check_ambiguity, override, 0, 0,
1422 +                "count", '-',
1423 +                additional_error))
1424 +              goto failure;
1425 +          
1426 +          }
1427            /* g(z).  */
1428            else if (strcmp (long_options[option_index].name, "gofz") == 0)
1429            {
# Line 1404 | Line 1577 | cmdline_parser_internal (int argc, char * const *argv,
1577                goto failure;
1578            
1579            }
1580 <          /* p(cos(theta)).  */
1580 >          /* p(cos(theta)) (--sele1 must be specified, --sele2 is optional).  */
1581            else if (strcmp (long_options[option_index].name, "p_angle") == 0)
1582            {
1583            
# Line 1451 | Line 1624 | cmdline_parser_internal (int argc, char * const *argv,
1624                  &(local_args_info.rho_r_given), optarg, 0, 0, ARG_NO,
1625                  check_ambiguity, override, 0, 0,
1626                  "rho_r", '-',
1627 +                additional_error))
1628 +              goto failure;
1629 +          
1630 +          }
1631 +          /* angle of R.  */
1632 +          else if (strcmp (long_options[option_index].name, "angle_r") == 0)
1633 +          {
1634 +          
1635 +            if (args_info->staticProps_group_counter && override)
1636 +              reset_group_staticProps (args_info);
1637 +            args_info->staticProps_group_counter += 1;
1638 +          
1639 +            if (update_arg( 0 ,
1640 +                 0 , &(args_info->angle_r_given),
1641 +                &(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO,
1642 +                check_ambiguity, override, 0, 0,
1643 +                "angle_r", '-',
1644                  additional_error))
1645                goto failure;
1646            
# Line 1472 | Line 1662 | cmdline_parser_internal (int argc, char * const *argv,
1662                goto failure;
1663            
1664            }
1665 +          /* length of nanorod.  */
1666 +          else if (strcmp (long_options[option_index].name, "rodlength") == 0)
1667 +          {
1668            
1669 +            if (args_info->staticProps_group_counter && override)
1670 +              reset_group_staticProps (args_info);
1671 +            args_info->staticProps_group_counter += 1;
1672 +          
1673 +            if (update_arg( 0 ,
1674 +                 0 , &(args_info->rodlength_given),
1675 +                &(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO,
1676 +                check_ambiguity, override, 0, 0,
1677 +                "rodlength", '-',
1678 +                additional_error))
1679 +              goto failure;
1680 +          
1681 +          }
1682 +          /* spatially-resolved tetrahedrality order parameter Qk(z).  */
1683 +          else if (strcmp (long_options[option_index].name, "tet_param_z") == 0)
1684 +          {
1685 +          
1686 +            if (args_info->staticProps_group_counter && override)
1687 +              reset_group_staticProps (args_info);
1688 +            args_info->staticProps_group_counter += 1;
1689 +          
1690 +            if (update_arg( 0 ,
1691 +                 0 , &(args_info->tet_param_z_given),
1692 +                &(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO,
1693 +                check_ambiguity, override, 0, 0,
1694 +                "tet_param_z", '-',
1695 +                additional_error))
1696 +              goto failure;
1697 +          
1698 +          }
1699 +          /* slab-resolved RNEMD statistics (temperature, density, velocity).  */
1700 +          else if (strcmp (long_options[option_index].name, "rnemdz") == 0)
1701 +          {
1702 +          
1703 +            if (args_info->staticProps_group_counter && override)
1704 +              reset_group_staticProps (args_info);
1705 +            args_info->staticProps_group_counter += 1;
1706 +          
1707 +            if (update_arg( 0 ,
1708 +                 0 , &(args_info->rnemdz_given),
1709 +                &(local_args_info.rnemdz_given), optarg, 0, 0, ARG_NO,
1710 +                check_ambiguity, override, 0, 0,
1711 +                "rnemdz", '-',
1712 +                additional_error))
1713 +              goto failure;
1714 +          
1715 +          }
1716 +          /* shell-resolved RNEMD statistics (temperature, density, angular velocity).  */
1717 +          else if (strcmp (long_options[option_index].name, "rnemdr") == 0)
1718 +          {
1719 +          
1720 +            if (args_info->staticProps_group_counter && override)
1721 +              reset_group_staticProps (args_info);
1722 +            args_info->staticProps_group_counter += 1;
1723 +          
1724 +            if (update_arg( 0 ,
1725 +                 0 , &(args_info->rnemdr_given),
1726 +                &(local_args_info.rnemdr_given), optarg, 0, 0, ARG_NO,
1727 +                check_ambiguity, override, 0, 0,
1728 +                "rnemdr", '-',
1729 +                additional_error))
1730 +              goto failure;
1731 +          
1732 +          }
1733 +          /* shell and angle-resolved RNEMD statistics (temperature, density, angular velocity).  */
1734 +          else if (strcmp (long_options[option_index].name, "rnemdrt") == 0)
1735 +          {
1736 +          
1737 +            if (args_info->staticProps_group_counter && override)
1738 +              reset_group_staticProps (args_info);
1739 +            args_info->staticProps_group_counter += 1;
1740 +          
1741 +            if (update_arg( 0 ,
1742 +                 0 , &(args_info->rnemdrt_given),
1743 +                &(local_args_info.rnemdrt_given), optarg, 0, 0, ARG_NO,
1744 +                check_ambiguity, override, 0, 0,
1745 +                "rnemdrt", '-',
1746 +                additional_error))
1747 +              goto failure;
1748 +          
1749 +          }
1750 +          
1751            break;
1752          case '?':       /* Invalid option.  */
1753            /* `getopt_long' already printed an error message.  */
# Line 1486 | Line 1761 | cmdline_parser_internal (int argc, char * const *argv,
1761  
1762    if (args_info->staticProps_group_counter > 1)
1763      {
1764 <      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 : ""));
1764 >      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 : ""));
1765        error = 1;
1766      }
1767    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines