1 /** @file RNA2Dfold_cmdl.h
2 * @brief The header file for the command line option parser
3 * generated by GNU Gengetopt version 2.22.5
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 */
8 #ifndef RNA2DFOLD_CMDL_H
9 #define RNA2DFOLD_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNA2DFOLD_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNA2DFOLD_CMDLINE_PARSER_PACKAGE "RNA2Dfold"
27 #ifndef RNA2DFOLD_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNA2DFOLD_CMDLINE_PARSER_PACKAGE_NAME "RNA2Dfold"
32 #ifndef RNA2DFOLD_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNA2DFOLD_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNA2Dfold_args_info
40 const char *help_help; /**< @brief Print help and exit help description. */
41 const char *detailed_help_help; /**< @brief Print help, including all details and hidden options, and exit help description. */
42 const char *version_help; /**< @brief Print version and exit help description. */
43 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
46 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
49 int numThreads_arg; /**< @brief Set the number of threads used for calculations (only available when compiled with OpenMP support)
52 char * numThreads_orig; /**< @brief Set the number of threads used for calculations (only available when compiled with OpenMP support)
54 original value given at command line. */
55 const char *numThreads_help; /**< @brief Set the number of threads used for calculations (only available when compiled with OpenMP support)
58 int partfunc_flag; /**< @brief calculate partition function and thus, Boltzmann probabilities and Gibbs free energy
61 const char *partfunc_help; /**< @brief calculate partition function and thus, Boltzmann probabilities and Gibbs free energy
64 int stochBT_arg; /**< @brief backtrack a certain number of Boltzmann samples from the appropriate k,l neighborhood(s)
67 char * stochBT_orig; /**< @brief backtrack a certain number of Boltzmann samples from the appropriate k,l neighborhood(s)
69 original value given at command line. */
70 const char *stochBT_help; /**< @brief backtrack a certain number of Boltzmann samples from the appropriate k,l neighborhood(s)
73 char ** neighborhood_arg; /**< @brief backtrack structures from certain k,l-neighborhood only, can be specified multiple times (<k>:<l>,<m>:<n>,...)
76 char ** neighborhood_orig; /**< @brief backtrack structures from certain k,l-neighborhood only, can be specified multiple times (<k>:<l>,<m>:<n>,...)
78 original value given at command line. */
79 unsigned int neighborhood_min; /**< @brief backtrack structures from certain k,l-neighborhood only, can be specified multiple times (<k>:<l>,<m>:<n>,...)
81 's minimum occurreces */
82 unsigned int neighborhood_max; /**< @brief backtrack structures from certain k,l-neighborhood only, can be specified multiple times (<k>:<l>,<m>:<n>,...)
84 's maximum occurreces */
85 const char *neighborhood_help; /**< @brief backtrack structures from certain k,l-neighborhood only, can be specified multiple times (<k>:<l>,<m>:<n>,...)
88 double pfScale_arg; /**< @brief scaling factor for pf to avoid overflows
91 char * pfScale_orig; /**< @brief scaling factor for pf to avoid overflows
93 original value given at command line. */
94 const char *pfScale_help; /**< @brief scaling factor for pf to avoid overflows
97 int noBT_flag; /**< @brief do not backtrack structures, calculate energy contributions only
100 const char *noBT_help; /**< @brief do not backtrack structures, calculate energy contributions only
103 int circ_flag; /**< @brief Assume a circular (instead of linear) RNA molecule.
106 const char *circ_help; /**< @brief Assume a circular (instead of linear) RNA molecule.
109 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
112 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
114 original value given at command line. */
115 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
118 int maxDist1_arg; /**< @brief maximum distance to first reference structure. */
119 char * maxDist1_orig; /**< @brief maximum distance to first reference structure original value given at command line. */
120 const char *maxDist1_help; /**< @brief maximum distance to first reference structure help description. */
121 int maxDist2_arg; /**< @brief maximum distance to second reference structure. */
122 char * maxDist2_orig; /**< @brief maximum distance to second reference structure original value given at command line. */
123 const char *maxDist2_help; /**< @brief maximum distance to second reference structure help description. */
124 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
127 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
130 char * parameterFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
132 char * parameterFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
133 original value given at command line. */
134 const char *parameterFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
136 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
138 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
139 original value given at command line. */
140 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
142 int noGU_flag; /**< @brief Do not allow GU pairs
145 const char *noGU_help; /**< @brief Do not allow GU pairs
148 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
151 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
155 unsigned int help_given ; /**< @brief Whether help was given. */
156 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
157 unsigned int version_given ; /**< @brief Whether version was given. */
158 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
159 unsigned int numThreads_given ; /**< @brief Whether numThreads was given. */
160 unsigned int partfunc_given ; /**< @brief Whether partfunc was given. */
161 unsigned int stochBT_given ; /**< @brief Whether stochBT was given. */
162 unsigned int neighborhood_given ; /**< @brief Whether neighborhood was given. */
163 unsigned int pfScale_given ; /**< @brief Whether pfScale was given. */
164 unsigned int noBT_given ; /**< @brief Whether noBT was given. */
165 unsigned int circ_given ; /**< @brief Whether circ was given. */
166 unsigned int temp_given ; /**< @brief Whether temp was given. */
167 unsigned int maxDist1_given ; /**< @brief Whether maxDist1 was given. */
168 unsigned int maxDist2_given ; /**< @brief Whether maxDist2 was given. */
169 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
170 unsigned int parameterFile_given ; /**< @brief Whether parameterFile was given. */
171 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
172 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
173 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
177 /** @brief The additional parameters to pass to parser functions */
178 struct RNA2Dfold_cmdline_parser_params
180 int override; /**< @brief whether to override possibly already present options (default 0) */
181 int initialize; /**< @brief whether to initialize the option structure RNA2Dfold_args_info (default 1) */
182 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
183 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNA2Dfold_args_info (default 0) */
184 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
187 /** @brief the purpose string of the program */
188 extern const char *RNA2Dfold_args_info_purpose;
189 /** @brief the usage string of the program */
190 extern const char *RNA2Dfold_args_info_usage;
191 /** @brief all the lines making the help output */
192 extern const char *RNA2Dfold_args_info_help[];
193 /** @brief all the lines making the detailed help output (including hidden options and details) */
194 extern const char *RNA2Dfold_args_info_detailed_help[];
197 * The command line parser
198 * @param argc the number of command line options
199 * @param argv the command line options
200 * @param args_info the structure where option information will be stored
201 * @return 0 if everything went fine, NON 0 if an error took place
203 int RNA2Dfold_cmdline_parser (int argc, char **argv,
204 struct RNA2Dfold_args_info *args_info);
207 * The command line parser (version with additional parameters - deprecated)
208 * @param argc the number of command line options
209 * @param argv the command line options
210 * @param args_info the structure where option information will be stored
211 * @param override whether to override possibly already present options
212 * @param initialize whether to initialize the option structure my_args_info
213 * @param check_required whether to check that all required options were provided
214 * @return 0 if everything went fine, NON 0 if an error took place
215 * @deprecated use RNA2Dfold_cmdline_parser_ext() instead
217 int RNA2Dfold_cmdline_parser2 (int argc, char **argv,
218 struct RNA2Dfold_args_info *args_info,
219 int override, int initialize, int check_required);
222 * The command line parser (version with additional parameters)
223 * @param argc the number of command line options
224 * @param argv the command line options
225 * @param args_info the structure where option information will be stored
226 * @param params additional parameters for the parser
227 * @return 0 if everything went fine, NON 0 if an error took place
229 int RNA2Dfold_cmdline_parser_ext (int argc, char **argv,
230 struct RNA2Dfold_args_info *args_info,
231 struct RNA2Dfold_cmdline_parser_params *params);
234 * Save the contents of the option struct into an already open FILE stream.
235 * @param outfile the stream where to dump options
236 * @param args_info the option struct to dump
237 * @return 0 if everything went fine, NON 0 if an error took place
239 int RNA2Dfold_cmdline_parser_dump(FILE *outfile,
240 struct RNA2Dfold_args_info *args_info);
243 * Save the contents of the option struct into a (text) file.
244 * This file can be read by the config file parser (if generated by gengetopt)
245 * @param filename the file where to save
246 * @param args_info the option struct to save
247 * @return 0 if everything went fine, NON 0 if an error took place
249 int RNA2Dfold_cmdline_parser_file_save(const char *filename,
250 struct RNA2Dfold_args_info *args_info);
255 void RNA2Dfold_cmdline_parser_print_help(void);
257 * Print the detailed help (including hidden options and details)
259 void RNA2Dfold_cmdline_parser_print_detailed_help(void);
263 void RNA2Dfold_cmdline_parser_print_version(void);
266 * Initializes all the fields a RNA2Dfold_cmdline_parser_params structure
267 * to their default values
268 * @param params the structure to initialize
270 void RNA2Dfold_cmdline_parser_params_init(struct RNA2Dfold_cmdline_parser_params *params);
273 * Allocates dynamically a RNA2Dfold_cmdline_parser_params structure and initializes
274 * all its fields to their default values
275 * @return the created and initialized RNA2Dfold_cmdline_parser_params structure
277 struct RNA2Dfold_cmdline_parser_params *RNA2Dfold_cmdline_parser_params_create(void);
280 * Initializes the passed RNA2Dfold_args_info structure's fields
281 * (also set default values for options that have a default)
282 * @param args_info the structure to initialize
284 void RNA2Dfold_cmdline_parser_init (struct RNA2Dfold_args_info *args_info);
286 * Deallocates the string fields of the RNA2Dfold_args_info structure
287 * (but does not deallocate the structure itself)
288 * @param args_info the structure to deallocate
290 void RNA2Dfold_cmdline_parser_free (struct RNA2Dfold_args_info *args_info);
293 * Checks that all the required options were specified
294 * @param args_info the structure to check
295 * @param prog_name the name of the program that will be used to print
299 int RNA2Dfold_cmdline_parser_required (struct RNA2Dfold_args_info *args_info,
300 const char *prog_name);
302 extern const char *RNA2Dfold_cmdline_parser_dangles_values[]; /**< @brief Possible values for dangles. */
307 #endif /* __cplusplus */
308 #endif /* RNA2DFOLD_CMDL_H */