| 1 | 
  | 
/* | 
| 2 | 
< | 
  File autogenerated by gengetopt version 2.16 | 
| 2 | 
> | 
  File autogenerated by gengetopt version 2.15 | 
| 3 | 
  | 
  generated with the following command: | 
| 4 | 
< | 
  gengetopt -F StaticPropsCmd  | 
| 4 | 
> | 
  gengetopt -i StaticProps.ggo -F StaticPropsCmd  | 
| 5 | 
  | 
 | 
| 6 | 
  | 
  The developers of gengetopt consider the fixed text that goes in all | 
| 7 | 
  | 
  gengetopt output files to be in the public domain: | 
| 48 | 
  | 
  args_info->nbins_y_given = 0 ; | 
| 49 | 
  | 
  args_info->nanglebins_given = 0 ; | 
| 50 | 
  | 
  args_info->length_given = 0 ; | 
| 51 | 
– | 
  args_info->LegendreL_given = 0 ; | 
| 51 | 
  | 
  args_info->rcut_given = 0 ; | 
| 52 | 
  | 
  args_info->zoffset_given = 0 ; | 
| 53 | 
  | 
  args_info->sele1_given = 0 ; | 
| 57 | 
  | 
  args_info->molname_given = 0 ; | 
| 58 | 
  | 
  args_info->begin_given = 0 ; | 
| 59 | 
  | 
  args_info->end_given = 0 ; | 
| 60 | 
+ | 
  args_info->radius_given = 0 ; | 
| 61 | 
  | 
  args_info->bo_given = 0 ; | 
| 62 | 
  | 
  args_info->gofr_given = 0 ; | 
| 63 | 
  | 
  args_info->r_theta_given = 0 ; | 
| 70 | 
  | 
  args_info->density_given = 0 ; | 
| 71 | 
  | 
  args_info->slab_density_given = 0 ; | 
| 72 | 
  | 
  args_info->hxy_given = 0 ; | 
| 73 | 
+ | 
  args_info->rho_r_given = 0 ; | 
| 74 | 
  | 
  args_info->staticProps_group_counter = 0 ; | 
| 75 | 
  | 
} | 
| 76 | 
  | 
 | 
| 92 | 
  | 
  args_info->nanglebins_arg = 50; | 
| 93 | 
  | 
  args_info->nanglebins_orig = NULL; | 
| 94 | 
  | 
  args_info->length_orig = NULL; | 
| 94 | 
– | 
  args_info->LegendreL_orig = NULL; | 
| 95 | 
  | 
  args_info->rcut_orig = NULL; | 
| 96 | 
  | 
  args_info->zoffset_arg = 0; | 
| 97 | 
  | 
  args_info->zoffset_orig = NULL; | 
| 107 | 
  | 
  args_info->molname_orig = NULL; | 
| 108 | 
  | 
  args_info->begin_orig = NULL; | 
| 109 | 
  | 
  args_info->end_orig = NULL; | 
| 110 | 
+ | 
  args_info->radius_orig = NULL; | 
| 111 | 
  | 
   | 
| 112 | 
  | 
} | 
| 113 | 
  | 
 | 
| 132 | 
  | 
  printf("%s\n","  -y, --nbins_y=INT             number of bins in y axis  (default=`100')"); | 
| 133 | 
  | 
  printf("%s\n","  -a, --nanglebins=INT          number of bins for cos(angle)  (default=`50')"); | 
| 134 | 
  | 
  printf("%s\n","      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)"); | 
| 134 | 
– | 
  printf("%s\n","  -l, --LegendreL=INT           Order of Legendre Polynomial (used for Bond \n                                  Order calculations)"); | 
| 135 | 
  | 
  printf("%s\n","  -c, --rcut=DOUBLE             cutoff radius (rcut)"); | 
| 136 | 
  | 
  printf("%s\n","  -z, --zoffset=DOUBLE          Where to set the zero for the slab_density \n                                  calculation  (default=`0')"); | 
| 137 | 
  | 
  printf("%s\n","      --sele1=selection script  select the first stuntdouble set"); | 
| 141 | 
  | 
  printf("%s\n","      --molname=STRING          molecule name"); | 
| 142 | 
  | 
  printf("%s\n","      --begin=INT               begin internal index"); | 
| 143 | 
  | 
  printf("%s\n","      --end=INT                 end internal index"); | 
| 144 | 
+ | 
  printf("%s\n","      --radius=DOUBLE           nanoparticle radius"); | 
| 145 | 
  | 
  printf("%s\n","\n Group: staticProps\n   an option of this group is required"); | 
| 146 | 
< | 
  printf("%s\n","      --bo                      bond order parameter (--rcut and --LegendreL \n                                  must be specified"); | 
| 146 | 
> | 
  printf("%s\n","      --bo                      bond order parameter (--rcut must be specified"); | 
| 147 | 
  | 
  printf("%s\n","  -g, --gofr                    g(r)"); | 
| 148 | 
  | 
  printf("%s\n","      --r_theta                 g(r, cos(theta))"); | 
| 149 | 
  | 
  printf("%s\n","      --r_omega                 g(r, cos(omega))"); | 
| 155 | 
  | 
  printf("%s\n","  -d, --density                 density plot"); | 
| 156 | 
  | 
  printf("%s\n","      --slab_density            slab density"); | 
| 157 | 
  | 
  printf("%s\n","      --hxy                     hxy"); | 
| 158 | 
+ | 
  printf("%s\n","      --rho_r                   rho of R"); | 
| 159 | 
  | 
   | 
| 160 | 
  | 
} | 
| 161 | 
  | 
 | 
| 220 | 
  | 
      free (args_info->length_orig); /* free previous argument */ | 
