--- trunk/src/applications/staticProps/StaticPropsCmd.c 2010/03/22 19:21:22 1413 +++ trunk/src/applications/staticProps/StaticPropsCmd.cpp 2012/09/07 18:13:55 1795 @@ -1,7 +1,7 @@ /* - File autogenerated by gengetopt version 2.22 + File autogenerated by gengetopt version 2.22.4 generated with the following command: - gengetopt -F StaticPropsCmd -u + gengetopt -i StaticProps.ggo -c cpp -F StaticPropsCmd -u The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: @@ -17,8 +17,16 @@ #include #include -#include "getopt.h" +#ifndef FIX_UNUSED +#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ +#endif +#ifdef WIN32 +#include "utils/wingetopt.h" +#else +#include +#endif + #include "StaticPropsCmd.h" const char *gengetopt_args_info_purpose = ""; @@ -36,9 +44,12 @@ const char *gengetopt_args_info_help[] = { " -b, --nbins=INT number of bins (general purpose) \n (default=`100')", " -x, --nbins_x=INT number of bins in x axis (default=`100')", " -y, --nbins_y=INT number of bins in y axis (default=`100')", + " --nbins_z=INT number of bins in z axis (default=`100')", " -a, --nanglebins=INT number of bins for cos(angle) (default=`50')", - " --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", " -c, --rcut=DOUBLE cutoff radius (rcut)", + " --dz=DOUBLE slab width (dz)", + " --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", + " --zlength=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", " -z, --zoffset=DOUBLE Where to set the zero for the slab_density \n calculation (default=`0')", " --sele1=selection script select the first stuntdouble set", " --sele2=selection script select the second stuntdouble set", @@ -53,13 +64,16 @@ const char *gengetopt_args_info_help[] = { " --bo bond order parameter (--rcut must be specified)", " --bor bond order parameter as a function of radius \n (--rcut must be specified)", " --bad N(theta) bond angle density within (--rcut must \n be specified)", + " --count count of molecules matching selection criteria \n (and associated statistics)", " -g, --gofr g(r)", " --gofz g(z)", " --r_theta g(r, cos(theta))", " --r_omega g(r, cos(omega))", + " --r_z g(r, z)", " --theta_omega g(cos(theta), cos(omega))", " --gxyz g(x, y, z)", - " -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)", + " --twodgofr 2D g(r) (Slab width --dz must be specified)", + " -p, --p2 p2 order parameter (--sele1 must be specified, \n --sele2 is optional)", " --rp2 rp2 order parameter (--sele1 and --sele2 must \n be specified)", " -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)", " -d, --density density plot", @@ -67,7 +81,11 @@ const char *gengetopt_args_info_help[] = { " --p_angle p(cos(theta))", " --hxy hxy", " --rho_r rho of R", + " --angle_r angle of R", " --hullvol hull volume of nanoparticle", + " --rodlength length of nanorod", + " -Q, --tet_param tetrahedrality order parameter", + " --tet_param_z tetrahedrality order parameter by zbin(--sele1 \n must be specified)", 0 }; @@ -83,7 +101,7 @@ static int void clear_args (struct gengetopt_args_info *args_info); static int -cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, +cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error); static int @@ -103,9 +121,12 @@ void clear_given (struct gengetopt_args_info *args_inf args_info->nbins_given = 0 ; args_info->nbins_x_given = 0 ; args_info->nbins_y_given = 0 ; + args_info->nbins_z_given = 0 ; args_info->nanglebins_given = 0 ; - args_info->length_given = 0 ; args_info->rcut_given = 0 ; + args_info->dz_given = 0 ; + args_info->length_given = 0 ; + args_info->zlength_given = 0 ; args_info->zoffset_given = 0 ; args_info->sele1_given = 0 ; args_info->sele2_given = 0 ; @@ -119,12 +140,15 @@ void clear_given (struct gengetopt_args_info *args_inf args_info->bo_given = 0 ; args_info->bor_given = 0 ; args_info->bad_given = 0 ; + args_info->count_given = 0 ; args_info->gofr_given = 0 ; args_info->gofz_given = 0 ; args_info->r_theta_given = 0 ; args_info->r_omega_given = 0 ; + args_info->r_z_given = 0 ; args_info->theta_omega_given = 0 ; args_info->gxyz_given = 0 ; + args_info->twodgofr_given = 0 ; args_info->p2_given = 0 ; args_info->rp2_given = 0 ; args_info->scd_given = 0 ; @@ -133,13 +157,18 @@ void clear_given (struct gengetopt_args_info *args_inf args_info->p_angle_given = 0 ; args_info->hxy_given = 0 ; args_info->rho_r_given = 0 ; + args_info->angle_r_given = 0 ; args_info->hullvol_given = 0 ; + args_info->rodlength_given = 0 ; + args_info->tet_param_given = 0 ; + args_info->tet_param_z_given = 0 ; args_info->staticProps_group_counter = 0 ; } static void clear_args (struct gengetopt_args_info *args_info) { + FIX_UNUSED (args_info); args_info->input_arg = NULL; args_info->input_orig = NULL; args_info->output_arg = NULL; @@ -152,10 +181,14 @@ void clear_args (struct gengetopt_args_info *args_info args_info->nbins_x_orig = NULL; args_info->nbins_y_arg = 100; args_info->nbins_y_orig = NULL; + args_info->nbins_z_arg = 100; + args_info->nbins_z_orig = NULL; args_info->nanglebins_arg = 50; args_info->nanglebins_orig = NULL; - args_info->length_orig = NULL; args_info->rcut_orig = NULL; + args_info->dz_orig = NULL; + args_info->length_orig = NULL; + args_info->zlength_orig = NULL; args_info->zoffset_arg = 0; args_info->zoffset_orig = NULL; args_info->sele1_arg = NULL; @@ -189,44 +222,56 @@ void init_args_info(struct gengetopt_args_info *args_i args_info->nbins_help = gengetopt_args_info_help[5] ; args_info->nbins_x_help = gengetopt_args_info_help[6] ; args_info->nbins_y_help = gengetopt_args_info_help[7] ; - args_info->nanglebins_help = gengetopt_args_info_help[8] ; - args_info->length_help = gengetopt_args_info_help[9] ; + args_info->nbins_z_help = gengetopt_args_info_help[8] ; + args_info->nanglebins_help = gengetopt_args_info_help[9] ; args_info->rcut_help = gengetopt_args_info_help[10] ; - args_info->zoffset_help = gengetopt_args_info_help[11] ; - args_info->sele1_help = gengetopt_args_info_help[12] ; - args_info->sele2_help = gengetopt_args_info_help[13] ; - args_info->sele3_help = gengetopt_args_info_help[14] ; - args_info->refsele_help = gengetopt_args_info_help[15] ; - args_info->comsele_help = gengetopt_args_info_help[16] ; - args_info->molname_help = gengetopt_args_info_help[17] ; - args_info->begin_help = gengetopt_args_info_help[18] ; - args_info->end_help = gengetopt_args_info_help[19] ; - args_info->radius_help = gengetopt_args_info_help[20] ; - args_info->bo_help = gengetopt_args_info_help[22] ; - args_info->bor_help = gengetopt_args_info_help[23] ; - args_info->bad_help = gengetopt_args_info_help[24] ; - args_info->gofr_help = gengetopt_args_info_help[25] ; - args_info->gofz_help = gengetopt_args_info_help[26] ; - args_info->r_theta_help = gengetopt_args_info_help[27] ; - args_info->r_omega_help = gengetopt_args_info_help[28] ; - args_info->theta_omega_help = gengetopt_args_info_help[29] ; - args_info->gxyz_help = gengetopt_args_info_help[30] ; - args_info->p2_help = gengetopt_args_info_help[31] ; - args_info->rp2_help = gengetopt_args_info_help[32] ; - args_info->scd_help = gengetopt_args_info_help[33] ; - args_info->density_help = gengetopt_args_info_help[34] ; - args_info->slab_density_help = gengetopt_args_info_help[35] ; - args_info->p_angle_help = gengetopt_args_info_help[36] ; - args_info->hxy_help = gengetopt_args_info_help[37] ; - args_info->rho_r_help = gengetopt_args_info_help[38] ; - args_info->hullvol_help = gengetopt_args_info_help[39] ; + args_info->dz_help = gengetopt_args_info_help[11] ; + args_info->length_help = gengetopt_args_info_help[12] ; + args_info->zlength_help = gengetopt_args_info_help[13] ; + args_info->zoffset_help = gengetopt_args_info_help[14] ; + args_info->sele1_help = gengetopt_args_info_help[15] ; + args_info->sele2_help = gengetopt_args_info_help[16] ; + args_info->sele3_help = gengetopt_args_info_help[17] ; + args_info->refsele_help = gengetopt_args_info_help[18] ; + args_info->comsele_help = gengetopt_args_info_help[19] ; + args_info->molname_help = gengetopt_args_info_help[20] ; + args_info->begin_help = gengetopt_args_info_help[21] ; + args_info->end_help = gengetopt_args_info_help[22] ; + args_info->radius_help = gengetopt_args_info_help[23] ; + args_info->bo_help = gengetopt_args_info_help[25] ; + args_info->bor_help = gengetopt_args_info_help[26] ; + args_info->bad_help = gengetopt_args_info_help[27] ; + args_info->count_help = gengetopt_args_info_help[28] ; + args_info->gofr_help = gengetopt_args_info_help[29] ; + args_info->gofz_help = gengetopt_args_info_help[30] ; + args_info->r_theta_help = gengetopt_args_info_help[31] ; + args_info->r_omega_help = gengetopt_args_info_help[32] ; + args_info->r_z_help = gengetopt_args_info_help[33] ; + args_info->theta_omega_help = gengetopt_args_info_help[34] ; + args_info->gxyz_help = gengetopt_args_info_help[35] ; + args_info->twodgofr_help = gengetopt_args_info_help[36] ; + args_info->p2_help = gengetopt_args_info_help[37] ; + args_info->rp2_help = gengetopt_args_info_help[38] ; + args_info->scd_help = gengetopt_args_info_help[39] ; + args_info->density_help = gengetopt_args_info_help[40] ; + args_info->slab_density_help = gengetopt_args_info_help[41] ; + args_info->p_angle_help = gengetopt_args_info_help[42] ; + args_info->hxy_help = gengetopt_args_info_help[43] ; + args_info->rho_r_help = gengetopt_args_info_help[44] ; + args_info->angle_r_help = gengetopt_args_info_help[45] ; + args_info->hullvol_help = gengetopt_args_info_help[46] ; + args_info->rodlength_help = gengetopt_args_info_help[47] ; + args_info->tet_param_help = gengetopt_args_info_help[48] ; + args_info->tet_param_z_help = gengetopt_args_info_help[49] ; } void cmdline_parser_print_version (void) { - printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); + printf ("%s %s\n", + (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), + CMDLINE_PARSER_VERSION); } static void print_help_common(void) { @@ -241,7 +286,7 @@ static void print_help_common(void) { printf("\n"); if (strlen(gengetopt_args_info_description) > 0) - printf("%s\n", gengetopt_args_info_description); + printf("%s\n\n", gengetopt_args_info_description); } void @@ -260,7 +305,7 @@ cmdline_parser_init (struct gengetopt_args_info *args_ clear_args (args_info); init_args_info (args_info); - args_info->inputs = NULL; + args_info->inputs = 0; args_info->inputs_num = 0; } @@ -309,9 +354,12 @@ cmdline_parser_release (struct gengetopt_args_info *ar free_string_field (&(args_info->nbins_orig)); free_string_field (&(args_info->nbins_x_orig)); free_string_field (&(args_info->nbins_y_orig)); + free_string_field (&(args_info->nbins_z_orig)); free_string_field (&(args_info->nanglebins_orig)); - free_string_field (&(args_info->length_orig)); free_string_field (&(args_info->rcut_orig)); + free_string_field (&(args_info->dz_orig)); + free_string_field (&(args_info->length_orig)); + free_string_field (&(args_info->zlength_orig)); free_string_field (&(args_info->zoffset_orig)); free_string_field (&(args_info->sele1_arg)); free_string_field (&(args_info->sele1_orig)); @@ -341,8 +389,9 @@ static void static void -write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[]) +write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) { + FIX_UNUSED (values); if (arg) { fprintf(outfile, "%s=\"%s\"\n", opt, arg); } else { @@ -378,12 +427,18 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "nbins_x", args_info->nbins_x_orig, 0); if (args_info->nbins_y_given) write_into_file(outfile, "nbins_y", args_info->nbins_y_orig, 0); + if (args_info->nbins_z_given) + write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0); if (args_info->nanglebins_given) write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0); - if (args_info->length_given) - write_into_file(outfile, "length", args_info->length_orig, 0); if (args_info->rcut_given) write_into_file(outfile, "rcut", args_info->rcut_orig, 0); + if (args_info->dz_given) + write_into_file(outfile, "dz", args_info->dz_orig, 0); + if (args_info->length_given) + write_into_file(outfile, "length", args_info->length_orig, 0); + if (args_info->zlength_given) + write_into_file(outfile, "zlength", args_info->zlength_orig, 0); if (args_info->zoffset_given) write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0); if (args_info->sele1_given) @@ -410,6 +465,8 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "bor", 0, 0 ); if (args_info->bad_given) write_into_file(outfile, "bad", 0, 0 ); + if (args_info->count_given) + write_into_file(outfile, "count", 0, 0 ); if (args_info->gofr_given) write_into_file(outfile, "gofr", 0, 0 ); if (args_info->gofz_given) @@ -418,10 +475,14 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "r_theta", 0, 0 ); if (args_info->r_omega_given) write_into_file(outfile, "r_omega", 0, 0 ); + if (args_info->r_z_given) + write_into_file(outfile, "r_z", 0, 0 ); if (args_info->theta_omega_given) write_into_file(outfile, "theta_omega", 0, 0 ); if (args_info->gxyz_given) write_into_file(outfile, "gxyz", 0, 0 ); + if (args_info->twodgofr_given) + write_into_file(outfile, "twodgofr", 0, 0 ); if (args_info->p2_given) write_into_file(outfile, "p2", 0, 0 ); if (args_info->rp2_given) @@ -438,8 +499,16 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "hxy", 0, 0 ); if (args_info->rho_r_given) write_into_file(outfile, "rho_r", 0, 0 ); + if (args_info->angle_r_given) + write_into_file(outfile, "angle_r", 0, 0 ); if (args_info->hullvol_given) write_into_file(outfile, "hullvol", 0, 0 ); + if (args_info->rodlength_given) + write_into_file(outfile, "rodlength", 0, 0 ); + if (args_info->tet_param_given) + write_into_file(outfile, "tet_param", 0, 0 ); + if (args_info->tet_param_z_given) + write_into_file(outfile, "tet_param_z", 0, 0 ); i = EXIT_SUCCESS; @@ -476,7 +545,7 @@ gengetopt_strdup (const char *s) char * gengetopt_strdup (const char *s) { - char *result = NULL; + char *result = 0; if (!s) return result; @@ -496,12 +565,15 @@ reset_group_staticProps(struct gengetopt_args_info *ar args_info->bo_given = 0 ; args_info->bor_given = 0 ; args_info->bad_given = 0 ; + args_info->count_given = 0 ; args_info->gofr_given = 0 ; args_info->gofz_given = 0 ; args_info->r_theta_given = 0 ; args_info->r_omega_given = 0 ; + args_info->r_z_given = 0 ; args_info->theta_omega_given = 0 ; args_info->gxyz_given = 0 ; + args_info->twodgofr_given = 0 ; args_info->p2_given = 0 ; args_info->rp2_given = 0 ; args_info->scd_given = 0 ; @@ -510,23 +582,27 @@ reset_group_staticProps(struct gengetopt_args_info *ar args_info->p_angle_given = 0 ; args_info->hxy_given = 0 ; args_info->rho_r_given = 0 ; + args_info->angle_r_given = 0 ; args_info->hullvol_given = 0 ; + args_info->rodlength_given = 0 ; + args_info->tet_param_given = 0 ; + args_info->tet_param_z_given = 0 ; args_info->staticProps_group_counter = 0; } int -cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) +cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) { return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); } int -cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info, +cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) { int result; - result = cmdline_parser_internal (argc, argv, args_info, params, NULL); + result = cmdline_parser_internal (argc, argv, args_info, params, 0); if (result == EXIT_FAILURE) { @@ -538,7 +614,7 @@ int } int -cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) +cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) { int result; struct cmdline_parser_params params; @@ -549,7 +625,7 @@ cmdline_parser2 (int argc, char * const *argv, struct params.check_ambiguity = 0; params.print_errors = 1; - result = cmdline_parser_internal (argc, argv, args_info, ¶ms, NULL); + result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0); if (result == EXIT_FAILURE) { @@ -565,7 +641,7 @@ cmdline_parser_required (struct gengetopt_args_info *a { int result = EXIT_SUCCESS; - if (cmdline_parser_required2(args_info, prog_name, NULL) > 0) + if (cmdline_parser_required2(args_info, prog_name, 0) > 0) result = EXIT_FAILURE; if (result == EXIT_FAILURE) @@ -581,6 +657,7 @@ cmdline_parser_required2 (struct gengetopt_args_info * cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error) { int error = 0; + FIX_UNUSED (additional_error); /* checks for required options */ if (! args_info->input_given) @@ -591,7 +668,7 @@ cmdline_parser_required2 (struct gengetopt_args_info * if (args_info->staticProps_group_counter == 0) { - 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 : "")); + 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 : "")); error = 1; } @@ -625,7 +702,8 @@ int update_arg(void *field, char **orig_field, static int update_arg(void *field, char **orig_field, unsigned int *field_given, unsigned int *prev_given, - char *value, char *possible_values[], const char *default_value, + char *value, const char *possible_values[], + const char *default_value, cmdline_parser_arg_type arg_type, int check_ambiguity, int override, int no_free, int multiple_option, @@ -636,6 +714,7 @@ int update_arg(void *field, char **orig_field, const char *val = value; int found; char **string_field; + FIX_UNUSED (field); stop_char = 0; found = 0; @@ -653,6 +732,7 @@ int update_arg(void *field, char **orig_field, return 1; /* failure */ } + FIX_UNUSED (default_value); if (field_given && *field_given && ! override) return 0; @@ -716,7 +796,8 @@ int int -cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, +cmdline_parser_internal ( + int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error) { int c; /* Character of the parsed option. */ @@ -759,9 +840,12 @@ cmdline_parser_internal (int argc, char * const *argv, { "nbins", 1, NULL, 'b' }, { "nbins_x", 1, NULL, 'x' }, { "nbins_y", 1, NULL, 'y' }, + { "nbins_z", 1, NULL, 0 }, { "nanglebins", 1, NULL, 'a' }, - { "length", 1, NULL, 0 }, { "rcut", 1, NULL, 'c' }, + { "dz", 1, NULL, 0 }, + { "length", 1, NULL, 0 }, + { "zlength", 1, NULL, 0 }, { "zoffset", 1, NULL, 'z' }, { "sele1", 1, NULL, 0 }, { "sele2", 1, NULL, 0 }, @@ -775,12 +859,15 @@ cmdline_parser_internal (int argc, char * const *argv, { "bo", 0, NULL, 0 }, { "bor", 0, NULL, 0 }, { "bad", 0, NULL, 0 }, + { "count", 0, NULL, 0 }, { "gofr", 0, NULL, 'g' }, { "gofz", 0, NULL, 0 }, { "r_theta", 0, NULL, 0 }, { "r_omega", 0, NULL, 0 }, + { "r_z", 0, NULL, 0 }, { "theta_omega", 0, NULL, 0 }, { "gxyz", 0, NULL, 0 }, + { "twodgofr", 0, NULL, 0 }, { "p2", 0, NULL, 'p' }, { "rp2", 0, NULL, 0 }, { "scd", 0, NULL, 's' }, @@ -789,11 +876,15 @@ cmdline_parser_internal (int argc, char * const *argv, { "p_angle", 0, NULL, 0 }, { "hxy", 0, NULL, 0 }, { "rho_r", 0, NULL, 0 }, + { "angle_r", 0, NULL, 0 }, { "hullvol", 0, NULL, 0 }, - { NULL, 0, NULL, 0 } + { "rodlength", 0, NULL, 0 }, + { "tet_param", 0, NULL, 'Q' }, + { "tet_param_z", 0, NULL, 0 }, + { 0, 0, 0, 0 } }; - c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index); + c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ @@ -932,7 +1023,7 @@ cmdline_parser_internal (int argc, char * const *argv, goto failure; break; - case 'p': /* p2 order parameter (--sele1 and --sele2 must be specified). */ + case 'p': /* p2 order parameter (--sele1 must be specified, --sele2 is optional). */ if (args_info->staticProps_group_counter && override) reset_group_staticProps (args_info); @@ -977,10 +1068,53 @@ cmdline_parser_internal (int argc, char * const *argv, goto failure; break; + case 'Q': /* tetrahedrality order parameter. */ + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->tet_param_given), + &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "tet_param", 'Q', + additional_error)) + goto failure; + + break; case 0: /* Long option with no short option */ + /* number of bins in z axis. */ + if (strcmp (long_options[option_index].name, "nbins_z") == 0) + { + + + if (update_arg( (void *)&(args_info->nbins_z_arg), + &(args_info->nbins_z_orig), &(args_info->nbins_z_given), + &(local_args_info.nbins_z_given), optarg, 0, "100", ARG_INT, + check_ambiguity, override, 0, 0, + "nbins_z", '-', + additional_error)) + goto failure; + + } + /* slab width (dz). */ + else if (strcmp (long_options[option_index].name, "dz") == 0) + { + + + if (update_arg( (void *)&(args_info->dz_arg), + &(args_info->dz_orig), &(args_info->dz_given), + &(local_args_info.dz_given), optarg, 0, 0, ARG_DOUBLE, + check_ambiguity, override, 0, 0, + "dz", '-', + additional_error)) + goto failure; + + } /* maximum length (Defaults to 1/2 smallest length of first frame). */ - if (strcmp (long_options[option_index].name, "length") == 0) + else if (strcmp (long_options[option_index].name, "length") == 0) { @@ -993,6 +1127,20 @@ cmdline_parser_internal (int argc, char * const *argv, goto failure; } + /* maximum length (Defaults to 1/2 smallest length of first frame). */ + else if (strcmp (long_options[option_index].name, "zlength") == 0) + { + + + if (update_arg( (void *)&(args_info->zlength_arg), + &(args_info->zlength_orig), &(args_info->zlength_given), + &(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE, + check_ambiguity, override, 0, 0, + "zlength", '-', + additional_error)) + goto failure; + + } /* select the first stuntdouble set. */ else if (strcmp (long_options[option_index].name, "sele1") == 0) { @@ -1166,6 +1314,23 @@ cmdline_parser_internal (int argc, char * const *argv, &(local_args_info.bad_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "bad", '-', + additional_error)) + goto failure; + + } + /* count of molecules matching selection criteria (and associated statistics). */ + else if (strcmp (long_options[option_index].name, "count") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->count_given), + &(local_args_info.count_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "count", '-', additional_error)) goto failure; @@ -1221,6 +1386,23 @@ cmdline_parser_internal (int argc, char * const *argv, goto failure; } + /* g(r, z). */ + else if (strcmp (long_options[option_index].name, "r_z") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->r_z_given), + &(local_args_info.r_z_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "r_z", '-', + additional_error)) + goto failure; + + } /* g(cos(theta), cos(omega)). */ else if (strcmp (long_options[option_index].name, "theta_omega") == 0) { @@ -1255,6 +1437,23 @@ cmdline_parser_internal (int argc, char * const *argv, goto failure; } + /* 2D g(r) (Slab width --dz must be specified). */ + else if (strcmp (long_options[option_index].name, "twodgofr") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->twodgofr_given), + &(local_args_info.twodgofr_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "twodgofr", '-', + additional_error)) + goto failure; + + } /* rp2 order parameter (--sele1 and --sele2 must be specified). */ else if (strcmp (long_options[option_index].name, "rp2") == 0) { @@ -1336,6 +1535,23 @@ cmdline_parser_internal (int argc, char * const *argv, &(local_args_info.rho_r_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "rho_r", '-', + additional_error)) + goto failure; + + } + /* angle of R. */ + else if (strcmp (long_options[option_index].name, "angle_r") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->angle_r_given), + &(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "angle_r", '-', additional_error)) goto failure; @@ -1357,7 +1573,41 @@ cmdline_parser_internal (int argc, char * const *argv, goto failure; } + /* length of nanorod. */ + else if (strcmp (long_options[option_index].name, "rodlength") == 0) + { + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->rodlength_given), + &(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "rodlength", '-', + additional_error)) + goto failure; + + } + /* tetrahedrality order parameter by zbin(--sele1 must be specified). */ + else if (strcmp (long_options[option_index].name, "tet_param_z") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->tet_param_z_given), + &(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "tet_param_z", '-', + additional_error)) + goto failure; + + } + break; case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ @@ -1371,7 +1621,7 @@ cmdline_parser_internal (int argc, char * const *argv, if (args_info->staticProps_group_counter > 1) { - 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 : "")); + 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 : "")); error = 1; }