| 44 |
|
args_info->output_given = 0 ; |
| 45 |
|
args_info->step_given = 0 ; |
| 46 |
|
args_info->nrbins_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->LegendreL_given = 0 ; |
| 52 |
+ |
args_info->rcut_given = 0 ; |
| 53 |
|
args_info->zoffset_given = 0 ; |
| 54 |
|
args_info->sele1_given = 0 ; |
| 55 |
|
args_info->sele2_given = 0 ; |
| 58 |
|
args_info->molname_given = 0 ; |
| 59 |
|
args_info->begin_given = 0 ; |
| 60 |
|
args_info->end_given = 0 ; |
| 61 |
+ |
args_info->bo_given = 0 ; |
| 62 |
|
args_info->gofr_given = 0 ; |
| 63 |
|
args_info->r_theta_given = 0 ; |
| 64 |
|
args_info->r_omega_given = 0 ; |
| 65 |
|
args_info->theta_omega_given = 0 ; |
| 66 |
|
args_info->gxyz_given = 0 ; |
| 67 |
|
args_info->p2_given = 0 ; |
| 68 |
+ |
args_info->rp2_given = 0 ; |
| 69 |
|
args_info->scd_given = 0 ; |
| 70 |
|
args_info->density_given = 0 ; |
| 71 |
|
args_info->slab_density_given = 0 ; |
| 72 |
+ |
args_info->hxy_given = 0 ; |
| 73 |
|
args_info->staticProps_group_counter = 0 ; |
| 74 |
|
} |
| 75 |
|
|
| 84 |
|
args_info->step_orig = NULL; |
| 85 |
|
args_info->nrbins_arg = 100; |
| 86 |
|
args_info->nrbins_orig = NULL; |
| 87 |
+ |
args_info->nbins_x_arg = 100; |
| 88 |
+ |
args_info->nbins_x_orig = NULL; |
| 89 |
+ |
args_info->nbins_y_arg = 100; |
| 90 |
+ |
args_info->nbins_y_orig = NULL; |
| 91 |
|
args_info->nanglebins_arg = 50; |
| 92 |
|
args_info->nanglebins_orig = NULL; |
| 93 |
|
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; |
| 98 |
|
args_info->sele1_arg = NULL; |
| 127 |
|
printf("%s\n"," -o, --output=filename output file name"); |
| 128 |
|
printf("%s\n"," -n, --step=INT process every n frame (default=`1')"); |
| 129 |
|
printf("%s\n"," -r, --nrbins=INT number of bins for distance (default=`100')"); |
| 130 |
+ |
printf("%s\n"," -x, --nbins_x=INT number of bins in x axis (default=`100')"); |
| 131 |
+ |
printf("%s\n"," -y, --nbins_y=INT number of bins in y axis (default=`100')"); |
| 132 |
|
printf("%s\n"," -a, --nanglebins=INT number of bins for cos(angle) (default=`50')"); |
| 133 |
< |
printf("%s\n"," -l, --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)"); |
| 133 |
> |
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"); |
| 138 |
|
printf("%s\n"," --sele2=selection script select the second stuntdouble set"); |
| 139 |
|
printf("%s\n"," --sele3=selection script select the third stuntdouble set"); |
| 140 |
|
printf("%s\n"," --refsele=selection script\n select reference (use and only use with --gxyz)"); |
| 141 |
|
printf("%s\n"," --molname=STRING molecule name"); |
| 142 |
< |
printf("%s\n"," --begin=INT begin interanl index"); |
| 142 |
> |
printf("%s\n"," --begin=INT begin internal index"); |
| 143 |
|
printf("%s\n"," --end=INT end internal index"); |
| 144 |
|
printf("%s\n","\n Group: staticProps\n an option of this group is required"); |
| 145 |
< |
printf("%s\n"," --gofr g(r)"); |
| 145 |
> |
printf("%s\n"," -b, --bo bond order parameter (--rcut and --LegendreL \n must be specified"); |
| 146 |
> |
printf("%s\n"," -g, --gofr g(r)"); |
| 147 |
|
printf("%s\n"," --r_theta g(r, cos(theta))"); |
| 148 |
|
printf("%s\n"," --r_omega g(r, cos(omega))"); |
| 149 |
|
printf("%s\n"," --theta_omega g(cos(theta), cos(omega))"); |
| 150 |
|
printf("%s\n"," --gxyz g(x, y, z)"); |
| 151 |
< |
printf("%s\n"," --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)"); |
| 152 |
< |
printf("%s\n"," --scd scd order parameter(either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)"); |
| 153 |
< |
printf("%s\n"," --density density plot (--sele1 must be specified)"); |
| 154 |
< |
printf("%s\n"," --slab_density slab density (--sele1 must be specified)"); |
| 151 |
> |
printf("%s\n"," -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)"); |
| 152 |
> |
printf("%s\n"," --rp2 rp2 order parameter (--sele1 and --sele2 must \n be specified)"); |
| 153 |
> |
printf("%s\n"," -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)"); |
| 154 |
> |
printf("%s\n"," -d, --density density plot"); |
| 155 |
> |
printf("%s\n"," --slab_density slab density"); |
| 156 |
> |
printf("%s\n"," --hxy hxy"); |
| 157 |
|
|
| 158 |
|
} |
| 159 |
|
|
| 198 |
|
free (args_info->nrbins_orig); /* free previous argument */ |
| 199 |
|
args_info->nrbins_orig = 0; |
| 200 |
|
} |
| 201 |
+ |
if (args_info->nbins_x_orig) |
| 202 |
+ |
{ |
| 203 |
+ |
free (args_info->nbins_x_orig); /* free previous argument */ |
| 204 |
+ |
args_info->nbins_x_orig = 0; |
| 205 |
+ |
} |
| 206 |
+ |
if (args_info->nbins_y_orig) |
| 207 |
+ |
{ |
| 208 |
+ |
free (args_info->nbins_y_orig); /* free previous argument */ |
| 209 |
+ |
args_info->nbins_y_orig = 0; |
| 210 |
+ |
} |
| 211 |
|
if (args_info->nanglebins_orig) |
| 212 |
|
{ |
| 213 |
|
free (args_info->nanglebins_orig); /* free previous argument */ |
| 217 |
|
{ |
| 218 |
|
free (args_info->length_orig); /* free previous argument */ |
| 219 |
|
args_info->length_orig = 0; |
| 220 |
+ |
} |
| 221 |
+ |
if (args_info->LegendreL_orig) |
| 222 |
+ |
{ |
| 223 |
+ |
free (args_info->LegendreL_orig); /* free previous argument */ |
| 224 |
+ |
args_info->LegendreL_orig = 0; |
| 225 |
+ |
} |
| 226 |
+ |
if (args_info->rcut_orig) |
| 227 |
+ |
{ |
| 228 |
+ |
free (args_info->rcut_orig); /* free previous argument */ |
| 229 |
+ |
args_info->rcut_orig = 0; |
| 230 |
|
} |
| 231 |
|
if (args_info->zoffset_orig) |
| 232 |
|
{ |
| 345 |
|
fprintf(outfile, "%s\n", "nrbins"); |
| 346 |
|
} |
| 347 |
|
} |
| 348 |
+ |
if (args_info->nbins_x_given) { |
| 349 |
+ |
if (args_info->nbins_x_orig) { |
| 350 |
+ |
fprintf(outfile, "%s=\"%s\"\n", "nbins_x", args_info->nbins_x_orig); |
| 351 |
+ |
} else { |
| 352 |
+ |
fprintf(outfile, "%s\n", "nbins_x"); |
| 353 |
+ |
} |
| 354 |
+ |
} |
| 355 |
+ |
if (args_info->nbins_y_given) { |
| 356 |
+ |
if (args_info->nbins_y_orig) { |
| 357 |
+ |
fprintf(outfile, "%s=\"%s\"\n", "nbins_y", args_info->nbins_y_orig); |
| 358 |
+ |
} else { |
| 359 |
+ |
fprintf(outfile, "%s\n", "nbins_y"); |
| 360 |
+ |
} |
| 361 |
+ |
} |
| 362 |
|
if (args_info->nanglebins_given) { |
| 363 |
|
if (args_info->nanglebins_orig) { |
| 364 |
|
fprintf(outfile, "%s=\"%s\"\n", "nanglebins", args_info->nanglebins_orig); |
| 373 |
|
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"); |
| 381 |
+ |
} |
| 382 |
+ |
} |
| 383 |
+ |
if (args_info->rcut_given) { |
| 384 |
+ |
if (args_info->rcut_orig) { |
| 385 |
+ |
fprintf(outfile, "%s=\"%s\"\n", "rcut", args_info->rcut_orig); |
| 386 |
+ |
} else { |
| 387 |
+ |
fprintf(outfile, "%s\n", "rcut"); |
| 388 |
+ |
} |
| 389 |
+ |
} |
| 390 |
|
if (args_info->zoffset_given) { |
| 391 |
|
if (args_info->zoffset_orig) { |
| 392 |
|
fprintf(outfile, "%s=\"%s\"\n", "zoffset", args_info->zoffset_orig); |
| 443 |
|
fprintf(outfile, "%s\n", "end"); |
| 444 |
|
} |
| 445 |
|
} |
| 446 |
+ |
if (args_info->bo_given) { |
| 447 |
+ |
fprintf(outfile, "%s\n", "bo"); |
| 448 |
+ |
} |
| 449 |
|
if (args_info->gofr_given) { |
| 450 |
|
fprintf(outfile, "%s\n", "gofr"); |
| 451 |
|
} |
| 464 |
|
if (args_info->p2_given) { |
| 465 |
|
fprintf(outfile, "%s\n", "p2"); |
| 466 |
|
} |
| 467 |
+ |
if (args_info->rp2_given) { |
| 468 |
+ |
fprintf(outfile, "%s\n", "rp2"); |
| 469 |
+ |
} |
| 470 |
|
if (args_info->scd_given) { |
| 471 |
|
fprintf(outfile, "%s\n", "scd"); |
| 472 |
|
} |
| 476 |
|
if (args_info->slab_density_given) { |
| 477 |
|
fprintf(outfile, "%s\n", "slab_density"); |
| 478 |
|
} |
| 479 |
+ |
if (args_info->hxy_given) { |
| 480 |
+ |
fprintf(outfile, "%s\n", "hxy"); |
| 481 |
+ |
} |
| 482 |
|
|
| 483 |
|
fclose (outfile); |
| 484 |
|
|
| 518 |
|
if (! args_info->staticProps_group_counter) |
| 519 |
|
return; |
| 520 |
|
|
| 521 |
+ |
args_info->bo_given = 0 ; |
| 522 |
|
args_info->gofr_given = 0 ; |
| 523 |
|
args_info->r_theta_given = 0 ; |
| 524 |
|
args_info->r_omega_given = 0 ; |
| 525 |
|
args_info->theta_omega_given = 0 ; |
| 526 |
|
args_info->gxyz_given = 0 ; |
| 527 |
|
args_info->p2_given = 0 ; |
| 528 |
+ |
args_info->rp2_given = 0 ; |
| 529 |
|
args_info->scd_given = 0 ; |
| 530 |
|
args_info->density_given = 0 ; |
| 531 |
|
args_info->slab_density_given = 0 ; |
| 532 |
+ |
args_info->hxy_given = 0 ; |
| 533 |
|
|
| 534 |
|
args_info->staticProps_group_counter = 0; |
| 535 |
|
} |
| 623 |
|
{ "output", 1, NULL, 'o' }, |
| 624 |
|
{ "step", 1, NULL, 'n' }, |
| 625 |
|
{ "nrbins", 1, NULL, 'r' }, |
| 626 |
+ |
{ "nbins_x", 1, NULL, 'x' }, |
| 627 |
+ |
{ "nbins_y", 1, NULL, 'y' }, |
| 628 |
|
{ "nanglebins", 1, NULL, 'a' }, |
| 629 |
< |
{ "length", 1, NULL, 'l' }, |
| 629 |
> |
{ "length", 1, NULL, 0 }, |
| 630 |
> |
{ "LegendreL", 1, NULL, 'l' }, |
| 631 |
> |
{ "rcut", 1, NULL, 'c' }, |
| 632 |
|
{ "zoffset", 1, NULL, 'z' }, |
| 633 |
|
{ "sele1", 1, NULL, 0 }, |
| 634 |
|
{ "sele2", 1, NULL, 0 }, |
| 637 |
|
{ "molname", 1, NULL, 0 }, |
| 638 |
|
{ "begin", 1, NULL, 0 }, |
| 639 |
|
{ "end", 1, NULL, 0 }, |
| 640 |
< |
{ "gofr", 0, NULL, 0 }, |
| 640 |
> |
{ "bo", 0, NULL, 'b' }, |
| 641 |
> |
{ "gofr", 0, NULL, 'g' }, |
| 642 |
|
{ "r_theta", 0, NULL, 0 }, |
| 643 |
|
{ "r_omega", 0, NULL, 0 }, |
| 644 |
|
{ "theta_omega", 0, NULL, 0 }, |
| 645 |
|
{ "gxyz", 0, NULL, 0 }, |
| 646 |
< |
{ "p2", 0, NULL, 0 }, |
| 647 |
< |
{ "scd", 0, NULL, 0 }, |
| 648 |
< |
{ "density", 0, NULL, 0 }, |
| 646 |
> |
{ "p2", 0, NULL, 'p' }, |
| 647 |
> |
{ "rp2", 0, NULL, 0 }, |
| 648 |
> |
{ "scd", 0, NULL, 's' }, |
| 649 |
> |
{ "density", 0, NULL, 'd' }, |
| 650 |
|
{ "slab_density", 0, NULL, 0 }, |
| 651 |
+ |
{ "hxy", 0, NULL, 0 }, |
| 652 |
|
{ NULL, 0, NULL, 0 } |
| 653 |
|
}; |
| 654 |
|
|
| 655 |
|
stop_char = 0; |
| 656 |
< |
c = getopt_long (argc, argv, "hVi:o:n:r:a:l:z:", long_options, &option_index); |
| 656 |
> |
c = getopt_long (argc, argv, "hVi:o:n:r:x:y:a:l:c:z:bgpsd", long_options, &option_index); |
| 657 |
|
|
| 658 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
| 659 |
|
|
| 745 |
|
args_info->nrbins_orig = gengetopt_strdup (optarg); |
| 746 |
|
break; |
| 747 |
|
|
| 748 |
+ |
case 'x': /* number of bins in x axis. */ |
| 749 |
+ |
if (local_args_info.nbins_x_given) |
| 750 |
+ |
{ |
| 751 |
+ |
fprintf (stderr, "%s: `--nbins_x' (`-x') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 752 |
+ |
goto failure; |
| 753 |
+ |
} |
| 754 |
+ |
if (args_info->nbins_x_given && ! override) |
| 755 |
+ |
continue; |
| 756 |
+ |
local_args_info.nbins_x_given = 1; |
| 757 |
+ |
args_info->nbins_x_given = 1; |
| 758 |
+ |
args_info->nbins_x_arg = strtol (optarg, &stop_char, 0); |
| 759 |
+ |
if (!(stop_char && *stop_char == '\0')) { |
| 760 |
+ |
fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); |
| 761 |
+ |
goto failure; |
| 762 |
+ |
} |
| 763 |
+ |
if (args_info->nbins_x_orig) |
| 764 |
+ |
free (args_info->nbins_x_orig); /* free previous string */ |
| 765 |
+ |
args_info->nbins_x_orig = gengetopt_strdup (optarg); |
| 766 |
+ |
break; |
| 767 |
+ |
|
| 768 |
+ |
case 'y': /* number of bins in y axis. */ |
| 769 |
+ |
if (local_args_info.nbins_y_given) |
| 770 |
+ |
{ |
| 771 |
+ |
fprintf (stderr, "%s: `--nbins_y' (`-y') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 772 |
+ |
goto failure; |
| 773 |
+ |
} |
| 774 |
+ |
if (args_info->nbins_y_given && ! override) |
| 775 |
+ |
continue; |
| 776 |
+ |
local_args_info.nbins_y_given = 1; |
| 777 |
+ |
args_info->nbins_y_given = 1; |
| 778 |
+ |
args_info->nbins_y_arg = strtol (optarg, &stop_char, 0); |
| 779 |
+ |
if (!(stop_char && *stop_char == '\0')) { |
| 780 |
+ |
fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); |
| 781 |
+ |
goto failure; |
| 782 |
+ |
} |
| 783 |
+ |
if (args_info->nbins_y_orig) |
| 784 |
+ |
free (args_info->nbins_y_orig); /* free previous string */ |
| 785 |
+ |
args_info->nbins_y_orig = gengetopt_strdup (optarg); |
| 786 |
+ |
break; |
| 787 |
+ |
|
| 788 |
|
case 'a': /* number of bins for cos(angle). */ |
| 789 |
|
if (local_args_info.nanglebins_given) |
| 790 |
|
{ |
| 805 |
|
args_info->nanglebins_orig = gengetopt_strdup (optarg); |
| 806 |
|
break; |
| 807 |
|
|
| 808 |
< |
case 'l': /* maximum length (Defaults to 1/2 smallest length of first frame). */ |
| 809 |
< |
if (local_args_info.length_given) |
| 808 |
> |
case 'l': /* Order of Legendre Polynomial (used for Bond Order calculations). */ |
| 809 |
> |
if (local_args_info.LegendreL_given) |
| 810 |
|
{ |
| 811 |
< |
fprintf (stderr, "%s: `--length' (`-l') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 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->length_given && ! override) |
| 814 |
> |
if (args_info->LegendreL_given && ! override) |
| 815 |
|
continue; |
| 816 |
< |
local_args_info.length_given = 1; |
| 817 |
< |
args_info->length_given = 1; |
| 818 |
< |
args_info->length_arg = strtod (optarg, &stop_char); |
| 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->length_orig) |
| 824 |
< |
free (args_info->length_orig); /* free previous string */ |
| 825 |
< |
args_info->length_orig = gengetopt_strdup (optarg); |
| 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 |
|
|
| 828 |
+ |
case 'c': /* cutoff radius (rcut). */ |
| 829 |
+ |
if (local_args_info.rcut_given) |
| 830 |
+ |
{ |
| 831 |
+ |
fprintf (stderr, "%s: `--rcut' (`-c') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 832 |
+ |
goto failure; |
| 833 |
+ |
} |
| 834 |
+ |
if (args_info->rcut_given && ! override) |
| 835 |
+ |
continue; |
| 836 |
+ |
local_args_info.rcut_given = 1; |
| 837 |
+ |
args_info->rcut_given = 1; |
| 838 |
+ |
args_info->rcut_arg = strtod (optarg, &stop_char); |
| 839 |
+ |
if (!(stop_char && *stop_char == '\0')) { |
| 840 |
+ |
fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); |
| 841 |
+ |
goto failure; |
| 842 |
+ |
} |
| 843 |
+ |
if (args_info->rcut_orig) |
| 844 |
+ |
free (args_info->rcut_orig); /* free previous string */ |
| 845 |
+ |
args_info->rcut_orig = gengetopt_strdup (optarg); |
| 846 |
+ |
break; |
| 847 |
+ |
|
| 848 |
|
case 'z': /* Where to set the zero for the slab_density calculation. */ |
| 849 |
|
if (local_args_info.zoffset_given) |
| 850 |
|
{ |
| 865 |
|
args_info->zoffset_orig = gengetopt_strdup (optarg); |
| 866 |
|
break; |
| 867 |
|
|
| 868 |
+ |
case 'b': /* bond order parameter (--rcut and --LegendreL must be specified. */ |
| 869 |
+ |
if (local_args_info.bo_given) |
| 870 |
+ |
{ |
| 871 |
+ |
fprintf (stderr, "%s: `--bo' (`-b') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 872 |
+ |
goto failure; |
| 873 |
+ |
} |
| 874 |
+ |
if (args_info->bo_given && ! override) |
| 875 |
+ |
continue; |
| 876 |
+ |
local_args_info.bo_given = 1; |
| 877 |
+ |
args_info->bo_given = 1; |
| 878 |
+ |
if (args_info->staticProps_group_counter && override) |
| 879 |
+ |
reset_group_staticProps (args_info); |
| 880 |
+ |
args_info->staticProps_group_counter += 1; |
| 881 |
+ |
break; |
| 882 |
|
|
| 883 |
+ |
case 'g': /* g(r). */ |
| 884 |
+ |
if (local_args_info.gofr_given) |
| 885 |
+ |
{ |
| 886 |
+ |
fprintf (stderr, "%s: `--gofr' (`-g') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 887 |
+ |
goto failure; |
| 888 |
+ |
} |
| 889 |
+ |
if (args_info->gofr_given && ! override) |
| 890 |
+ |
continue; |
| 891 |
+ |
local_args_info.gofr_given = 1; |
| 892 |
+ |
args_info->gofr_given = 1; |
| 893 |
+ |
if (args_info->staticProps_group_counter && override) |
| 894 |
+ |
reset_group_staticProps (args_info); |
| 895 |
+ |
args_info->staticProps_group_counter += 1; |
| 896 |
+ |
break; |
| 897 |
+ |
|
| 898 |
+ |
case 'p': /* p2 order parameter (--sele1 and --sele2 must be specified). */ |
| 899 |
+ |
if (local_args_info.p2_given) |
| 900 |
+ |
{ |
| 901 |
+ |
fprintf (stderr, "%s: `--p2' (`-p') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 902 |
+ |
goto failure; |
| 903 |
+ |
} |
| 904 |
+ |
if (args_info->p2_given && ! override) |
| 905 |
+ |
continue; |
| 906 |
+ |
local_args_info.p2_given = 1; |
| 907 |
+ |
args_info->p2_given = 1; |
| 908 |
+ |
if (args_info->staticProps_group_counter && override) |
| 909 |
+ |
reset_group_staticProps (args_info); |
| 910 |
+ |
args_info->staticProps_group_counter += 1; |
| 911 |
+ |
break; |
| 912 |
+ |
|
| 913 |
+ |
case 's': /* scd order parameter (either --sele1, --sele2, --sele3 are specified or --molname, --begin, --end are specified). */ |
| 914 |
+ |
if (local_args_info.scd_given) |
| 915 |
+ |
{ |
| 916 |
+ |
fprintf (stderr, "%s: `--scd' (`-s') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 917 |
+ |
goto failure; |
| 918 |
+ |
} |
| 919 |
+ |
if (args_info->scd_given && ! override) |
| 920 |
+ |
continue; |
| 921 |
+ |
local_args_info.scd_given = 1; |
| 922 |
+ |
args_info->scd_given = 1; |
| 923 |
+ |
if (args_info->staticProps_group_counter && override) |
| 924 |
+ |
reset_group_staticProps (args_info); |
| 925 |
+ |
args_info->staticProps_group_counter += 1; |
| 926 |
+ |
break; |
| 927 |
+ |
|
| 928 |
+ |
case 'd': /* density plot. */ |
| 929 |
+ |
if (local_args_info.density_given) |
| 930 |
+ |
{ |
| 931 |
+ |
fprintf (stderr, "%s: `--density' (`-d') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 932 |
+ |
goto failure; |
| 933 |
+ |
} |
| 934 |
+ |
if (args_info->density_given && ! override) |
| 935 |
+ |
continue; |
| 936 |
+ |
local_args_info.density_given = 1; |
| 937 |
+ |
args_info->density_given = 1; |
| 938 |
+ |
if (args_info->staticProps_group_counter && override) |
| 939 |
+ |
reset_group_staticProps (args_info); |
| 940 |
+ |
args_info->staticProps_group_counter += 1; |
| 941 |
+ |
break; |
| 942 |
+ |
|
| 943 |
+ |
|
| 944 |
|
case 0: /* Long option with no short option */ |
| 945 |
+ |
/* maximum length (Defaults to 1/2 smallest length of first frame). */ |
| 946 |
+ |
if (strcmp (long_options[option_index].name, "length") == 0) |
| 947 |
+ |
{ |
| 948 |
+ |
if (local_args_info.length_given) |
| 949 |
+ |
{ |
| 950 |
+ |
fprintf (stderr, "%s: `--length' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 951 |
+ |
goto failure; |
| 952 |
+ |
} |
| 953 |
+ |
if (args_info->length_given && ! override) |
| 954 |
+ |
continue; |
| 955 |
+ |
local_args_info.length_given = 1; |
| 956 |
+ |
args_info->length_given = 1; |
| 957 |
+ |
args_info->length_arg = strtod (optarg, &stop_char); |
| 958 |
+ |
if (!(stop_char && *stop_char == '\0')) { |
| 959 |
+ |
fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); |
| 960 |
+ |
goto failure; |
| 961 |
+ |
} |
| 962 |
+ |
if (args_info->length_orig) |
| 963 |
+ |
free (args_info->length_orig); /* free previous string */ |
| 964 |
+ |
args_info->length_orig = gengetopt_strdup (optarg); |
| 965 |
+ |
} |
| 966 |
|
/* select the first stuntdouble set. */ |
| 967 |
< |
if (strcmp (long_options[option_index].name, "sele1") == 0) |
| 967 |
> |
else if (strcmp (long_options[option_index].name, "sele1") == 0) |
| 968 |
|
{ |
| 969 |
|
if (local_args_info.sele1_given) |
| 970 |
|
{ |
| 1058 |
|
free (args_info->molname_orig); /* free previous string */ |
| 1059 |
|
args_info->molname_orig = gengetopt_strdup (optarg); |
| 1060 |
|
} |
| 1061 |
< |
/* begin interanl index. */ |
| 1061 |
> |
/* begin internal index. */ |
| 1062 |
|
else if (strcmp (long_options[option_index].name, "begin") == 0) |
| 1063 |
|
{ |
| 1064 |
|
if (local_args_info.begin_given) |
| 1100 |
|
free (args_info->end_orig); /* free previous string */ |
| 1101 |
|
args_info->end_orig = gengetopt_strdup (optarg); |
| 1102 |
|
} |
| 860 |
– |
/* g(r). */ |
| 861 |
– |
else if (strcmp (long_options[option_index].name, "gofr") == 0) |
| 862 |
– |
{ |
| 863 |
– |
if (local_args_info.gofr_given) |
| 864 |
– |
{ |
| 865 |
– |
fprintf (stderr, "%s: `--gofr' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 866 |
– |
goto failure; |
| 867 |
– |
} |
| 868 |
– |
if (args_info->gofr_given && ! override) |
| 869 |
– |
continue; |
| 870 |
– |
local_args_info.gofr_given = 1; |
| 871 |
– |
args_info->gofr_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 |
– |
} |
| 1103 |
|
/* g(r, cos(theta)). */ |
| 1104 |
|
else if (strcmp (long_options[option_index].name, "r_theta") == 0) |
| 1105 |
|
{ |
| 1168 |
|
args_info->staticProps_group_counter += 1; |
| 1169 |
|
break; |
| 1170 |
|
} |
| 1171 |
< |
/* p2 order parameter (--sele1 and --sele2 must be specified). */ |
| 1172 |
< |
else if (strcmp (long_options[option_index].name, "p2") == 0) |
| 1171 |
> |
/* rp2 order parameter (--sele1 and --sele2 must be specified). */ |
| 1172 |
> |
else if (strcmp (long_options[option_index].name, "rp2") == 0) |
| 1173 |
|
{ |
| 1174 |
< |
if (local_args_info.p2_given) |
| 1174 |
> |
if (local_args_info.rp2_given) |
| 1175 |
|
{ |
| 1176 |
< |
fprintf (stderr, "%s: `--p2' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1176 |
> |
fprintf (stderr, "%s: `--rp2' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1177 |
|
goto failure; |
| 1178 |
|
} |
| 1179 |
< |
if (args_info->p2_given && ! override) |
| 1179 |
> |
if (args_info->rp2_given && ! override) |
| 1180 |
|
continue; |
| 1181 |
< |
local_args_info.p2_given = 1; |
| 1182 |
< |
args_info->p2_given = 1; |
| 957 |
< |
if (args_info->staticProps_group_counter && override) |
| 958 |
< |
reset_group_staticProps (args_info); |
| 959 |
< |
args_info->staticProps_group_counter += 1; |
| 960 |
< |
break; |
| 961 |
< |
} |
| 962 |
< |
/* scd order parameter(either --sele1, --sele2, --sele3 are specified or --molname, --begin, --end are specified). */ |
| 963 |
< |
else if (strcmp (long_options[option_index].name, "scd") == 0) |
| 964 |
< |
{ |
| 965 |
< |
if (local_args_info.scd_given) |
| 966 |
< |
{ |
| 967 |
< |
fprintf (stderr, "%s: `--scd' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 968 |
< |
goto failure; |
| 969 |
< |
} |
| 970 |
< |
if (args_info->scd_given && ! override) |
| 971 |
< |
continue; |
| 972 |
< |
local_args_info.scd_given = 1; |
| 973 |
< |
args_info->scd_given = 1; |
| 1181 |
> |
local_args_info.rp2_given = 1; |
| 1182 |
> |
args_info->rp2_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 |
|
} |
| 1188 |
< |
/* density plot (--sele1 must be specified). */ |
| 1189 |
< |
else if (strcmp (long_options[option_index].name, "density") == 0) |
| 1188 |
> |
/* slab density. */ |
| 1189 |
> |
else if (strcmp (long_options[option_index].name, "slab_density") == 0) |
| 1190 |
|
{ |
| 1191 |
< |
if (local_args_info.density_given) |
| 1191 |
> |
if (local_args_info.slab_density_given) |
| 1192 |
|
{ |
| 1193 |
< |
fprintf (stderr, "%s: `--density' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1193 |
> |
fprintf (stderr, "%s: `--slab_density' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1194 |
|
goto failure; |
| 1195 |
|
} |
| 1196 |
< |
if (args_info->density_given && ! override) |
| 1196 |
> |
if (args_info->slab_density_given && ! override) |
| 1197 |
|
continue; |
| 1198 |
< |
local_args_info.density_given = 1; |
| 1199 |
< |
args_info->density_given = 1; |
| 1198 |
> |
local_args_info.slab_density_given = 1; |
| 1199 |
> |
args_info->slab_density_given = 1; |
| 1200 |
|
if (args_info->staticProps_group_counter && override) |
| 1201 |
|
reset_group_staticProps (args_info); |
| 1202 |
|
args_info->staticProps_group_counter += 1; |
| 1203 |
|
break; |
| 1204 |
|
} |
| 1205 |
< |
/* slab density (--sele1 must be specified). */ |
| 1206 |
< |
else if (strcmp (long_options[option_index].name, "slab_density") == 0) |
| 1205 |
> |
/* hxy. */ |
| 1206 |
> |
else if (strcmp (long_options[option_index].name, "hxy") == 0) |
| 1207 |
|
{ |
| 1208 |
< |
if (local_args_info.slab_density_given) |
| 1208 |
> |
if (local_args_info.hxy_given) |
| 1209 |
|
{ |
| 1210 |
< |
fprintf (stderr, "%s: `--slab_density' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1210 |
> |
fprintf (stderr, "%s: `--hxy' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1211 |
|
goto failure; |
| 1212 |
|
} |
| 1213 |
< |
if (args_info->slab_density_given && ! override) |
| 1213 |
> |
if (args_info->hxy_given && ! override) |
| 1214 |
|
continue; |
| 1215 |
< |
local_args_info.slab_density_given = 1; |
| 1216 |
< |
args_info->slab_density_given = 1; |
| 1215 |
> |
local_args_info.hxy_given = 1; |
| 1216 |
> |
args_info->hxy_given = 1; |
| 1217 |
|
if (args_info->staticProps_group_counter && override) |
| 1218 |
|
reset_group_staticProps (args_info); |
| 1219 |
|
args_info->staticProps_group_counter += 1; |