| 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: | 
| 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 | 
  | 
 | 
| 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 | 
  | 
 | 
| 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 must be specified"); | 
| 147 | 
  | 
  printf("%s\n","  -g, --gofr                    g(r)"); | 
| 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 | 
  | 
 | 
| 289 | 
  | 
    { | 
| 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); | 
| 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 | 
  | 
  } | 
| 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); | 
| 489 | 
  | 
 | 
| 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 | 
  | 
 | 
| 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 | 
  | 
 | 
| 1072 | 
  | 
              free (args_info->end_orig); /* free previous string */ | 
| 1073 | 
  | 
            args_info->end_orig = gengetopt_strdup (optarg); | 
| 1074 | 
  | 
          } | 
| 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 | 
  | 
          { | 
| 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.  */ |