| 221 | 
  | 
      args_info->length_orig = 0; | 
| 222 | 
  | 
    } | 
| 221 | 
– | 
  if (args_info->LegendreL_orig) | 
| 222 | 
– | 
    { | 
| 223 | 
– | 
      free (args_info->LegendreL_orig); /* free previous argument */ | 
| 224 | 
– | 
      args_info->LegendreL_orig = 0; | 
| 225 | 
– | 
    } | 
| 223 | 
  | 
  if (args_info->rcut_orig) | 
| 224 | 
  | 
    { | 
| 225 | 
  | 
      free (args_info->rcut_orig); /* free previous argument */ | 
| 290 | 
  | 
      free (args_info->end_orig); /* free previous argument */ | 
| 291 | 
  | 
      args_info->end_orig = 0; | 
| 292 | 
  | 
    } | 
| 293 | 
+ | 
  if (args_info->radius_orig) | 
| 294 | 
+ | 
    { | 
| 295 | 
+ | 
      free (args_info->radius_orig); /* free previous argument */ | 
| 296 | 
+ | 
      args_info->radius_orig = 0; | 
| 297 | 
+ | 
    } | 
| 298 | 
  | 
   | 
| 299 | 
  | 
  clear_given (args_info); | 
| 300 | 
  | 
} | 
| 373 | 
  | 
      fprintf(outfile, "%s=\"%s\"\n", "length", args_info->length_orig); | 
| 374 | 
  | 
    } else { | 
| 375 | 
  | 
      fprintf(outfile, "%s\n", "length"); | 
| 374 | 
– | 
    } | 
| 375 | 
– | 
  } | 
| 376 | 
– | 
  if (args_info->LegendreL_given) { | 
| 377 | 
– | 
    if (args_info->LegendreL_orig) { | 
| 378 | 
– | 
      fprintf(outfile, "%s=\"%s\"\n", "LegendreL", args_info->LegendreL_orig); | 
| 379 | 
– | 
    } else { | 
| 380 | 
– | 
      fprintf(outfile, "%s\n", "LegendreL"); | 
| 376 | 
  | 
    } | 
| 377 | 
  | 
  } | 
| 378 | 
  | 
  if (args_info->rcut_given) { | 
| 438 | 
  | 
      fprintf(outfile, "%s\n", "end"); | 
| 439 | 
  | 
    } | 
| 440 | 
  | 
  } | 
| 441 | 
+ | 
  if (args_info->radius_given) { | 
| 442 | 
+ | 
    if (args_info->radius_orig) { | 
| 443 | 
+ | 
      fprintf(outfile, "%s=\"%s\"\n", "radius", args_info->radius_orig); | 
| 444 | 
+ | 
    } else { | 
| 445 | 
+ | 
      fprintf(outfile, "%s\n", "radius"); | 
| 446 | 
+ | 
    } | 
| 447 | 
+ | 
  } | 
| 448 | 
  | 
  if (args_info->bo_given) { | 
| 449 | 
  | 
    fprintf(outfile, "%s\n", "bo"); | 
| 450 | 
  | 
  } | 
