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 1993 by gezelter, Tue Apr 29 17:32:31 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 +  "      --uFreqMap                electrostatic potential to frequency map based \n                                  on the Cho nitrile fits",
96      0
97   };
98  
# Line 88 | Line 108 | static int
108   void clear_args (struct gengetopt_args_info *args_info);
109  
110   static int
111 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
111 > cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
112                          struct cmdline_parser_params *params, const char *additional_error);
113  
114   static int
# Line 120 | Line 140 | void clear_given (struct gengetopt_args_info *args_inf
140    args_info->sele3_given = 0 ;
141    args_info->refsele_given = 0 ;
142    args_info->comsele_given = 0 ;
143 +  args_info->seleoffset_given = 0 ;
144 +  args_info->seleoffset2_given = 0 ;
145    args_info->molname_given = 0 ;
146    args_info->begin_given = 0 ;
147    args_info->end_given = 0 ;
148    args_info->radius_given = 0 ;
149    args_info->bo_given = 0 ;
150 <  args_info->bor_given = 0 ;
150 >  args_info->ior_given = 0 ;
151 >  args_info->for_given = 0 ;
152    args_info->bad_given = 0 ;
153 +  args_info->count_given = 0 ;
154    args_info->gofr_given = 0 ;
155    args_info->gofz_given = 0 ;
156    args_info->r_theta_given = 0 ;
# Line 143 | Line 167 | void clear_given (struct gengetopt_args_info *args_inf
167    args_info->p_angle_given = 0 ;
168    args_info->hxy_given = 0 ;
169    args_info->rho_r_given = 0 ;
170 +  args_info->angle_r_given = 0 ;
171    args_info->hullvol_given = 0 ;
172 +  args_info->rodlength_given = 0 ;
173 +  args_info->tet_param_given = 0 ;
174 +  args_info->tet_param_z_given = 0 ;
175 +  args_info->rnemdz_given = 0 ;
176 +  args_info->rnemdr_given = 0 ;
177 +  args_info->rnemdrt_given = 0 ;
178 +  args_info->uFreqMap_given = 0 ;
179    args_info->staticProps_group_counter = 0 ;
180   }
181  
182   static
183   void clear_args (struct gengetopt_args_info *args_info)
184   {
185 +  FIX_UNUSED (args_info);
186    args_info->input_arg = NULL;
187    args_info->input_orig = NULL;
188    args_info->output_arg = NULL;
# Line 182 | Line 215 | void clear_args (struct gengetopt_args_info *args_info
215    args_info->refsele_orig = NULL;
216    args_info->comsele_arg = NULL;
217    args_info->comsele_orig = NULL;
218 +  args_info->seleoffset_orig = NULL;
219 +  args_info->seleoffset2_orig = NULL;
220    args_info->molname_arg = NULL;
221    args_info->molname_orig = NULL;
222    args_info->begin_orig = NULL;
# Line 215 | Line 250 | void init_args_info(struct gengetopt_args_info *args_i
250    args_info->sele3_help = gengetopt_args_info_help[17] ;
251    args_info->refsele_help = gengetopt_args_info_help[18] ;
252    args_info->comsele_help = gengetopt_args_info_help[19] ;
253 <  args_info->molname_help = gengetopt_args_info_help[20] ;
254 <  args_info->begin_help = gengetopt_args_info_help[21] ;
255 <  args_info->end_help = gengetopt_args_info_help[22] ;
256 <  args_info->radius_help = gengetopt_args_info_help[23] ;
257 <  args_info->bo_help = gengetopt_args_info_help[25] ;
258 <  args_info->bor_help = gengetopt_args_info_help[26] ;
259 <  args_info->bad_help = gengetopt_args_info_help[27] ;
260 <  args_info->gofr_help = gengetopt_args_info_help[28] ;
261 <  args_info->gofz_help = gengetopt_args_info_help[29] ;
262 <  args_info->r_theta_help = gengetopt_args_info_help[30] ;
263 <  args_info->r_omega_help = gengetopt_args_info_help[31] ;
264 <  args_info->r_z_help = gengetopt_args_info_help[32] ;
265 <  args_info->theta_omega_help = gengetopt_args_info_help[33] ;
266 <  args_info->gxyz_help = gengetopt_args_info_help[34] ;
267 <  args_info->twodgofr_help = gengetopt_args_info_help[35] ;
268 <  args_info->p2_help = gengetopt_args_info_help[36] ;
269 <  args_info->rp2_help = gengetopt_args_info_help[37] ;
270 <  args_info->scd_help = gengetopt_args_info_help[38] ;
271 <  args_info->density_help = gengetopt_args_info_help[39] ;
272 <  args_info->slab_density_help = gengetopt_args_info_help[40] ;
273 <  args_info->p_angle_help = gengetopt_args_info_help[41] ;
274 <  args_info->hxy_help = gengetopt_args_info_help[42] ;
275 <  args_info->rho_r_help = gengetopt_args_info_help[43] ;
276 <  args_info->hullvol_help = gengetopt_args_info_help[44] ;
253 >  args_info->seleoffset_help = gengetopt_args_info_help[20] ;
254 >  args_info->seleoffset2_help = gengetopt_args_info_help[21] ;
255 >  args_info->molname_help = gengetopt_args_info_help[22] ;
256 >  args_info->begin_help = gengetopt_args_info_help[23] ;
257 >  args_info->end_help = gengetopt_args_info_help[24] ;
258 >  args_info->radius_help = gengetopt_args_info_help[25] ;
259 >  args_info->bo_help = gengetopt_args_info_help[27] ;
260 >  args_info->ior_help = gengetopt_args_info_help[28] ;
261 >  args_info->for_help = gengetopt_args_info_help[29] ;
262 >  args_info->bad_help = gengetopt_args_info_help[30] ;
263 >  args_info->count_help = gengetopt_args_info_help[31] ;
264 >  args_info->gofr_help = gengetopt_args_info_help[32] ;
265 >  args_info->gofz_help = gengetopt_args_info_help[33] ;
266 >  args_info->r_theta_help = gengetopt_args_info_help[34] ;
267 >  args_info->r_omega_help = gengetopt_args_info_help[35] ;
268 >  args_info->r_z_help = gengetopt_args_info_help[36] ;
269 >  args_info->theta_omega_help = gengetopt_args_info_help[37] ;
270 >  args_info->gxyz_help = gengetopt_args_info_help[38] ;
271 >  args_info->twodgofr_help = gengetopt_args_info_help[39] ;
272 >  args_info->p2_help = gengetopt_args_info_help[40] ;
273 >  args_info->rp2_help = gengetopt_args_info_help[41] ;
274 >  args_info->scd_help = gengetopt_args_info_help[42] ;
275 >  args_info->density_help = gengetopt_args_info_help[43] ;
276 >  args_info->slab_density_help = gengetopt_args_info_help[44] ;
277 >  args_info->p_angle_help = gengetopt_args_info_help[45] ;
278 >  args_info->hxy_help = gengetopt_args_info_help[46] ;
279 >  args_info->rho_r_help = gengetopt_args_info_help[47] ;
280 >  args_info->angle_r_help = gengetopt_args_info_help[48] ;
281 >  args_info->hullvol_help = gengetopt_args_info_help[49] ;
282 >  args_info->rodlength_help = gengetopt_args_info_help[50] ;
283 >  args_info->tet_param_help = gengetopt_args_info_help[51] ;
284 >  args_info->tet_param_z_help = gengetopt_args_info_help[52] ;
285 >  args_info->rnemdz_help = gengetopt_args_info_help[53] ;
286 >  args_info->rnemdr_help = gengetopt_args_info_help[54] ;
287 >  args_info->rnemdrt_help = gengetopt_args_info_help[55] ;
288 >  args_info->uFreqMap_help = gengetopt_args_info_help[56] ;
289    
290   }
291  
292   void
293   cmdline_parser_print_version (void)
294   {
295 <  printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION);
295 >  printf ("%s %s\n",
296 >     (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
297 >     CMDLINE_PARSER_VERSION);
298   }
299  
300   static void print_help_common(void) {
# Line 260 | Line 309 | static void print_help_common(void) {
309    printf("\n");
310  
311    if (strlen(gengetopt_args_info_description) > 0)
312 <    printf("%s\n", gengetopt_args_info_description);
312 >    printf("%s\n\n", gengetopt_args_info_description);
313   }
314  
315   void
# Line 279 | Line 328 | cmdline_parser_init (struct gengetopt_args_info *args_
328    clear_args (args_info);
329    init_args_info (args_info);
330  
331 <  args_info->inputs = NULL;
331 >  args_info->inputs = 0;
332    args_info->inputs_num = 0;
333   }
334  
# Line 345 | Line 394 | cmdline_parser_release (struct gengetopt_args_info *ar
394    free_string_field (&(args_info->refsele_orig));
395    free_string_field (&(args_info->comsele_arg));
396    free_string_field (&(args_info->comsele_orig));
397 +  free_string_field (&(args_info->seleoffset_orig));
398 +  free_string_field (&(args_info->seleoffset2_orig));
399    free_string_field (&(args_info->molname_arg));
400    free_string_field (&(args_info->molname_orig));
401    free_string_field (&(args_info->begin_orig));
# Line 363 | Line 414 | static void
414  
415  
416   static void
417 < write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[])
417 > write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
418   {
419 +  FIX_UNUSED (values);
420    if (arg) {
421      fprintf(outfile, "%s=\"%s\"\n", opt, arg);
422    } else {
# Line 424 | Line 476 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
476      write_into_file(outfile, "refsele", args_info->refsele_orig, 0);
477    if (args_info->comsele_given)
478      write_into_file(outfile, "comsele", args_info->comsele_orig, 0);
479 +  if (args_info->seleoffset_given)
480 +    write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0);
481 +  if (args_info->seleoffset2_given)
482 +    write_into_file(outfile, "seleoffset2", args_info->seleoffset2_orig, 0);
483    if (args_info->molname_given)
484      write_into_file(outfile, "molname", args_info->molname_orig, 0);
485    if (args_info->begin_given)
# Line 434 | Line 490 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
490      write_into_file(outfile, "radius", args_info->radius_orig, 0);
491    if (args_info->bo_given)
492      write_into_file(outfile, "bo", 0, 0 );
493 <  if (args_info->bor_given)
494 <    write_into_file(outfile, "bor", 0, 0 );
493 >  if (args_info->ior_given)
494 >    write_into_file(outfile, "ior", 0, 0 );
495 >  if (args_info->for_given)
496 >    write_into_file(outfile, "for", 0, 0 );
497    if (args_info->bad_given)
498      write_into_file(outfile, "bad", 0, 0 );
499 +  if (args_info->count_given)
500 +    write_into_file(outfile, "count", 0, 0 );
501    if (args_info->gofr_given)
502      write_into_file(outfile, "gofr", 0, 0 );
503    if (args_info->gofz_given)
# Line 470 | Line 530 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
530      write_into_file(outfile, "hxy", 0, 0 );
531    if (args_info->rho_r_given)
532      write_into_file(outfile, "rho_r", 0, 0 );
533 +  if (args_info->angle_r_given)
534 +    write_into_file(outfile, "angle_r", 0, 0 );
535    if (args_info->hullvol_given)
536      write_into_file(outfile, "hullvol", 0, 0 );
537 +  if (args_info->rodlength_given)
538 +    write_into_file(outfile, "rodlength", 0, 0 );
539 +  if (args_info->tet_param_given)
540 +    write_into_file(outfile, "tet_param", 0, 0 );
541 +  if (args_info->tet_param_z_given)
542 +    write_into_file(outfile, "tet_param_z", 0, 0 );
543 +  if (args_info->rnemdz_given)
544 +    write_into_file(outfile, "rnemdz", 0, 0 );
545 +  if (args_info->rnemdr_given)
546 +    write_into_file(outfile, "rnemdr", 0, 0 );
547 +  if (args_info->rnemdrt_given)
548 +    write_into_file(outfile, "rnemdrt", 0, 0 );
549 +  if (args_info->uFreqMap_given)
550 +    write_into_file(outfile, "uFreqMap", 0, 0 );
551    
552  
553    i = EXIT_SUCCESS;
# Line 508 | Line 584 | gengetopt_strdup (const char *s)
584   char *
585   gengetopt_strdup (const char *s)
586   {
587 <  char *result = NULL;
587 >  char *result = 0;
588    if (!s)
589      return result;
590  
# Line 526 | Line 602 | reset_group_staticProps(struct gengetopt_args_info *ar
602      return;
603    
604    args_info->bo_given = 0 ;
605 <  args_info->bor_given = 0 ;
605 >  args_info->ior_given = 0 ;
606 >  args_info->for_given = 0 ;
607    args_info->bad_given = 0 ;
608 +  args_info->count_given = 0 ;
609    args_info->gofr_given = 0 ;
610    args_info->gofz_given = 0 ;
611    args_info->r_theta_given = 0 ;
# Line 544 | Line 622 | reset_group_staticProps(struct gengetopt_args_info *ar
622    args_info->p_angle_given = 0 ;
623    args_info->hxy_given = 0 ;
624    args_info->rho_r_given = 0 ;
625 +  args_info->angle_r_given = 0 ;
626    args_info->hullvol_given = 0 ;
627 +  args_info->rodlength_given = 0 ;
628 +  args_info->tet_param_given = 0 ;
629 +  args_info->tet_param_z_given = 0 ;
630 +  args_info->rnemdz_given = 0 ;
631 +  args_info->rnemdr_given = 0 ;
632 +  args_info->rnemdrt_given = 0 ;
633 +  args_info->uFreqMap_given = 0 ;
634  
635    args_info->staticProps_group_counter = 0;
636   }
637  
638   int
639 < cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info)
639 > cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
640   {
641    return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
642   }
643  
644   int
645 < cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info,
645 > cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
646                     struct cmdline_parser_params *params)
647   {
648    int result;
649 <  result = cmdline_parser_internal (argc, argv, args_info, params, NULL);
649 >  result = cmdline_parser_internal (argc, argv, args_info, params, 0);
650  
651    if (result == EXIT_FAILURE)
652      {
# Line 572 | Line 658 | int
658   }
659  
660   int
661 < cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
661 > cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
662   {
663    int result;
664    struct cmdline_parser_params params;
# Line 583 | Line 669 | cmdline_parser2 (int argc, char * const *argv, struct
669    params.check_ambiguity = 0;
670    params.print_errors = 1;
671  
672 <  result = cmdline_parser_internal (argc, argv, args_info, &params, NULL);
672 >  result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
673  
674    if (result == EXIT_FAILURE)
675      {
# Line 599 | Line 685 | cmdline_parser_required (struct gengetopt_args_info *a
685   {
686    int result = EXIT_SUCCESS;
687  
688 <  if (cmdline_parser_required2(args_info, prog_name, NULL) > 0)
688 >  if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
689      result = EXIT_FAILURE;
690  
691    if (result == EXIT_FAILURE)
# Line 615 | Line 701 | cmdline_parser_required2 (struct gengetopt_args_info *
701   cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error)
702   {
703    int error = 0;
704 +  FIX_UNUSED (additional_error);
705  
706    /* checks for required options */
707    if (! args_info->input_given)
# Line 625 | Line 712 | cmdline_parser_required2 (struct gengetopt_args_info *
712    
713    if (args_info->staticProps_group_counter == 0)
714      {
715 <      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 : ""));
715 >      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 : ""));
716        error = 1;
717      }
718    
# Line 659 | Line 746 | int update_arg(void *field, char **orig_field,
746   static
747   int update_arg(void *field, char **orig_field,
748                 unsigned int *field_given, unsigned int *prev_given,
749 <               char *value, char *possible_values[], const char *default_value,
749 >               char *value, const char *possible_values[],
750 >               const char *default_value,
751                 cmdline_parser_arg_type arg_type,
752                 int check_ambiguity, int override,
753                 int no_free, int multiple_option,
# Line 670 | Line 758 | int update_arg(void *field, char **orig_field,
758    const char *val = value;
759    int found;
760    char **string_field;
761 +  FIX_UNUSED (field);
762  
763    stop_char = 0;
764    found = 0;
# Line 687 | Line 776 | int update_arg(void *field, char **orig_field,
776        return 1; /* failure */
777      }
778  
779 +  FIX_UNUSED (default_value);
780      
781    if (field_given && *field_given && ! override)
782      return 0;
# Line 750 | Line 840 | int
840  
841  
842   int
843 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
843 > cmdline_parser_internal (
844 >  int argc, char **argv, struct gengetopt_args_info *args_info,
845                          struct cmdline_parser_params *params, const char *additional_error)
846   {
847    int c;        /* Character of the parsed option.  */
# Line 805 | Line 896 | cmdline_parser_internal (int argc, char * const *argv,
896          { "sele3",      1, NULL, 0 },
897          { "refsele",    1, NULL, 0 },
898          { "comsele",    1, NULL, 0 },
899 +        { "seleoffset", 1, NULL, 0 },
900 +        { "seleoffset2",        1, NULL, 0 },
901          { "molname",    1, NULL, 0 },
902          { "begin",      1, NULL, 0 },
903          { "end",        1, NULL, 0 },
904          { "radius",     1, NULL, 0 },
905          { "bo", 0, NULL, 0 },
906 <        { "bor",        0, NULL, 0 },
906 >        { "ior",        0, NULL, 0 },
907 >        { "for",        0, NULL, 0 },
908          { "bad",        0, NULL, 0 },
909 +        { "count",      0, NULL, 0 },
910          { "gofr",       0, NULL, 'g' },
911          { "gofz",       0, NULL, 0 },
912          { "r_theta",    0, NULL, 0 },
# Line 828 | Line 923 | cmdline_parser_internal (int argc, char * const *argv,
923          { "p_angle",    0, NULL, 0 },
924          { "hxy",        0, NULL, 0 },
925          { "rho_r",      0, NULL, 0 },
926 +        { "angle_r",    0, NULL, 0 },
927          { "hullvol",    0, NULL, 0 },
928 <        { NULL, 0, NULL, 0 }
928 >        { "rodlength",  0, NULL, 0 },
929 >        { "tet_param",  0, NULL, 'Q' },
930 >        { "tet_param_z",        0, NULL, 0 },
931 >        { "rnemdz",     0, NULL, 0 },
932 >        { "rnemdr",     0, NULL, 0 },
933 >        { "rnemdrt",    0, NULL, 0 },
934 >        { "uFreqMap",   0, NULL, 0 },
935 >        { 0,  0, 0, 0 }
936        };
937  
938 <      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index);
938 >      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index);
939  
940        if (c == -1) break;       /* Exit from `while (1)' loop.  */
941  
# Line 971 | Line 1074 | cmdline_parser_internal (int argc, char * const *argv,
1074              goto failure;
1075          
1076            break;
1077 <        case 'p':       /* p2 order parameter (--sele1 and --sele2 must be specified).  */
1077 >        case 'p':       /* p2 order parameter (--sele1 must be specified, --sele2 is optional).  */
1078          
1079            if (args_info->staticProps_group_counter && override)
1080              reset_group_staticProps (args_info);
# Line 1016 | Line 1119 | cmdline_parser_internal (int argc, char * const *argv,
1119              goto failure;
1120          
1121            break;
1122 +        case 'Q':       /* tetrahedrality order parameter (Qk).  */
1123 +        
1124 +          if (args_info->staticProps_group_counter && override)
1125 +            reset_group_staticProps (args_info);
1126 +          args_info->staticProps_group_counter += 1;
1127 +        
1128 +          if (update_arg( 0 ,
1129 +               0 , &(args_info->tet_param_given),
1130 +              &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO,
1131 +              check_ambiguity, override, 0, 0,
1132 +              "tet_param", 'Q',
1133 +              additional_error))
1134 +            goto failure;
1135 +        
1136 +          break;
1137  
1138          case 0: /* Long option with no short option */
1139            /* number of bins in z axis.  */
# Line 1144 | Line 1262 | cmdline_parser_internal (int argc, char * const *argv,
1262                goto failure;
1263            
1264            }
1265 +          /* global index offset for a second object (used to define a vector between sites in molecule).  */
1266 +          else if (strcmp (long_options[option_index].name, "seleoffset") == 0)
1267 +          {
1268 +          
1269 +          
1270 +            if (update_arg( (void *)&(args_info->seleoffset_arg),
1271 +                 &(args_info->seleoffset_orig), &(args_info->seleoffset_given),
1272 +                &(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT,
1273 +                check_ambiguity, override, 0, 0,
1274 +                "seleoffset", '-',
1275 +                additional_error))
1276 +              goto failure;
1277 +          
1278 +          }
1279 +          /* global index offset for a third object (used to define a vector between sites in molecule).  */
1280 +          else if (strcmp (long_options[option_index].name, "seleoffset2") == 0)
1281 +          {
1282 +          
1283 +          
1284 +            if (update_arg( (void *)&(args_info->seleoffset2_arg),
1285 +                 &(args_info->seleoffset2_orig), &(args_info->seleoffset2_given),
1286 +                &(local_args_info.seleoffset2_given), optarg, 0, 0, ARG_INT,
1287 +                check_ambiguity, override, 0, 0,
1288 +                "seleoffset2", '-',
1289 +                additional_error))
1290 +              goto failure;
1291 +          
1292 +          }
1293            /* molecule name.  */
1294            else if (strcmp (long_options[option_index].name, "molname") == 0)
1295            {
# Line 1217 | Line 1363 | cmdline_parser_internal (int argc, char * const *argv,
1363                goto failure;
1364            
1365            }
1366 <          /* bond order parameter as a function of radius (--rcut must be specified).  */
1367 <          else if (strcmp (long_options[option_index].name, "bor") == 0)
1366 >          /* icosahedral bond order parameter as a function of radius (--rcut must be specified).  */
1367 >          else if (strcmp (long_options[option_index].name, "ior") == 0)
1368            {
1369            
1370              if (args_info->staticProps_group_counter && override)
# Line 1226 | Line 1372 | cmdline_parser_internal (int argc, char * const *argv,
1372              args_info->staticProps_group_counter += 1;
1373            
1374              if (update_arg( 0 ,
1375 <                 0 , &(args_info->bor_given),
1376 <                &(local_args_info.bor_given), optarg, 0, 0, ARG_NO,
1375 >                 0 , &(args_info->ior_given),
1376 >                &(local_args_info.ior_given), optarg, 0, 0, ARG_NO,
1377                  check_ambiguity, override, 0, 0,
1378 <                "bor", '-',
1378 >                "ior", '-',
1379 >                additional_error))
1380 >              goto failure;
1381 >          
1382 >          }
1383 >          /* FCC bond order parameter as a function of radius (--rcut must be specified).  */
1384 >          else if (strcmp (long_options[option_index].name, "for") == 0)
1385 >          {
1386 >          
1387 >            if (args_info->staticProps_group_counter && override)
1388 >              reset_group_staticProps (args_info);
1389 >            args_info->staticProps_group_counter += 1;
1390 >          
1391 >            if (update_arg( 0 ,
1392 >                 0 , &(args_info->for_given),
1393 >                &(local_args_info.for_given), optarg, 0, 0, ARG_NO,
1394 >                check_ambiguity, override, 0, 0,
1395 >                "for", '-',
1396                  additional_error))
1397                goto failure;
1398            
# Line 1251 | Line 1414 | cmdline_parser_internal (int argc, char * const *argv,
1414                goto failure;
1415            
1416            }
1417 +          /* count of molecules matching selection criteria (and associated statistics).  */
1418 +          else if (strcmp (long_options[option_index].name, "count") == 0)
1419 +          {
1420 +          
1421 +            if (args_info->staticProps_group_counter && override)
1422 +              reset_group_staticProps (args_info);
1423 +            args_info->staticProps_group_counter += 1;
1424 +          
1425 +            if (update_arg( 0 ,
1426 +                 0 , &(args_info->count_given),
1427 +                &(local_args_info.count_given), optarg, 0, 0, ARG_NO,
1428 +                check_ambiguity, override, 0, 0,
1429 +                "count", '-',
1430 +                additional_error))
1431 +              goto failure;
1432 +          
1433 +          }
1434            /* g(z).  */
1435            else if (strcmp (long_options[option_index].name, "gofz") == 0)
1436            {
# Line 1404 | Line 1584 | cmdline_parser_internal (int argc, char * const *argv,
1584                goto failure;
1585            
1586            }
1587 <          /* p(cos(theta)).  */
1587 >          /* p(cos(theta)) (--sele1 must be specified, --sele2 is optional).  */
1588            else if (strcmp (long_options[option_index].name, "p_angle") == 0)
1589            {
1590            
# Line 1451 | Line 1631 | cmdline_parser_internal (int argc, char * const *argv,
1631                  &(local_args_info.rho_r_given), optarg, 0, 0, ARG_NO,
1632                  check_ambiguity, override, 0, 0,
1633                  "rho_r", '-',
1634 +                additional_error))
1635 +              goto failure;
1636 +          
1637 +          }
1638 +          /* angle of R.  */
1639 +          else if (strcmp (long_options[option_index].name, "angle_r") == 0)
1640 +          {
1641 +          
1642 +            if (args_info->staticProps_group_counter && override)
1643 +              reset_group_staticProps (args_info);
1644 +            args_info->staticProps_group_counter += 1;
1645 +          
1646 +            if (update_arg( 0 ,
1647 +                 0 , &(args_info->angle_r_given),
1648 +                &(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO,
1649 +                check_ambiguity, override, 0, 0,
1650 +                "angle_r", '-',
1651                  additional_error))
1652                goto failure;
1653            
# Line 1472 | Line 1669 | cmdline_parser_internal (int argc, char * const *argv,
1669                goto failure;
1670            
1671            }
1672 +          /* length of nanorod.  */
1673 +          else if (strcmp (long_options[option_index].name, "rodlength") == 0)
1674 +          {
1675            
1676 +            if (args_info->staticProps_group_counter && override)
1677 +              reset_group_staticProps (args_info);
1678 +            args_info->staticProps_group_counter += 1;
1679 +          
1680 +            if (update_arg( 0 ,
1681 +                 0 , &(args_info->rodlength_given),
1682 +                &(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO,
1683 +                check_ambiguity, override, 0, 0,
1684 +                "rodlength", '-',
1685 +                additional_error))
1686 +              goto failure;
1687 +          
1688 +          }
1689 +          /* spatially-resolved tetrahedrality order parameter Qk(z).  */
1690 +          else if (strcmp (long_options[option_index].name, "tet_param_z") == 0)
1691 +          {
1692 +          
1693 +            if (args_info->staticProps_group_counter && override)
1694 +              reset_group_staticProps (args_info);
1695 +            args_info->staticProps_group_counter += 1;
1696 +          
1697 +            if (update_arg( 0 ,
1698 +                 0 , &(args_info->tet_param_z_given),
1699 +                &(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO,
1700 +                check_ambiguity, override, 0, 0,
1701 +                "tet_param_z", '-',
1702 +                additional_error))
1703 +              goto failure;
1704 +          
1705 +          }
1706 +          /* slab-resolved RNEMD statistics (temperature, density, velocity).  */
1707 +          else if (strcmp (long_options[option_index].name, "rnemdz") == 0)
1708 +          {
1709 +          
1710 +            if (args_info->staticProps_group_counter && override)
1711 +              reset_group_staticProps (args_info);
1712 +            args_info->staticProps_group_counter += 1;
1713 +          
1714 +            if (update_arg( 0 ,
1715 +                 0 , &(args_info->rnemdz_given),
1716 +                &(local_args_info.rnemdz_given), optarg, 0, 0, ARG_NO,
1717 +                check_ambiguity, override, 0, 0,
1718 +                "rnemdz", '-',
1719 +                additional_error))
1720 +              goto failure;
1721 +          
1722 +          }
1723 +          /* shell-resolved RNEMD statistics (temperature, density, angular velocity).  */
1724 +          else if (strcmp (long_options[option_index].name, "rnemdr") == 0)
1725 +          {
1726 +          
1727 +            if (args_info->staticProps_group_counter && override)
1728 +              reset_group_staticProps (args_info);
1729 +            args_info->staticProps_group_counter += 1;
1730 +          
1731 +            if (update_arg( 0 ,
1732 +                 0 , &(args_info->rnemdr_given),
1733 +                &(local_args_info.rnemdr_given), optarg, 0, 0, ARG_NO,
1734 +                check_ambiguity, override, 0, 0,
1735 +                "rnemdr", '-',
1736 +                additional_error))
1737 +              goto failure;
1738 +          
1739 +          }
1740 +          /* shell and angle-resolved RNEMD statistics (temperature, density, angular velocity).  */
1741 +          else if (strcmp (long_options[option_index].name, "rnemdrt") == 0)
1742 +          {
1743 +          
1744 +            if (args_info->staticProps_group_counter && override)
1745 +              reset_group_staticProps (args_info);
1746 +            args_info->staticProps_group_counter += 1;
1747 +          
1748 +            if (update_arg( 0 ,
1749 +                 0 , &(args_info->rnemdrt_given),
1750 +                &(local_args_info.rnemdrt_given), optarg, 0, 0, ARG_NO,
1751 +                check_ambiguity, override, 0, 0,
1752 +                "rnemdrt", '-',
1753 +                additional_error))
1754 +              goto failure;
1755 +          
1756 +          }
1757 +          /* electrostatic potential to frequency map based on the Cho nitrile fits.  */
1758 +          else if (strcmp (long_options[option_index].name, "uFreqMap") == 0)
1759 +          {
1760 +          
1761 +            if (args_info->staticProps_group_counter && override)
1762 +              reset_group_staticProps (args_info);
1763 +            args_info->staticProps_group_counter += 1;
1764 +          
1765 +            if (update_arg( 0 ,
1766 +                 0 , &(args_info->uFreqMap_given),
1767 +                &(local_args_info.uFreqMap_given), optarg, 0, 0, ARG_NO,
1768 +                check_ambiguity, override, 0, 0,
1769 +                "uFreqMap", '-',
1770 +                additional_error))
1771 +              goto failure;
1772 +          
1773 +          }
1774 +          
1775            break;
1776          case '?':       /* Invalid option.  */
1777            /* `getopt_long' already printed an error message.  */
# Line 1486 | Line 1785 | cmdline_parser_internal (int argc, char * const *argv,
1785  
1786    if (args_info->staticProps_group_counter > 1)
1787      {
1788 <      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 : ""));
1788 >      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 : ""));
1789        error = 1;
1790      }
1791    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines