| 1 |  | /* | 
| 2 |  | File autogenerated by gengetopt version 2.22.4 | 
| 3 |  | generated with the following command: | 
| 4 | < | gengetopt --file-name=StaticPropsCmd --unamed-opts | 
| 4 | > | gengetopt -i StaticProps.ggo -F StaticPropsCmd -c cpp | 
| 5 |  |  | 
| 6 |  | The developers of gengetopt consider the fixed text that goes in all | 
| 7 |  | gengetopt output files to be in the public domain: | 
| 21 |  | #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ | 
| 22 |  | #endif | 
| 23 |  |  | 
| 24 | – | #ifdef WIN32 | 
| 25 | – | #include "utils/wingetopt.h" | 
| 26 | – | #else | 
| 24 |  | #include <getopt.h> | 
| 28 | – | #endif | 
| 25 |  |  | 
| 26 |  | #include "StaticPropsCmd.h" | 
| 27 |  |  | 
| 28 |  | const char *gengetopt_args_info_purpose = ""; | 
| 29 |  |  | 
| 30 | < | const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]... [FILES]..."; | 
| 30 | > | const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]..."; | 
| 31 |  |  | 
| 32 |  | const char *gengetopt_args_info_description = ""; | 
| 33 |  |  | 
| 93 |  | "      --rnemdrt                 shell and angle-resolved RNEMD statistics \n                                  (temperature, density, angular velocity)", | 
| 94 |  | "      --nitrile                 electrostatic potential to frequency map based \n                                  on the Cho nitrile fits", | 
| 95 |  | "  -m, --multipole               average multipole moments contained within \n                                  cutoff spheres as a function of radius", | 
| 96 | + | "      --surfDiffusion           X, Y, and R (surface diffusion if Z exposed and \n                                  bulk immobile) diffusion", | 
| 97 |  | 0 | 
| 98 |  | }; | 
| 99 |  |  | 
| 181 |  | args_info->rnemdrt_given = 0 ; | 
| 182 |  | args_info->nitrile_given = 0 ; | 
| 183 |  | args_info->multipole_given = 0 ; | 
| 184 | + | args_info->surfDiffusion_given = 0 ; | 
| 185 |  | args_info->staticProps_group_counter = 0 ; | 
| 186 |  | } | 
| 187 |  |  | 
| 298 |  | args_info->rnemdrt_help = gengetopt_args_info_help[58] ; | 
| 299 |  | args_info->nitrile_help = gengetopt_args_info_help[59] ; | 
| 300 |  | args_info->multipole_help = gengetopt_args_info_help[60] ; | 
| 301 | + | args_info->surfDiffusion_help = gengetopt_args_info_help[61] ; | 
| 302 |  |  | 
| 303 |  | } | 
| 304 |  |  | 
| 340 |  | clear_given (args_info); | 
| 341 |  | clear_args (args_info); | 
| 342 |  | init_args_info (args_info); | 
| 344 | – |  | 
| 345 | – | args_info->inputs = 0; | 
| 346 | – | args_info->inputs_num = 0; | 
| 343 |  | } | 
| 344 |  |  | 
| 345 |  | void | 
| 378 |  | static void | 
| 379 |  | cmdline_parser_release (struct gengetopt_args_info *args_info) | 
| 380 |  | { | 
| 381 | < | unsigned int i; | 
| 381 | > |  | 
| 382 |  | free_string_field (&(args_info->input_arg)); | 
| 383 |  | free_string_field (&(args_info->input_orig)); | 
| 384 |  | free_string_field (&(args_info->output_arg)); | 
| 415 |  | free_string_field (&(args_info->gaussWidth_orig)); | 
| 416 |  |  | 
| 417 |  |  | 
| 422 | – | for (i = 0; i < args_info->inputs_num; ++i) | 
| 423 | – | free (args_info->inputs [i]); | 
| 424 | – |  | 
| 425 | – | if (args_info->inputs_num) | 
| 426 | – | free (args_info->inputs); | 
| 418 |  |  | 
| 419 |  | clear_given (args_info); | 
| 420 |  | } | 
| 563 |  | write_into_file(outfile, "nitrile", 0, 0 ); | 
| 564 |  | if (args_info->multipole_given) | 
| 565 |  | write_into_file(outfile, "multipole", 0, 0 ); | 
| 566 | + | if (args_info->surfDiffusion_given) | 
| 567 | + | write_into_file(outfile, "surfDiffusion", 0, 0 ); | 
| 568 |  |  | 
| 569 |  |  | 
| 570 |  | i = EXIT_SUCCESS; | 
| 650 |  | args_info->rnemdrt_given = 0 ; | 
| 651 |  | args_info->nitrile_given = 0 ; | 
| 652 |  | args_info->multipole_given = 0 ; | 
| 653 | + | args_info->surfDiffusion_given = 0 ; | 
| 654 |  |  | 
| 655 |  | args_info->staticProps_group_counter = 0; | 
| 656 |  | } | 
| 956 |  | { "rnemdrt",    0, NULL, 0 }, | 
| 957 |  | { "nitrile",    0, NULL, 0 }, | 
| 958 |  | { "multipole",  0, NULL, 'm' }, | 
| 959 | + | { "surfDiffusion",      0, NULL, 0 }, | 
| 960 |  | { 0,  0, 0, 0 } | 
| 961 |  | }; | 
| 962 |  |  | 
| 1850 |  | &(local_args_info.nitrile_given), optarg, 0, 0, ARG_NO, | 
| 1851 |  | check_ambiguity, override, 0, 0, | 
| 1852 |  | "nitrile", '-', | 
| 1853 | + | additional_error)) | 
| 1854 | + | goto failure; | 
| 1855 | + |  | 
| 1856 | + | } | 
| 1857 | + | /* X, Y, and R (surface diffusion if Z exposed and bulk immobile) diffusion.  */ | 
| 1858 | + | else if (strcmp (long_options[option_index].name, "surfDiffusion") == 0) | 
| 1859 | + | { | 
| 1860 | + |  | 
| 1861 | + | if (args_info->staticProps_group_counter && override) | 
| 1862 | + | reset_group_staticProps (args_info); | 
| 1863 | + | args_info->staticProps_group_counter += 1; | 
| 1864 | + |  | 
| 1865 | + | if (update_arg( 0 , | 
| 1866 | + | 0 , &(args_info->surfDiffusion_given), | 
| 1867 | + | &(local_args_info.surfDiffusion_given), optarg, 0, 0, ARG_NO, | 
| 1868 | + | check_ambiguity, override, 0, 0, | 
| 1869 | + | "surfDiffusion", '-', | 
| 1870 |  | additional_error)) | 
| 1871 |  | goto failure; | 
| 1872 |  |  | 
| 1901 |  | if ( error ) | 
| 1902 |  | return (EXIT_FAILURE); | 
| 1903 |  |  | 
| 1892 | – | if (optind < argc) | 
| 1893 | – | { | 
| 1894 | – | int i = 0 ; | 
| 1895 | – | int found_prog_name = 0; | 
| 1896 | – | /* whether program name, i.e., argv[0], is in the remaining args | 
| 1897 | – | (this may happen with some implementations of getopt, | 
| 1898 | – | but surely not with the one included by gengetopt) */ | 
| 1899 | – |  | 
| 1900 | – | i = optind; | 
| 1901 | – | while (i < argc) | 
| 1902 | – | if (argv[i++] == argv[0]) { | 
| 1903 | – | found_prog_name = 1; | 
| 1904 | – | break; | 
| 1905 | – | } | 
| 1906 | – | i = 0; | 
| 1907 | – |  | 
| 1908 | – | args_info->inputs_num = argc - optind - found_prog_name; | 
| 1909 | – | args_info->inputs = | 
| 1910 | – | (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; | 
| 1911 | – | while (optind < argc) | 
| 1912 | – | if (argv[optind++] != argv[0]) | 
| 1913 | – | args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; | 
| 1914 | – | } | 
| 1915 | – |  | 
| 1904 |  | return 0; | 
| 1905 |  |  | 
| 1906 |  | failure: |