| 480 | 
  | 
  } | 
| 481 | 
  | 
  if (args_info->hxy_given) { | 
| 482 | 
  | 
    fprintf(outfile, "%s\n", "hxy"); | 
| 483 | 
+ | 
  } | 
| 484 | 
+ | 
  if (args_info->rho_r_given) { | 
| 485 | 
+ | 
    fprintf(outfile, "%s\n", "rho_r"); | 
| 486 | 
  | 
  } | 
| 487 | 
  | 
   | 
| 488 | 
  | 
  fclose (outfile); | 
| 535 | 
  | 
  args_info->density_given = 0 ; | 
| 536 | 
  | 
  args_info->slab_density_given = 0 ; | 
| 537 | 
  | 
  args_info->hxy_given = 0 ; | 
| 538 | 
+ | 
  args_info->rho_r_given = 0 ; | 
| 539 | 
  | 
 | 
| 540 | 
  | 
  args_info->staticProps_group_counter = 0; | 
| 541 | 
  | 
} | 
| 613 | 
  | 
  cmdline_parser_init (&local_args_info); | 
| 614 | 
  | 
 | 
| 615 | 
  | 
  optarg = 0; | 
| 616 | 
< | 
  optind = 0; | 
| 616 | 
> | 
  optind = 1; | 
| 617 | 
  | 
  opterr = 1; | 
| 618 | 
  | 
  optopt = '?'; | 
| 619 | 
  | 
 | 
| 633 | 
  | 
        { "nbins_y",    1, NULL, 'y' }, | 
| 634 | 
  | 
        { "nanglebins", 1, NULL, 'a' }, | 
| 635 | 
  | 
        { "length",     1, NULL, 0 }, | 
| 630 | 
– | 
        { "LegendreL",  1, NULL, 'l' }, | 
| 636 | 
  | 
        { "rcut",       1, NULL, 'c' }, | 
| 637 | 
  | 
        { "zoffset",    1, NULL, 'z' }, | 
| 638 | 
  | 
        { "sele1",      1, NULL, 0 }, | 
| 642 | 
  | 
        { "molname",    1, NULL, 0 }, | 
| 643 | 
  | 
        { "begin",      1, NULL, 0 }, | 
| 644 | 
  | 
        { "end",        1, NULL, 0 }, | 
| 645 | 
+ | 
        { "radius",     1, NULL, 0 }, | 
| 646 | 
  | 
        { "bo", 0, NULL, 0 }, | 
| 647 | 
  | 
        { "gofr",       0, NULL, 'g' }, | 
| 648 | 
  | 
        { "r_theta",    0, NULL, 0 }, | 
| 655 | 
  | 
        { "density",    0, NULL, 'd' }, | 
| 656 | 
  | 
        { "slab_density",       0, NULL, 0 }, | 
| 657 | 
  | 
        { "hxy",        0, NULL, 0 }, | 
| 658 | 
+ | 
        { "rho_r",      0, NULL, 0 }, | 
| 659 | 
  | 
        { NULL, 0, NULL, 0 } | 
| 660 | 
  | 
      }; | 
| 661 | 
  | 
 | 
| 662 | 
  | 
      stop_char = 0; | 
| 663 | 
< | 
      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:l:c:z:gpsd", long_options, &option_index); | 
| 663 | 
> | 
      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index); | 
| 664 | 
  | 
 | 
| 665 | 
  | 
      if (c == -1) break;       /* Exit from `while (1)' loop.  */ | 
| 666 | 
  | 
 | 
| 812 | 
  | 
          args_info->nanglebins_orig = gengetopt_strdup (optarg); | 
| 813 | 
  | 
          break; | 
| 814 | 
  | 
 | 
| 808 | 
– | 
        case 'l':       /* Order of Legendre Polynomial (used for Bond Order calculations).  */ | 
| 809 | 
– | 
          if (local_args_info.LegendreL_given) | 
