| 43 |  | args_info->input_given = 0 ; | 
| 44 |  | args_info->output_given = 0 ; | 
| 45 |  | args_info->step_given = 0 ; | 
| 46 | < | args_info->nrbins_given = 0 ; | 
| 46 | > | args_info->nbins_given = 0 ; | 
| 47 | > | args_info->nbins_x_given = 0 ; | 
| 48 | > | args_info->nbins_y_given = 0 ; | 
| 49 |  | args_info->nanglebins_given = 0 ; | 
| 50 |  | args_info->length_given = 0 ; | 
| 51 | + | args_info->rcut_given = 0 ; | 
| 52 |  | args_info->zoffset_given = 0 ; | 
| 53 |  | args_info->sele1_given = 0 ; | 
| 54 |  | args_info->sele2_given = 0 ; | 
| 57 |  | args_info->molname_given = 0 ; | 
| 58 |  | args_info->begin_given = 0 ; | 
| 59 |  | args_info->end_given = 0 ; | 
| 60 | + | args_info->bo_given = 0 ; | 
| 61 |  | args_info->gofr_given = 0 ; | 
| 62 |  | args_info->r_theta_given = 0 ; | 
| 63 |  | args_info->r_omega_given = 0 ; | 
| 64 |  | args_info->theta_omega_given = 0 ; | 
| 65 |  | args_info->gxyz_given = 0 ; | 
| 66 |  | args_info->p2_given = 0 ; | 
| 67 | + | args_info->rp2_given = 0 ; | 
| 68 |  | args_info->scd_given = 0 ; | 
| 69 |  | args_info->density_given = 0 ; | 
| 70 |  | args_info->slab_density_given = 0 ; | 
| 71 | + | args_info->hxy_given = 0 ; | 
| 72 |  | args_info->staticProps_group_counter = 0 ; | 
| 73 |  | } | 
| 74 |  |  | 
| 81 |  | args_info->output_orig = NULL; | 
| 82 |  | args_info->step_arg = 1; | 
| 83 |  | args_info->step_orig = NULL; | 
| 84 | < | args_info->nrbins_arg = 100; | 
| 85 | < | args_info->nrbins_orig = NULL; | 
| 84 | > | args_info->nbins_arg = 100; | 
| 85 | > | args_info->nbins_orig = NULL; | 
| 86 | > | args_info->nbins_x_arg = 100; | 
| 87 | > | args_info->nbins_x_orig = NULL; | 
| 88 | > | args_info->nbins_y_arg = 100; | 
| 89 | > | args_info->nbins_y_orig = NULL; | 
| 90 |  | args_info->nanglebins_arg = 50; | 
| 91 |  | args_info->nanglebins_orig = NULL; | 
| 92 |  | args_info->length_orig = NULL; | 
| 93 | + | args_info->rcut_orig = NULL; | 
| 94 |  | args_info->zoffset_arg = 0; | 
| 95 |  | args_info->zoffset_orig = NULL; | 
| 96 |  | args_info->sele1_arg = NULL; | 
| 124 |  | printf("%s\n","  -i, --input=filename          input dump file"); | 
| 125 |  | printf("%s\n","  -o, --output=filename         output file name"); | 
| 126 |  | printf("%s\n","  -n, --step=INT                process every n frame  (default=`1')"); | 
| 127 | < | printf("%s\n","  -r, --nrbins=INT              number of bins for distance  (default=`100')"); | 
| 127 | > | printf("%s\n","  -b, --nbins=INT               number of bins (general purpose)  \n                                  (default=`100')"); | 
| 128 | > | printf("%s\n","  -x, --nbins_x=INT             number of bins in x axis  (default=`100')"); | 
| 129 | > | printf("%s\n","  -y, --nbins_y=INT             number of bins in y axis  (default=`100')"); | 
| 130 |  | printf("%s\n","  -a, --nanglebins=INT          number of bins for cos(angle)  (default=`50')"); | 
| 131 | < | printf("%s\n","  -l, --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)"); | 
| 131 | > | printf("%s\n","      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)"); | 
| 132 | > | printf("%s\n","  -c, --rcut=DOUBLE             cutoff radius (rcut)"); | 
| 133 |  | printf("%s\n","  -z, --zoffset=DOUBLE          Where to set the zero for the slab_density \n                                  calculation  (default=`0')"); | 
| 134 |  | printf("%s\n","      --sele1=selection script  select the first stuntdouble set"); | 
| 135 |  | printf("%s\n","      --sele2=selection script  select the second stuntdouble set"); | 
| 136 |  | printf("%s\n","      --sele3=selection script  select the third stuntdouble set"); | 
| 137 |  | printf("%s\n","      --refsele=selection script\n                                select reference (use and only use with --gxyz)"); | 
| 138 |  | printf("%s\n","      --molname=STRING          molecule name"); | 
| 139 | < | printf("%s\n","      --begin=INT               begin interanl index"); | 
| 139 | > | printf("%s\n","      --begin=INT               begin internal index"); | 
| 140 |  | printf("%s\n","      --end=INT                 end internal index"); | 
| 141 |  | printf("%s\n","\n Group: staticProps\n   an option of this group is required"); | 
| 142 | < | printf("%s\n","      --gofr                    g(r)"); | 
| 142 | > | printf("%s\n","      --bo                      bond order parameter (--rcut must be specified"); | 
| 143 | > | printf("%s\n","  -g, --gofr                    g(r)"); | 
| 144 |  | printf("%s\n","      --r_theta                 g(r, cos(theta))"); | 
| 145 |  | printf("%s\n","      --r_omega                 g(r, cos(omega))"); | 
| 146 |  | printf("%s\n","      --theta_omega             g(cos(theta), cos(omega))"); | 
| 147 |  | printf("%s\n","      --gxyz                    g(x, y, z)"); | 
| 148 | < | printf("%s\n","      --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)"); | 
| 149 | < | printf("%s\n","      --scd                     scd order parameter(either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)"); | 
| 150 | < | printf("%s\n","      --density                 density plot (--sele1 must be specified)"); | 
| 151 | < | printf("%s\n","      --slab_density            slab density (--sele1 must be specified)"); | 
| 148 | > | printf("%s\n","  -p, --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)"); | 
| 149 | > | printf("%s\n","      --rp2                     rp2 order parameter (--sele1 and --sele2 must \n                                  be specified)"); | 
| 150 | > | printf("%s\n","  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)"); | 
| 151 | > | printf("%s\n","  -d, --density                 density plot"); | 
| 152 | > | printf("%s\n","      --slab_density            slab density"); | 
| 153 | > | printf("%s\n","      --hxy                     hxy"); | 
| 154 |  |  | 
| 155 |  | } | 
| 156 |  |  | 
| 190 |  | free (args_info->step_orig); /* free previous argument */ | 
| 191 |  | args_info->step_orig = 0; | 
| 192 |  | } | 
| 193 | < | if (args_info->nrbins_orig) | 
| 193 | > | if (args_info->nbins_orig) | 
| 194 |  | { | 
| 195 | < | free (args_info->nrbins_orig); /* free previous argument */ | 
| 196 | < | args_info->nrbins_orig = 0; | 
| 195 | > | free (args_info->nbins_orig); /* free previous argument */ | 
| 196 | > | args_info->nbins_orig = 0; | 
| 197 | > | } | 
| 198 | > | if (args_info->nbins_x_orig) | 
| 199 | > | { | 
| 200 | > | free (args_info->nbins_x_orig); /* free previous argument */ | 
| 201 | > | args_info->nbins_x_orig = 0; | 
| 202 | > | } | 
| 203 | > | if (args_info->nbins_y_orig) | 
| 204 | > | { | 
| 205 | > | free (args_info->nbins_y_orig); /* free previous argument */ | 
| 206 | > | args_info->nbins_y_orig = 0; | 
| 207 |  | } | 
| 208 |  | if (args_info->nanglebins_orig) | 
| 209 |  | { | 
| 215 |  | free (args_info->length_orig); /* free previous argument */ | 
| 216 |  | args_info->length_orig = 0; | 
| 217 |  | } | 
| 218 | + | if (args_info->rcut_orig) | 
| 219 | + | { | 
| 220 | + | free (args_info->rcut_orig); /* free previous argument */ | 
| 221 | + | args_info->rcut_orig = 0; | 
| 222 | + | } | 
| 223 |  | if (args_info->zoffset_orig) | 
| 224 |  | { | 
| 225 |  | free (args_info->zoffset_orig); /* free previous argument */ | 
| 330 |  | fprintf(outfile, "%s\n", "step"); | 
| 331 |  | } | 
| 332 |  | } | 
| 333 | < | if (args_info->nrbins_given) { | 
| 334 | < | if (args_info->nrbins_orig) { | 
| 335 | < | fprintf(outfile, "%s=\"%s\"\n", "nrbins", args_info->nrbins_orig); | 
| 333 | > | if (args_info->nbins_given) { | 
| 334 | > | if (args_info->nbins_orig) { | 
| 335 | > | fprintf(outfile, "%s=\"%s\"\n", "nbins", args_info->nbins_orig); | 
| 336 |  | } else { | 
| 337 | < | fprintf(outfile, "%s\n", "nrbins"); | 
| 337 | > | fprintf(outfile, "%s\n", "nbins"); | 
| 338 | > | } | 
| 339 | > | } | 
| 340 | > | if (args_info->nbins_x_given) { | 
| 341 | > | if (args_info->nbins_x_orig) { | 
| 342 | > | fprintf(outfile, "%s=\"%s\"\n", "nbins_x", args_info->nbins_x_orig); | 
| 343 | > | } else { | 
| 344 | > | fprintf(outfile, "%s\n", "nbins_x"); | 
| 345 | > | } | 
| 346 | > | } | 
| 347 | > | if (args_info->nbins_y_given) { | 
| 348 | > | if (args_info->nbins_y_orig) { | 
| 349 | > | fprintf(outfile, "%s=\"%s\"\n", "nbins_y", args_info->nbins_y_orig); | 
| 350 | > | } else { | 
| 351 | > | fprintf(outfile, "%s\n", "nbins_y"); | 
| 352 |  | } | 
| 353 |  | } | 
| 354 |  | if (args_info->nanglebins_given) { | 
| 365 |  | fprintf(outfile, "%s\n", "length"); | 
| 366 |  | } | 
| 367 |  | } | 
| 368 | + | if (args_info->rcut_given) { | 
| 369 | + | if (args_info->rcut_orig) { | 
| 370 | + | fprintf(outfile, "%s=\"%s\"\n", "rcut", args_info->rcut_orig); | 
| 371 | + | } else { | 
| 372 | + | fprintf(outfile, "%s\n", "rcut"); | 
| 373 | + | } | 
| 374 | + | } | 
| 375 |  | if (args_info->zoffset_given) { | 
| 376 |  | if (args_info->zoffset_orig) { | 
| 377 |  | fprintf(outfile, "%s=\"%s\"\n", "zoffset", args_info->zoffset_orig); | 
| 428 |  | fprintf(outfile, "%s\n", "end"); | 
| 429 |  | } | 
| 430 |  | } | 
| 431 | + | if (args_info->bo_given) { | 
| 432 | + | fprintf(outfile, "%s\n", "bo"); | 
| 433 | + | } | 
| 434 |  | if (args_info->gofr_given) { | 
| 435 |  | fprintf(outfile, "%s\n", "gofr"); | 
| 436 |  | } | 
| 449 |  | if (args_info->p2_given) { | 
| 450 |  | fprintf(outfile, "%s\n", "p2"); | 
| 451 |  | } | 
| 452 | + | if (args_info->rp2_given) { | 
| 453 | + | fprintf(outfile, "%s\n", "rp2"); | 
| 454 | + | } | 
| 455 |  | if (args_info->scd_given) { | 
| 456 |  | fprintf(outfile, "%s\n", "scd"); | 
| 457 |  | } | 
| 461 |  | if (args_info->slab_density_given) { | 
| 462 |  | fprintf(outfile, "%s\n", "slab_density"); | 
| 463 |  | } | 
| 464 | + | if (args_info->hxy_given) { | 
| 465 | + | fprintf(outfile, "%s\n", "hxy"); | 
| 466 | + | } | 
| 467 |  |  | 
| 468 |  | fclose (outfile); | 
| 469 |  |  | 
| 503 |  | if (! args_info->staticProps_group_counter) | 
| 504 |  | return; | 
| 505 |  |  | 
| 506 | + | args_info->bo_given = 0 ; | 
| 507 |  | args_info->gofr_given = 0 ; | 
| 508 |  | args_info->r_theta_given = 0 ; | 
| 509 |  | args_info->r_omega_given = 0 ; | 
| 510 |  | args_info->theta_omega_given = 0 ; | 
| 511 |  | args_info->gxyz_given = 0 ; | 
| 512 |  | args_info->p2_given = 0 ; | 
| 513 | + | args_info->rp2_given = 0 ; | 
| 514 |  | args_info->scd_given = 0 ; | 
| 515 |  | args_info->density_given = 0 ; | 
| 516 |  | args_info->slab_density_given = 0 ; | 
| 517 | + | args_info->hxy_given = 0 ; | 
| 518 |  |  | 
| 519 |  | args_info->staticProps_group_counter = 0; | 
| 520 |  | } | 
| 607 |  | { "input",      1, NULL, 'i' }, | 
| 608 |  | { "output",     1, NULL, 'o' }, | 
| 609 |  | { "step",       1, NULL, 'n' }, | 
| 610 | < | { "nrbins",     1, NULL, 'r' }, | 
| 610 | > | { "nbins",      1, NULL, 'b' }, | 
| 611 | > | { "nbins_x",    1, NULL, 'x' }, | 
| 612 | > | { "nbins_y",    1, NULL, 'y' }, | 
| 613 |  | { "nanglebins", 1, NULL, 'a' }, | 
| 614 | < | { "length",     1, NULL, 'l' }, | 
| 614 | > | { "length",     1, NULL, 0 }, | 
| 615 | > | { "rcut",       1, NULL, 'c' }, | 
| 616 |  | { "zoffset",    1, NULL, 'z' }, | 
| 617 |  | { "sele1",      1, NULL, 0 }, | 
| 618 |  | { "sele2",      1, NULL, 0 }, | 
| 621 |  | { "molname",    1, NULL, 0 }, | 
| 622 |  | { "begin",      1, NULL, 0 }, | 
| 623 |  | { "end",        1, NULL, 0 }, | 
| 624 | < | { "gofr",       0, NULL, 0 }, | 
| 624 | > | { "bo", 0, NULL, 0 }, | 
| 625 | > | { "gofr",       0, NULL, 'g' }, | 
| 626 |  | { "r_theta",    0, NULL, 0 }, | 
| 627 |  | { "r_omega",    0, NULL, 0 }, | 
| 628 |  | { "theta_omega",        0, NULL, 0 }, | 
| 629 |  | { "gxyz",       0, NULL, 0 }, | 
| 630 | < | { "p2", 0, NULL, 0 }, | 
| 631 | < | { "scd",        0, NULL, 0 }, | 
| 632 | < | { "density",    0, NULL, 0 }, | 
| 630 | > | { "p2", 0, NULL, 'p' }, | 
| 631 | > | { "rp2",        0, NULL, 0 }, | 
| 632 | > | { "scd",        0, NULL, 's' }, | 
| 633 | > | { "density",    0, NULL, 'd' }, | 
| 634 |  | { "slab_density",       0, NULL, 0 }, | 
| 635 | + | { "hxy",        0, NULL, 0 }, | 
| 636 |  | { NULL, 0, NULL, 0 } | 
| 637 |  | }; | 
| 638 |  |  | 
| 639 |  | stop_char = 0; | 
| 640 | < | c = getopt_long (argc, argv, "hVi:o:n:r:a:l:z:", long_options, &option_index); | 
| 640 | > | c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index); | 
| 641 |  |  | 
| 642 |  | if (c == -1) break;       /* Exit from `while (1)' loop.  */ | 
| 643 |  |  | 
| 709 |  | args_info->step_orig = gengetopt_strdup (optarg); | 
| 710 |  | break; | 
| 711 |  |  | 
| 712 | < | case 'r':       /* number of bins for distance.  */ | 
| 713 | < | if (local_args_info.nrbins_given) | 
| 712 | > | case 'b':       /* number of bins (general purpose).  */ | 
| 713 | > | if (local_args_info.nbins_given) | 
| 714 |  | { | 
| 715 | < | fprintf (stderr, "%s: `--nrbins' (`-r') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 715 | > | fprintf (stderr, "%s: `--nbins' (`-b') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 716 |  | goto failure; | 
| 717 |  | } | 
| 718 | < | if (args_info->nrbins_given && ! override) | 
| 718 | > | if (args_info->nbins_given && ! override) | 
| 719 |  | continue; | 
| 720 | < | local_args_info.nrbins_given = 1; | 
| 721 | < | args_info->nrbins_given = 1; | 
| 722 | < | args_info->nrbins_arg = strtol (optarg, &stop_char, 0); | 
| 720 | > | local_args_info.nbins_given = 1; | 
| 721 | > | args_info->nbins_given = 1; | 
| 722 | > | args_info->nbins_arg = strtol (optarg, &stop_char, 0); | 
| 723 |  | if (!(stop_char && *stop_char == '\0')) { | 
| 724 |  | fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); | 
| 725 |  | goto failure; | 
| 726 |  | } | 
| 727 | < | if (args_info->nrbins_orig) | 
| 728 | < | free (args_info->nrbins_orig); /* free previous string */ | 
| 729 | < | args_info->nrbins_orig = gengetopt_strdup (optarg); | 
| 727 | > | if (args_info->nbins_orig) | 
| 728 | > | free (args_info->nbins_orig); /* free previous string */ | 
| 729 | > | args_info->nbins_orig = gengetopt_strdup (optarg); | 
| 730 |  | break; | 
| 731 |  |  | 
| 732 | + | case 'x':       /* number of bins in x axis.  */ | 
| 733 | + | if (local_args_info.nbins_x_given) | 
| 734 | + | { | 
| 735 | + | fprintf (stderr, "%s: `--nbins_x' (`-x') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 736 | + | goto failure; | 
| 737 | + | } | 
| 738 | + | if (args_info->nbins_x_given && ! override) | 
| 739 | + | continue; | 
| 740 | + | local_args_info.nbins_x_given = 1; | 
| 741 | + | args_info->nbins_x_given = 1; | 
| 742 | + | args_info->nbins_x_arg = strtol (optarg, &stop_char, 0); | 
| 743 | + | if (!(stop_char && *stop_char == '\0')) { | 
| 744 | + | fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); | 
| 745 | + | goto failure; | 
| 746 | + | } | 
| 747 | + | if (args_info->nbins_x_orig) | 
| 748 | + | free (args_info->nbins_x_orig); /* free previous string */ | 
| 749 | + | args_info->nbins_x_orig = gengetopt_strdup (optarg); | 
| 750 | + | break; | 
| 751 | + |  | 
| 752 | + | case 'y':       /* number of bins in y axis.  */ | 
| 753 | + | if (local_args_info.nbins_y_given) | 
| 754 | + | { | 
| 755 | + | fprintf (stderr, "%s: `--nbins_y' (`-y') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 756 | + | goto failure; | 
| 757 | + | } | 
| 758 | + | if (args_info->nbins_y_given && ! override) | 
| 759 | + | continue; | 
| 760 | + | local_args_info.nbins_y_given = 1; | 
| 761 | + | args_info->nbins_y_given = 1; | 
| 762 | + | args_info->nbins_y_arg = strtol (optarg, &stop_char, 0); | 
| 763 | + | if (!(stop_char && *stop_char == '\0')) { | 
| 764 | + | fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); | 
| 765 | + | goto failure; | 
| 766 | + | } | 
| 767 | + | if (args_info->nbins_y_orig) | 
| 768 | + | free (args_info->nbins_y_orig); /* free previous string */ | 
| 769 | + | args_info->nbins_y_orig = gengetopt_strdup (optarg); | 
| 770 | + | break; | 
| 771 | + |  | 
| 772 |  | case 'a':       /* number of bins for cos(angle).  */ | 
| 773 |  | if (local_args_info.nanglebins_given) | 
| 774 |  | { | 
| 789 |  | args_info->nanglebins_orig = gengetopt_strdup (optarg); | 
| 790 |  | break; | 
| 791 |  |  | 
| 792 | < | case 'l':       /* maximum length (Defaults to 1/2 smallest length of first frame).  */ | 
| 793 | < | if (local_args_info.length_given) | 
| 792 | > | case 'c':       /* cutoff radius (rcut).  */ | 
| 793 | > | if (local_args_info.rcut_given) | 
| 794 |  | { | 
| 795 | < | fprintf (stderr, "%s: `--length' (`-l') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 795 | > | fprintf (stderr, "%s: `--rcut' (`-c') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 796 |  | goto failure; | 
| 797 |  | } | 
| 798 | < | if (args_info->length_given && ! override) | 
| 798 | > | if (args_info->rcut_given && ! override) | 
| 799 |  | continue; | 
| 800 | < | local_args_info.length_given = 1; | 
| 801 | < | args_info->length_given = 1; | 
| 802 | < | args_info->length_arg = strtod (optarg, &stop_char); | 
| 800 | > | local_args_info.rcut_given = 1; | 
| 801 | > | args_info->rcut_given = 1; | 
| 802 | > | args_info->rcut_arg = strtod (optarg, &stop_char); | 
| 803 |  | if (!(stop_char && *stop_char == '\0')) { | 
| 804 |  | fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); | 
| 805 |  | goto failure; | 
| 806 |  | } | 
| 807 | < | if (args_info->length_orig) | 
| 808 | < | free (args_info->length_orig); /* free previous string */ | 
| 809 | < | args_info->length_orig = gengetopt_strdup (optarg); | 
| 807 | > | if (args_info->rcut_orig) | 
| 808 | > | free (args_info->rcut_orig); /* free previous string */ | 
| 809 | > | args_info->rcut_orig = gengetopt_strdup (optarg); | 
| 810 |  | break; | 
| 811 |  |  | 
| 812 |  | case 'z':       /* Where to set the zero for the slab_density calculation.  */ | 
| 829 |  | args_info->zoffset_orig = gengetopt_strdup (optarg); | 
| 830 |  | break; | 
| 831 |  |  | 
| 832 | + | case 'g':       /* g(r).  */ | 
| 833 | + | if (local_args_info.gofr_given) | 
| 834 | + | { | 
| 835 | + | fprintf (stderr, "%s: `--gofr' (`-g') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 836 | + | goto failure; | 
| 837 | + | } | 
| 838 | + | if (args_info->gofr_given && ! override) | 
| 839 | + | continue; | 
| 840 | + | local_args_info.gofr_given = 1; | 
| 841 | + | args_info->gofr_given = 1; | 
| 842 | + | if (args_info->staticProps_group_counter && override) | 
| 843 | + | reset_group_staticProps (args_info); | 
| 844 | + | args_info->staticProps_group_counter += 1; | 
| 845 | + | break; | 
| 846 |  |  | 
| 847 | + | case 'p':       /* p2 order parameter (--sele1 and --sele2 must be specified).  */ | 
| 848 | + | if (local_args_info.p2_given) | 
| 849 | + | { | 
| 850 | + | fprintf (stderr, "%s: `--p2' (`-p') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 851 | + | goto failure; | 
| 852 | + | } | 
| 853 | + | if (args_info->p2_given && ! override) | 
| 854 | + | continue; | 
| 855 | + | local_args_info.p2_given = 1; | 
| 856 | + | args_info->p2_given = 1; | 
| 857 | + | if (args_info->staticProps_group_counter && override) | 
| 858 | + | reset_group_staticProps (args_info); | 
| 859 | + | args_info->staticProps_group_counter += 1; | 
| 860 | + | break; | 
| 861 | + |  | 
| 862 | + | case 's':       /* scd order parameter (either --sele1, --sele2, --sele3 are specified or --molname, --begin, --end are specified).  */ | 
| 863 | + | if (local_args_info.scd_given) | 
| 864 | + | { | 
| 865 | + | fprintf (stderr, "%s: `--scd' (`-s') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 866 | + | goto failure; | 
| 867 | + | } | 
| 868 | + | if (args_info->scd_given && ! override) | 
| 869 | + | continue; | 
| 870 | + | local_args_info.scd_given = 1; | 
| 871 | + | args_info->scd_given = 1; | 
| 872 | + | if (args_info->staticProps_group_counter && override) | 
| 873 | + | reset_group_staticProps (args_info); | 
| 874 | + | args_info->staticProps_group_counter += 1; | 
| 875 | + | break; | 
| 876 | + |  | 
| 877 | + | case 'd':       /* density plot.  */ | 
| 878 | + | if (local_args_info.density_given) | 
| 879 | + | { | 
| 880 | + | fprintf (stderr, "%s: `--density' (`-d') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 881 | + | goto failure; | 
| 882 | + | } | 
| 883 | + | if (args_info->density_given && ! override) | 
| 884 | + | continue; | 
| 885 | + | local_args_info.density_given = 1; | 
| 886 | + | args_info->density_given = 1; | 
| 887 | + | if (args_info->staticProps_group_counter && override) | 
| 888 | + | reset_group_staticProps (args_info); | 
| 889 | + | args_info->staticProps_group_counter += 1; | 
| 890 | + | break; | 
| 891 | + |  | 
| 892 | + |  | 
| 893 |  | case 0: /* Long option with no short option */ | 
| 894 | + | /* maximum length (Defaults to 1/2 smallest length of first frame).  */ | 
| 895 | + | if (strcmp (long_options[option_index].name, "length") == 0) | 
| 896 | + | { | 
| 897 | + | if (local_args_info.length_given) | 
| 898 | + | { | 
| 899 | + | fprintf (stderr, "%s: `--length' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 900 | + | goto failure; | 
| 901 | + | } | 
| 902 | + | if (args_info->length_given && ! override) | 
| 903 | + | continue; | 
| 904 | + | local_args_info.length_given = 1; | 
| 905 | + | args_info->length_given = 1; | 
| 906 | + | args_info->length_arg = strtod (optarg, &stop_char); | 
| 907 | + | if (!(stop_char && *stop_char == '\0')) { | 
| 908 | + | fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); | 
| 909 | + | goto failure; | 
| 910 | + | } | 
| 911 | + | if (args_info->length_orig) | 
| 912 | + | free (args_info->length_orig); /* free previous string */ | 
| 913 | + | args_info->length_orig = gengetopt_strdup (optarg); | 
| 914 | + | } | 
| 915 |  | /* select the first stuntdouble set.  */ | 
| 916 | < | if (strcmp (long_options[option_index].name, "sele1") == 0) | 
| 916 | > | else if (strcmp (long_options[option_index].name, "sele1") == 0) | 
| 917 |  | { | 
| 918 |  | if (local_args_info.sele1_given) | 
| 919 |  | { | 
| 1007 |  | free (args_info->molname_orig); /* free previous string */ | 
| 1008 |  | args_info->molname_orig = gengetopt_strdup (optarg); | 
| 1009 |  | } | 
| 1010 | < | /* begin interanl index.  */ | 
| 1010 | > | /* begin internal index.  */ | 
| 1011 |  | else if (strcmp (long_options[option_index].name, "begin") == 0) | 
| 1012 |  | { | 
| 1013 |  | if (local_args_info.begin_given) | 
| 1049 |  | free (args_info->end_orig); /* free previous string */ | 
| 1050 |  | args_info->end_orig = gengetopt_strdup (optarg); | 
| 1051 |  | } | 
| 1052 | < | /* g(r).  */ | 
| 1053 | < | else if (strcmp (long_options[option_index].name, "gofr") == 0) | 
| 1052 | > | /* bond order parameter (--rcut must be specified.  */ | 
| 1053 | > | else if (strcmp (long_options[option_index].name, "bo") == 0) | 
| 1054 |  | { | 
| 1055 | < | if (local_args_info.gofr_given) | 
| 1055 | > | if (local_args_info.bo_given) | 
| 1056 |  | { | 
| 1057 | < | fprintf (stderr, "%s: `--gofr' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1057 | > | fprintf (stderr, "%s: `--bo' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1058 |  | goto failure; | 
| 1059 |  | } | 
| 1060 | < | if (args_info->gofr_given && ! override) | 
| 1060 | > | if (args_info->bo_given && ! override) | 
| 1061 |  | continue; | 
| 1062 | < | local_args_info.gofr_given = 1; | 
| 1063 | < | args_info->gofr_given = 1; | 
| 1062 | > | local_args_info.bo_given = 1; | 
| 1063 | > | args_info->bo_given = 1; | 
| 1064 |  | if (args_info->staticProps_group_counter && override) | 
| 1065 |  | reset_group_staticProps (args_info); | 
| 1066 |  | args_info->staticProps_group_counter += 1; | 
| 1134 |  | args_info->staticProps_group_counter += 1; | 
| 1135 |  | break; | 
| 1136 |  | } | 
| 1137 | < | /* p2 order parameter (--sele1 and --sele2 must be specified).  */ | 
| 1138 | < | else if (strcmp (long_options[option_index].name, "p2") == 0) | 
| 1137 | > | /* rp2 order parameter (--sele1 and --sele2 must be specified).  */ | 
| 1138 | > | else if (strcmp (long_options[option_index].name, "rp2") == 0) | 
| 1139 |  | { | 
| 1140 | < | if (local_args_info.p2_given) | 
| 1140 | > | if (local_args_info.rp2_given) | 
| 1141 |  | { | 
| 1142 | < | fprintf (stderr, "%s: `--p2' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1142 | > | fprintf (stderr, "%s: `--rp2' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1143 |  | goto failure; | 
| 1144 |  | } | 
| 1145 | < | if (args_info->p2_given && ! override) | 
| 1145 | > | if (args_info->rp2_given && ! override) | 
| 1146 |  | continue; | 
| 1147 | < | local_args_info.p2_given = 1; | 
| 1148 | < | args_info->p2_given = 1; | 
| 1147 | > | local_args_info.rp2_given = 1; | 
| 1148 | > | args_info->rp2_given = 1; | 
| 1149 |  | if (args_info->staticProps_group_counter && override) | 
| 1150 |  | reset_group_staticProps (args_info); | 
| 1151 |  | args_info->staticProps_group_counter += 1; | 
| 1152 |  | break; | 
| 1153 |  | } | 
| 1154 | < | /* scd order parameter(either --sele1, --sele2, --sele3 are specified or --molname, --begin, --end are specified).  */ | 
| 1155 | < | else if (strcmp (long_options[option_index].name, "scd") == 0) | 
| 1154 | > | /* slab density.  */ | 
| 1155 | > | else if (strcmp (long_options[option_index].name, "slab_density") == 0) | 
| 1156 |  | { | 
| 1157 | < | if (local_args_info.scd_given) | 
| 1157 | > | if (local_args_info.slab_density_given) | 
| 1158 |  | { | 
| 1159 | < | fprintf (stderr, "%s: `--scd' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1159 | > | fprintf (stderr, "%s: `--slab_density' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1160 |  | goto failure; | 
| 1161 |  | } | 
| 1162 | < | if (args_info->scd_given && ! override) | 
| 1162 | > | if (args_info->slab_density_given && ! override) | 
| 1163 |  | continue; | 
| 1164 | < | local_args_info.scd_given = 1; | 
| 1165 | < | args_info->scd_given = 1; | 
| 1164 | > | local_args_info.slab_density_given = 1; | 
| 1165 | > | args_info->slab_density_given = 1; | 
| 1166 |  | if (args_info->staticProps_group_counter && override) | 
| 1167 |  | reset_group_staticProps (args_info); | 
| 1168 |  | args_info->staticProps_group_counter += 1; | 
| 1169 |  | break; | 
| 1170 |  | } | 
| 1171 | < | /* density plot (--sele1 must be specified).  */ | 
| 1172 | < | else if (strcmp (long_options[option_index].name, "density") == 0) | 
| 1171 | > | /* hxy.  */ | 
| 1172 | > | else if (strcmp (long_options[option_index].name, "hxy") == 0) | 
| 1173 |  | { | 
| 1174 | < | if (local_args_info.density_given) | 
| 1174 | > | if (local_args_info.hxy_given) | 
| 1175 |  | { | 
| 1176 | < | fprintf (stderr, "%s: `--density' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1176 | > | fprintf (stderr, "%s: `--hxy' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1177 |  | goto failure; | 
| 1178 |  | } | 
| 1179 | < | if (args_info->density_given && ! override) | 
| 1179 | > | if (args_info->hxy_given && ! override) | 
| 1180 |  | continue; | 
| 1181 | < | local_args_info.density_given = 1; | 
| 1182 | < | args_info->density_given = 1; | 
| 1181 | > | local_args_info.hxy_given = 1; | 
| 1182 | > | args_info->hxy_given = 1; | 
| 1183 |  | if (args_info->staticProps_group_counter && override) | 
| 1184 |  | reset_group_staticProps (args_info); | 
| 1185 |  | args_info->staticProps_group_counter += 1; | 
| 1186 |  | break; | 
| 1187 |  | } | 
| 996 | – | /* slab density (--sele1 must be specified).  */ | 
| 997 | – | else if (strcmp (long_options[option_index].name, "slab_density") == 0) | 
| 998 | – | { | 
| 999 | – | if (local_args_info.slab_density_given) | 
| 1000 | – | { | 
| 1001 | – | fprintf (stderr, "%s: `--slab_density' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); | 
| 1002 | – | goto failure; | 
| 1003 | – | } | 
| 1004 | – | if (args_info->slab_density_given && ! override) | 
| 1005 | – | continue; | 
| 1006 | – | local_args_info.slab_density_given = 1; | 
| 1007 | – | args_info->slab_density_given = 1; | 
| 1008 | – | if (args_info->staticProps_group_counter && override) | 
| 1009 | – | reset_group_staticProps (args_info); | 
| 1010 | – | args_info->staticProps_group_counter += 1; | 
| 1011 | – | break; | 
| 1012 | – | } | 
| 1188 |  |  | 
| 1189 |  | break; | 
| 1190 |  | case '?':       /* Invalid option.  */ |