--- trunk/src/applications/dynamicProps/DynamicPropsCmd.c 2006/12/14 19:38:56 1098 +++ branches/development/src/applications/dynamicProps/DynamicPropsCmd.c 2010/07/09 23:08:25 1465 @@ -1,7 +1,7 @@ /* - File autogenerated by gengetopt version 2.15 + File autogenerated by gengetopt version 2.14 generated with the following command: - gengetopt -i DynamicProps.ggo --file-name=DynamicPropsCmd + gengetopt -i DynamicProps.ggo -F DynamicPropsCmd The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: @@ -50,6 +50,9 @@ void clear_given (struct gengetopt_args_info *args_inf args_info->dcorr_given = 0 ; args_info->lcorr_given = 0 ; args_info->r_rcorr_given = 0 ; + args_info->thetacorr_given = 0 ; + args_info->drcorr_given = 0 ; + args_info->helfandEcorr_given = 0 ; args_info->dynamicProps_group_counter = 0 ; } @@ -92,6 +95,9 @@ cmdline_parser_print_help (void) printf("%s\n"," -d, --dcorr dipole correlation function"); printf("%s\n"," -l, --lcorr Lengendre correlation function"); printf("%s\n"," --r_rcorr Radial rmsd"); + printf("%s\n"," --thetacorr Angular rmsd"); + printf("%s\n"," --drcorr Directional rmsd for particles with unit \n vectors"); + printf("%s\n"," --helfandEcorr Helfand moment for thermal conductvity"); } @@ -225,6 +231,15 @@ cmdline_parser_file_save(const char *filename, struct if (args_info->r_rcorr_given) { fprintf(outfile, "%s\n", "r_rcorr"); } + if (args_info->thetacorr_given) { + fprintf(outfile, "%s\n", "thetacorr"); + } + if (args_info->drcorr_given) { + fprintf(outfile, "%s\n", "drcorr"); + } + if (args_info->helfandEcorr_given) { + fprintf(outfile, "%s\n", "helfandEcorr"); + } fclose (outfile); @@ -269,6 +284,9 @@ reset_group_dynamicProps(struct gengetopt_args_info *a args_info->dcorr_given = 0 ; args_info->lcorr_given = 0 ; args_info->r_rcorr_given = 0 ; + args_info->thetacorr_given = 0 ; + args_info->drcorr_given = 0 ; + args_info->helfandEcorr_given = 0 ; args_info->dynamicProps_group_counter = 0; } @@ -368,6 +386,9 @@ cmdline_parser_internal (int argc, char * const *argv, { "dcorr", 0, NULL, 'd' }, { "lcorr", 0, NULL, 'l' }, { "r_rcorr", 0, NULL, 0 }, + { "thetacorr", 0, NULL, 0 }, + { "drcorr", 0, NULL, 0 }, + { "helfandEcorr", 0, NULL, 0 }, { NULL, 0, NULL, 0 } }; @@ -536,11 +557,7 @@ cmdline_parser_internal (int argc, char * const *argv, continue; local_args_info.order_given = 1; args_info->order_given = 1; - args_info->order_arg = strtol (optarg, &stop_char, 0); - if (!(stop_char && *stop_char == '\0')) { - fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg); - goto failure; - } + args_info->order_arg = strtol (optarg,&stop_char,0); if (args_info->order_orig) free (args_info->order_orig); /* free previous string */ args_info->order_orig = gengetopt_strdup (optarg); @@ -557,11 +574,62 @@ cmdline_parser_internal (int argc, char * const *argv, continue; local_args_info.r_rcorr_given = 1; args_info->r_rcorr_given = 1; + if (args_info->dynamicProps_group_counter && override) + reset_group_dynamicProps (args_info); + args_info->dynamicProps_group_counter += 1; + break; + } + /* Angular rmsd. */ + else if (strcmp (long_options[option_index].name, "thetacorr") == 0) + { + if (local_args_info.thetacorr_given) + { + fprintf (stderr, "%s: `--thetacorr' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); + goto failure; + } + if (args_info->thetacorr_given && ! override) + continue; + local_args_info.thetacorr_given = 1; + args_info->thetacorr_given = 1; if (args_info->dynamicProps_group_counter && override) reset_group_dynamicProps (args_info); args_info->dynamicProps_group_counter += 1; break; } + /* Directional rmsd for particles with unit vectors. */ + else if (strcmp (long_options[option_index].name, "drcorr") == 0) + { + if (local_args_info.drcorr_given) + { + fprintf (stderr, "%s: `--drcorr' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); + goto failure; + } + if (args_info->drcorr_given && ! override) + continue; + local_args_info.drcorr_given = 1; + args_info->drcorr_given = 1; + if (args_info->dynamicProps_group_counter && override) + reset_group_dynamicProps (args_info); + args_info->dynamicProps_group_counter += 1; + break; + } + /* Helfand moment for thermal conductvity. */ + else if (strcmp (long_options[option_index].name, "helfandEcorr") == 0) + { + if (local_args_info.helfandEcorr_given) + { + fprintf (stderr, "%s: `--helfandEcorr' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); + goto failure; + } + if (args_info->helfandEcorr_given && ! override) + continue; + local_args_info.helfandEcorr_given = 1; + args_info->helfandEcorr_given = 1; + if (args_info->dynamicProps_group_counter && override) + reset_group_dynamicProps (args_info); + args_info->dynamicProps_group_counter += 1; + break; + } break; case '?': /* Invalid option. */