| 810 | 
– | 
            { | 
| 811 | 
– | 
              fprintf (stderr, "%s: `--LegendreL' (`-l') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 812 | 
– | 
              goto failure; | 
| 813 | 
– | 
            } | 
| 814 | 
– | 
          if (args_info->LegendreL_given && ! override) | 
| 815 | 
– | 
            continue; | 
| 816 | 
– | 
          local_args_info.LegendreL_given = 1; | 
| 817 | 
– | 
          args_info->LegendreL_given = 1; | 
| 818 | 
– | 
          args_info->LegendreL_arg = strtol (optarg, &stop_char, 0); | 
| 819 | 
– | 
          if (!(stop_char && *stop_char == '\0')) { | 
| 820 | 
– | 
            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); | 
| 821 | 
– | 
            goto failure; | 
| 822 | 
– | 
          } | 
| 823 | 
– | 
          if (args_info->LegendreL_orig) | 
| 824 | 
– | 
            free (args_info->LegendreL_orig); /* free previous string */ | 
| 825 | 
– | 
          args_info->LegendreL_orig = gengetopt_strdup (optarg); | 
| 826 | 
– | 
          break; | 
| 827 | 
– | 
 | 
| 815 | 
  | 
        case 'c':       /* cutoff radius (rcut).  */ | 
| 816 | 
  | 
          if (local_args_info.rcut_given) | 
| 817 | 
  | 
            { | 
| 1072 | 
  | 
              free (args_info->end_orig); /* free previous string */ | 
| 1073 | 
  | 
            args_info->end_orig = gengetopt_strdup (optarg); | 
| 1074 | 
  | 
          } | 
| 1075 | 
< | 
          /* bond order parameter (--rcut and --LegendreL must be specified.  */ | 
| 1075 | 
> | 
          /* nanoparticle radius.  */ | 
| 1076 | 
> | 
          else if (strcmp (long_options[option_index].name, "radius") == 0) | 
| 1077 | 
> | 
          { | 
| 1078 | 
> | 
            if (local_args_info.radius_given) | 
| 1079 | 
> | 
              { | 
| 1080 | 
> | 
                fprintf (stderr, "%s: `--radius' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1081 | 
> | 
                goto failure; | 
| 1082 | 
> | 
              } | 
| 1083 | 
> | 
            if (args_info->radius_given && ! override) | 
| 1084 | 
> | 
              continue; | 
| 1085 | 
> | 
            local_args_info.radius_given = 1; | 
| 1086 | 
> | 
            args_info->radius_given = 1; | 
| 1087 | 
> | 
            args_info->radius_arg = strtod (optarg, &stop_char); | 
| 1088 | 
> | 
            if (!(stop_char && *stop_char == '\0')) { | 
| 1089 | 
> | 
              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); | 
| 1090 | 
> | 
              goto failure; | 
| 1091 | 
> | 
            } | 
| 1092 | 
> | 
            if (args_info->radius_orig) | 
| 1093 | 
> | 
              free (args_info->radius_orig); /* free previous string */ | 
| 1094 | 
> | 
            args_info->radius_orig = gengetopt_strdup (optarg); | 
| 1095 | 
> | 
          } | 
| 1096 | 
> | 
          /* bond order parameter (--rcut must be specified.  */ | 
| 1097 | 
  | 
          else if (strcmp (long_options[option_index].name, "bo") == 0) | 
| 1098 | 
  | 
          { | 
| 1099 | 
  | 
            if (local_args_info.bo_given) | 
| 1229 | 
  | 
            args_info->staticProps_group_counter += 1; | 
| 1230 | 
  | 
            break; | 
| 1231 | 
  | 
          } | 
| 1232 | 
+ | 
          /* rho of R.  */ | 
| 1233 | 
+ | 
          else if (strcmp (long_options[option_index].name, "rho_r") == 0) | 
| 1234 | 
+ | 
          { | 
| 1235 | 
+ | 
            if (local_args_info.rho_r_given) | 
| 1236 | 
+ | 
              { | 
| 1237 | 
+ | 
                fprintf (stderr, "%s: `--rho_r' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1238 | 
+ | 
                goto failure; | 
| 1239 | 
+ | 
              } | 
| 1240 | 
+ | 
            if (args_info->rho_r_given && ! override) | 
| 1241 | 
+ | 
              continue; | 
| 1242 | 
+ | 
            local_args_info.rho_r_given = 1; | 
| 1243 | 
+ | 
            args_info->rho_r_given = 1; | 
| 1244 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1245 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1246 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1247 | 
+ | 
            break; | 
| 1248 | 
+ | 
          } | 
| 1249 | 
  | 
           | 
| 1250 | 
  | 
          break; | 
| 1251 | 
  | 
        case '?':       /* Invalid option.  */ |