| 1 | /** @file Dump2XYZCmd.h | 
| 2 | *  @brief The header file for the command line option parser | 
| 3 | *  generated by GNU Gengetopt version 2.22 | 
| 4 | *  http://www.gnu.org/software/gengetopt. | 
| 5 | *  DO NOT modify this file, since it can be overwritten | 
| 6 | *  @author GNU Gengetopt by Lorenzo Bettini */ | 
| 7 |  | 
| 8 | #ifndef DUMP2XYZCMD_H | 
| 9 | #define DUMP2XYZCMD_H | 
| 10 |  | 
| 11 | /* If we use autoconf.  */ | 
| 12 | #ifdef HAVE_CONFIG_H | 
| 13 | #include "config.h" | 
| 14 | #endif | 
| 15 |  | 
| 16 | #include <stdio.h> /* for FILE */ | 
| 17 |  | 
| 18 | #ifdef __cplusplus | 
| 19 | extern "C" { | 
| 20 | #endif /* __cplusplus */ | 
| 21 |  | 
| 22 | #ifndef CMDLINE_PARSER_PACKAGE | 
| 23 | /** @brief the program name */ | 
| 24 | #define CMDLINE_PARSER_PACKAGE "Dump2XYZ" | 
| 25 | #endif | 
| 26 |  | 
| 27 | #ifndef CMDLINE_PARSER_VERSION | 
| 28 | /** @brief the program version */ | 
| 29 | #define CMDLINE_PARSER_VERSION "0.99" | 
| 30 | #endif | 
| 31 |  | 
| 32 | /** @brief Where the command line options are stored */ | 
| 33 | struct gengetopt_args_info | 
| 34 | { | 
| 35 | const char *help_help; /**< @brief Print help and exit help description.  */ | 
| 36 | const char *version_help; /**< @brief Print version and exit help description.  */ | 
| 37 | char * input_arg;     /**< @brief input dump file.  */ | 
| 38 | char * input_orig;    /**< @brief input dump file original value given at command line.  */ | 
| 39 | const char *input_help; /**< @brief input dump file help description.  */ | 
| 40 | char * output_arg;    /**< @brief output file name.  */ | 
| 41 | char * output_orig;   /**< @brief output file name original value given at command line.  */ | 
| 42 | const char *output_help; /**< @brief output file name help description.  */ | 
| 43 | int frame_arg;        /**< @brief print every n frame (default='1').  */ | 
| 44 | char * frame_orig;    /**< @brief print every n frame original value given at command line.  */ | 
| 45 | const char *frame_help; /**< @brief print every n frame help description.  */ | 
| 46 | int water_flag;       /**< @brief skip the the waters (default=off).  */ | 
| 47 | const char *water_help; /**< @brief skip the the waters help description.  */ | 
| 48 | int periodicBox_flag; /**< @brief map to the periodic box (default=off).  */ | 
| 49 | const char *periodicBox_help; /**< @brief map to the periodic box help description.  */ | 
| 50 | int zconstraint_flag; /**< @brief replace the atom types of zconstraint molecules (default=off).  */ | 
| 51 | const char *zconstraint_help; /**< @brief replace the atom types of zconstraint molecules help description.  */ | 
| 52 | int rigidbody_flag;   /**< @brief add a pseudo COM atom to rigidbody (default=off).  */ | 
| 53 | const char *rigidbody_help; /**< @brief add a pseudo COM atom to rigidbody help description.  */ | 
| 54 | int watertype_flag;   /**< @brief replace the atom type of water model (default=on).  */ | 
| 55 | const char *watertype_help; /**< @brief replace the atom type of water model help description.  */ | 
| 56 | char * selection_arg; /**< @brief general selection syntax.  */ | 
| 57 | char * selection_orig;        /**< @brief general selection syntax original value given at command line.  */ | 
| 58 | const char *selection_help; /**< @brief general selection syntax help description.  */ | 
| 59 | char * originsele_arg;        /**< @brief select origin.  */ | 
| 60 | char * originsele_orig;       /**< @brief select origin original value given at command line.  */ | 
| 61 | const char *originsele_help; /**< @brief select origin help description.  */ | 
| 62 | char * refsele_arg;   /**< @brief select reference.  */ | 
| 63 | char * refsele_orig;  /**< @brief select reference original value given at command line.  */ | 
| 64 | const char *refsele_help; /**< @brief select reference help description.  */ | 
| 65 | int repeatX_arg;      /**< @brief The number of images to repeat in the x direction (default='0').  */ | 
| 66 | char * repeatX_orig;  /**< @brief The number of images to repeat in the x direction original value given at command line.  */ | 
| 67 | const char *repeatX_help; /**< @brief The number of images to repeat in the x direction help description.  */ | 
| 68 | int repeatY_arg;      /**< @brief The number of images to repeat in the y direction (default='0').  */ | 
| 69 | char * repeatY_orig;  /**< @brief The number of images to repeat in the y direction original value given at command line.  */ | 
| 70 | const char *repeatY_help; /**< @brief The number of images to repeat in the y direction help description.  */ | 
| 71 | int repeatZ_arg;      /**< @brief The number of images to repeat in the z direction (default='0').  */ | 
| 72 | char * repeatZ_orig;  /**< @brief The number of images to repeat in the z direction original value given at command line.  */ | 
| 73 | const char *repeatZ_help; /**< @brief The number of images to repeat in the z direction help description.  */ | 
| 74 | int basetype_flag;    /**< @brief Convert to base atom type (default=off).  */ | 
| 75 | const char *basetype_help; /**< @brief Convert to base atom type help description.  */ | 
| 76 | int velocities_flag;  /**< @brief Print velocities in xyz file (default=off).  */ | 
| 77 | const char *velocities_help; /**< @brief Print velocities in xyz file help description.  */ | 
| 78 | int forces_flag;      /**< @brief Print forces xyz file (default=off).  */ | 
| 79 | const char *forces_help; /**< @brief Print forces xyz file help description.  */ | 
| 80 | int vectors_flag;     /**< @brief Print vectors (dipoles, etc) in xyz file (default=off).  */ | 
| 81 | const char *vectors_help; /**< @brief Print vectors (dipoles, etc) in xyz file help description.  */ | 
| 82 | int charges_flag;     /**< @brief Print charges in xyz file (default=off).  */ | 
| 83 | const char *charges_help; /**< @brief Print charges in xyz file help description.  */ | 
| 84 |  | 
| 85 | unsigned int help_given ;     /**< @brief Whether help was given.  */ | 
| 86 | unsigned int version_given ;  /**< @brief Whether version was given.  */ | 
| 87 | unsigned int input_given ;    /**< @brief Whether input was given.  */ | 
| 88 | unsigned int output_given ;   /**< @brief Whether output was given.  */ | 
| 89 | unsigned int frame_given ;    /**< @brief Whether frame was given.  */ | 
| 90 | unsigned int water_given ;    /**< @brief Whether water was given.  */ | 
| 91 | unsigned int periodicBox_given ;      /**< @brief Whether periodicBox was given.  */ | 
| 92 | unsigned int zconstraint_given ;      /**< @brief Whether zconstraint was given.  */ | 
| 93 | unsigned int rigidbody_given ;        /**< @brief Whether rigidbody was given.  */ | 
| 94 | unsigned int watertype_given ;        /**< @brief Whether watertype was given.  */ | 
| 95 | unsigned int selection_given ;        /**< @brief Whether selection was given.  */ | 
| 96 | unsigned int originsele_given ;       /**< @brief Whether originsele was given.  */ | 
| 97 | unsigned int refsele_given ;  /**< @brief Whether refsele was given.  */ | 
| 98 | unsigned int repeatX_given ;  /**< @brief Whether repeatX was given.  */ | 
| 99 | unsigned int repeatY_given ;  /**< @brief Whether repeatY was given.  */ | 
| 100 | unsigned int repeatZ_given ;  /**< @brief Whether repeatZ was given.  */ | 
| 101 | unsigned int basetype_given ; /**< @brief Whether basetype was given.  */ | 
| 102 | unsigned int velocities_given ;       /**< @brief Whether velocities was given.  */ | 
| 103 | unsigned int forces_given ;   /**< @brief Whether forces was given.  */ | 
| 104 | unsigned int vectors_given ;  /**< @brief Whether vectors was given.  */ | 
| 105 | unsigned int charges_given ;  /**< @brief Whether charges was given.  */ | 
| 106 |  | 
| 107 | char **inputs ; /**< @brief unamed options (options without names) */ | 
| 108 | unsigned inputs_num ; /**< @brief unamed options number */ | 
| 109 | } ; | 
| 110 |  | 
| 111 | /** @brief The additional parameters to pass to parser functions */ | 
| 112 | struct cmdline_parser_params | 
| 113 | { | 
| 114 | int override; /**< @brief whether to override possibly already present options (default 0) */ | 
| 115 | int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */ | 
| 116 | int check_required; /**< @brief whether to check that all required options were provided (default 1) */ | 
| 117 | int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */ | 
| 118 | int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */ | 
| 119 | } ; | 
| 120 |  | 
| 121 | /** @brief the purpose string of the program */ | 
| 122 | extern const char *gengetopt_args_info_purpose; | 
| 123 | /** @brief the usage string of the program */ | 
| 124 | extern const char *gengetopt_args_info_usage; | 
| 125 | /** @brief all the lines making the help output */ | 
| 126 | extern const char *gengetopt_args_info_help[]; | 
| 127 |  | 
| 128 | /** | 
| 129 | * The command line parser | 
| 130 | * @param argc the number of command line options | 
| 131 | * @param argv the command line options | 
| 132 | * @param args_info the structure where option information will be stored | 
| 133 | * @return 0 if everything went fine, NON 0 if an error took place | 
| 134 | */ | 
| 135 | int cmdline_parser (int argc, char * const *argv, | 
| 136 | struct gengetopt_args_info *args_info); | 
| 137 |  | 
| 138 | /** | 
| 139 | * The command line parser (version with additional parameters - deprecated) | 
| 140 | * @param argc the number of command line options | 
| 141 | * @param argv the command line options | 
| 142 | * @param args_info the structure where option information will be stored | 
| 143 | * @param override whether to override possibly already present options | 
| 144 | * @param initialize whether to initialize the option structure my_args_info | 
| 145 | * @param check_required whether to check that all required options were provided | 
| 146 | * @return 0 if everything went fine, NON 0 if an error took place | 
| 147 | * @deprecated use cmdline_parser_ext() instead | 
| 148 | */ | 
| 149 | int cmdline_parser2 (int argc, char * const *argv, | 
| 150 | struct gengetopt_args_info *args_info, | 
| 151 | int override, int initialize, int check_required); | 
| 152 |  | 
| 153 | /** | 
| 154 | * The command line parser (version with additional parameters) | 
| 155 | * @param argc the number of command line options | 
| 156 | * @param argv the command line options | 
| 157 | * @param args_info the structure where option information will be stored | 
| 158 | * @param params additional parameters for the parser | 
| 159 | * @return 0 if everything went fine, NON 0 if an error took place | 
| 160 | */ | 
| 161 | int cmdline_parser_ext (int argc, char * const *argv, | 
| 162 | struct gengetopt_args_info *args_info, | 
| 163 | struct cmdline_parser_params *params); | 
| 164 |  | 
| 165 | /** | 
| 166 | * Save the contents of the option struct into an already open FILE stream. | 
| 167 | * @param outfile the stream where to dump options | 
| 168 | * @param args_info the option struct to dump | 
| 169 | * @return 0 if everything went fine, NON 0 if an error took place | 
| 170 | */ | 
| 171 | int cmdline_parser_dump(FILE *outfile, | 
| 172 | struct gengetopt_args_info *args_info); | 
| 173 |  | 
| 174 | /** | 
| 175 | * Save the contents of the option struct into a (text) file. | 
| 176 | * This file can be read by the config file parser (if generated by gengetopt) | 
| 177 | * @param filename the file where to save | 
| 178 | * @param args_info the option struct to save | 
| 179 | * @return 0 if everything went fine, NON 0 if an error took place | 
| 180 | */ | 
| 181 | int cmdline_parser_file_save(const char *filename, | 
| 182 | struct gengetopt_args_info *args_info); | 
| 183 |  | 
| 184 | /** | 
| 185 | * Print the help | 
| 186 | */ | 
| 187 | void cmdline_parser_print_help(void); | 
| 188 | /** | 
| 189 | * Print the version | 
| 190 | */ | 
| 191 | void cmdline_parser_print_version(void); | 
| 192 |  | 
| 193 | /** | 
| 194 | * Initializes all the fields a cmdline_parser_params structure | 
| 195 | * to their default values | 
| 196 | * @param params the structure to initialize | 
| 197 | */ | 
| 198 | void cmdline_parser_params_init(struct cmdline_parser_params *params); | 
| 199 |  | 
| 200 | /** | 
| 201 | * Allocates dynamically a cmdline_parser_params structure and initializes | 
| 202 | * all its fields to their default values | 
| 203 | * @return the created and initialized cmdline_parser_params structure | 
| 204 | */ | 
| 205 | struct cmdline_parser_params *cmdline_parser_params_create(void); | 
| 206 |  | 
| 207 | /** | 
| 208 | * Initializes the passed gengetopt_args_info structure's fields | 
| 209 | * (also set default values for options that have a default) | 
| 210 | * @param args_info the structure to initialize | 
| 211 | */ | 
| 212 | void cmdline_parser_init (struct gengetopt_args_info *args_info); | 
| 213 | /** | 
| 214 | * Deallocates the string fields of the gengetopt_args_info structure | 
| 215 | * (but does not deallocate the structure itself) | 
| 216 | * @param args_info the structure to deallocate | 
| 217 | */ | 
| 218 | void cmdline_parser_free (struct gengetopt_args_info *args_info); | 
| 219 |  | 
| 220 | /** | 
| 221 | * Checks that all the required options were specified | 
| 222 | * @param args_info the structure to check | 
| 223 | * @param prog_name the name of the program that will be used to print | 
| 224 | *   possible errors | 
| 225 | * @return | 
| 226 | */ | 
| 227 | int cmdline_parser_required (struct gengetopt_args_info *args_info, | 
| 228 | const char *prog_name); | 
| 229 |  | 
| 230 |  | 
| 231 | #ifdef __cplusplus | 
| 232 | } | 
| 233 | #endif /* __cplusplus */ | 
| 234 | #endif /* DUMP2XYZCMD_H */ |