OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
HydroCmd.hpp
Go to the documentation of this file.
1/** @file HydroCmd.hpp
2 * @brief The header file for the command line option parser
3 * generated by GNU Gengetopt version 2.23
4 * http://www.gnu.org/software/gengetopt.
5 * DO NOT modify this file, since it can be overwritten
6 * @author GNU Gengetopt */
7
8#ifndef HYDROCMD_H
9#define HYDROCMD_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
19extern "C" {
20#endif /* __cplusplus */
21
22#ifndef CMDLINE_PARSER_PACKAGE
23/** @brief the program name (used for printing errors) */
24#define CMDLINE_PARSER_PACKAGE "Hydro"
25#endif
26
27#ifndef CMDLINE_PARSER_PACKAGE_NAME
28/** @brief the complete program name (used for help and version) */
29#define CMDLINE_PARSER_PACKAGE_NAME "Hydro"
30#endif
31
32#ifndef CMDLINE_PARSER_VERSION
33/** @brief the program version */
34#define CMDLINE_PARSER_VERSION "2"
35#endif
36
37enum enum_model { model__NULL = -1, model_arg_AtomicBead = 0, model_arg_RoughShell, model_arg_BoundaryElement };
38
39/** @brief Where the command line options are stored */
41{
42 const char *help_help; /**< @brief Print help and exit help description. */
43 const char *version_help; /**< @brief Print version and exit help description. */
44 char * input_arg; /**< @brief input MetaData (omd) file. */
45 char * input_orig; /**< @brief input MetaData (omd) file original value given at command line. */
46 const char *input_help; /**< @brief input MetaData (omd) file help description. */
47 char * xyz_arg; /**< @brief xyz file for AtomicBead model. */
48 char * xyz_orig; /**< @brief xyz file for AtomicBead model original value given at command line. */
49 const char *xyz_help; /**< @brief xyz file for AtomicBead model help description. */
50 char * stl_arg; /**< @brief stl file for BoundaryElement model. */
51 char * stl_orig; /**< @brief stl file for BoundaryElement model original value given at command line. */
52 const char *stl_help; /**< @brief stl file for BoundaryElement model help description. */
53 char * msms_arg; /**< @brief filename root for MSMS .vert and .face files. */
54 char * msms_orig; /**< @brief filename root for MSMS .vert and .face files original value given at command line. */
55 const char *msms_help; /**< @brief filename root for MSMS .vert and .face files help description. */
56 char * output_arg; /**< @brief output file prefix. */
57 char * output_orig; /**< @brief output file prefix original value given at command line. */
58 const char *output_help; /**< @brief output file prefix help description. */
59 enum enum_model model_arg; /**< @brief hydrodynamics model. */
60 char * model_orig; /**< @brief hydrodynamics model original value given at command line. */
61 const char *model_help; /**< @brief hydrodynamics model help description. */
62 double beadSize_arg; /**< @brief bead size (diameter) for RoughShell model (in angstroms) (default='0.2'). */
63 char * beadSize_orig; /**< @brief bead size (diameter) for RoughShell model (in angstroms) original value given at command line. */
64 const char *beadSize_help; /**< @brief bead size (diameter) for RoughShell model (in angstroms) help description. */
65 int elements_flag; /**< @brief output the hydrodynamic elements (beads or triangles) only, hydrodynamics calculation will not be performed (default=off). */
66 const char *elements_help; /**< @brief output the hydrodynamic elements (beads or triangles) only, hydrodynamics calculation will not be performed help description. */
67 double viscosity_arg; /**< @brief viscosity (in poise) (default='0.01'). */
68 char * viscosity_orig; /**< @brief viscosity (in poise) original value given at command line. */
69 const char *viscosity_help; /**< @brief viscosity (in poise) help description. */
70 double temperature_arg; /**< @brief temperature (in Kelvin (default='300'). */
71 char * temperature_orig; /**< @brief temperature (in Kelvin original value given at command line. */
72 const char *temperature_help; /**< @brief temperature (in Kelvin help description. */
73
74 unsigned int help_given ; /**< @brief Whether help was given. */
75 unsigned int version_given ; /**< @brief Whether version was given. */
76 unsigned int input_given ; /**< @brief Whether input was given. */
77 unsigned int xyz_given ; /**< @brief Whether xyz was given. */
78 unsigned int stl_given ; /**< @brief Whether stl was given. */
79 unsigned int msms_given ; /**< @brief Whether msms was given. */
80 unsigned int output_given ; /**< @brief Whether output was given. */
81 unsigned int model_given ; /**< @brief Whether model was given. */
82 unsigned int beadSize_given ; /**< @brief Whether beadSize was given. */
83 unsigned int elements_given ; /**< @brief Whether elements was given. */
84 unsigned int viscosity_given ; /**< @brief Whether viscosity was given. */
85 unsigned int temperature_given ; /**< @brief Whether temperature was given. */
86
87 char **inputs ; /**< @brief unnamed options (options without names) */
88 unsigned inputs_num ; /**< @brief unnamed options number */
89 int input_file_group_counter; /**< @brief Counter for group input_file */
90} ;
91
92/** @brief The additional parameters to pass to parser functions */
94{
95 int override; /**< @brief whether to override possibly already present options (default 0) */
96 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
97 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
98 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
99 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
100} ;
101
102/** @brief the purpose string of the program */
103extern const char *gengetopt_args_info_purpose;
104/** @brief the usage string of the program */
105extern const char *gengetopt_args_info_usage;
106/** @brief the description string of the program */
107extern const char *gengetopt_args_info_description;
108/** @brief all the lines making the help output */
109extern const char *gengetopt_args_info_help[];
110
111/**
112 * The command line parser
113 * @param argc the number of command line options
114 * @param argv the command line options
115 * @param args_info the structure where option information will be stored
116 * @return 0 if everything went fine, NON 0 if an error took place
117 */
118int cmdline_parser (int argc, char **argv,
119 struct gengetopt_args_info *args_info);
120
121/**
122 * The command line parser (version with additional parameters - deprecated)
123 * @param argc the number of command line options
124 * @param argv the command line options
125 * @param args_info the structure where option information will be stored
126 * @param override whether to override possibly already present options
127 * @param initialize whether to initialize the option structure my_args_info
128 * @param check_required whether to check that all required options were provided
129 * @return 0 if everything went fine, NON 0 if an error took place
130 * @deprecated use cmdline_parser_ext() instead
131 */
132int cmdline_parser2 (int argc, char **argv,
133 struct gengetopt_args_info *args_info,
134 int override, int initialize, int check_required);
135
136/**
137 * The command line parser (version with additional parameters)
138 * @param argc the number of command line options
139 * @param argv the command line options
140 * @param args_info the structure where option information will be stored
141 * @param params additional parameters for the parser
142 * @return 0 if everything went fine, NON 0 if an error took place
143 */
144int cmdline_parser_ext (int argc, char **argv,
145 struct gengetopt_args_info *args_info,
146 struct cmdline_parser_params *params);
147
148/**
149 * Save the contents of the option struct into an already open FILE stream.
150 * @param outfile the stream where to dump options
151 * @param args_info the option struct to dump
152 * @return 0 if everything went fine, NON 0 if an error took place
153 */
154int cmdline_parser_dump(FILE *outfile,
155 struct gengetopt_args_info *args_info);
156
157/**
158 * Save the contents of the option struct into a (text) file.
159 * This file can be read by the config file parser (if generated by gengetopt)
160 * @param filename the file where to save
161 * @param args_info the option struct to save
162 * @return 0 if everything went fine, NON 0 if an error took place
163 */
164int cmdline_parser_file_save(const char *filename,
165 struct gengetopt_args_info *args_info);
166
167/**
168 * Print the help
169 */
171/**
172 * Print the version
173 */
175
176/**
177 * Initializes all the fields a cmdline_parser_params structure
178 * to their default values
179 * @param params the structure to initialize
180 */
182
183/**
184 * Allocates dynamically a cmdline_parser_params structure and initializes
185 * all its fields to their default values
186 * @return the created and initialized cmdline_parser_params structure
187 */
189
190/**
191 * Initializes the passed gengetopt_args_info structure's fields
192 * (also set default values for options that have a default)
193 * @param args_info the structure to initialize
194 */
195void cmdline_parser_init (struct gengetopt_args_info *args_info);
196/**
197 * Deallocates the string fields of the gengetopt_args_info structure
198 * (but does not deallocate the structure itself)
199 * @param args_info the structure to deallocate
200 */
201void cmdline_parser_free (struct gengetopt_args_info *args_info);
202
203/**
204 * Checks that all the required options were specified
205 * @param args_info the structure to check
206 * @param prog_name the name of the program that will be used to print
207 * possible errors
208 * @return
209 */
210int cmdline_parser_required (struct gengetopt_args_info *args_info,
211 const char *prog_name);
212
213extern const char *cmdline_parser_model_values[]; /**< @brief Possible values for model. */
214
215
216#ifdef __cplusplus
217}
218#endif /* __cplusplus */
219#endif /* HYDROCMD_H */
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Save the contents of the option struct into an already open FILE stream.
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
The command line parser.
const char * cmdline_parser_model_values[]
Possible values for model.
Definition HydroCmd.cpp:71
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
Save the contents of the option struct into a (text) file.
const char * gengetopt_args_info_purpose
the purpose string of the program
const char * gengetopt_args_info_help[]
all the lines making the help output
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
The command line parser (version with additional parameters - deprecated)
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Checks that all the required options were specified.
void cmdline_parser_print_version(void)
Print the version.
struct cmdline_parser_params * cmdline_parser_params_create(void)
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their defau...
const char * gengetopt_args_info_usage
the usage string of the program
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
The command line parser (version with additional parameters)
void cmdline_parser_init(struct gengetopt_args_info *args_info)
Initializes the passed gengetopt_args_info structure's fields (also set default values for options th...
const char * gengetopt_args_info_description
the description string of the program
void cmdline_parser_print_help(void)
Print the help.
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the struc...
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Initializes all the fields a cmdline_parser_params structure to their default values.
The additional parameters to pass to parser functions.
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
int check_required
whether to check that all required options were provided (default 1)
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
Where the command line options are stored.
double viscosity_arg
viscosity (in poise) (default='0.01').
Definition HydroCmd.hpp:67
unsigned int output_given
Whether output was given.
char * beadSize_orig
bead size (diameter) for RoughShell model (in angstroms) original value given at command line.
Definition HydroCmd.hpp:63
char * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
char * temperature_orig
temperature (in Kelvin original value given at command line.
Definition HydroCmd.hpp:71
enum enum_model model_arg
hydrodynamics model.
Definition HydroCmd.hpp:59
unsigned int msms_given
Whether msms was given.
Definition HydroCmd.hpp:79
unsigned int xyz_given
Whether xyz was given.
Definition HydroCmd.hpp:77
unsigned inputs_num
unamed options number
double beadSize_arg
bead size (diameter) for RoughShell model (in angstroms) (default='0.2').
Definition HydroCmd.hpp:62
const char * xyz_help
xyz file for AtomicBead model help description.
Definition HydroCmd.hpp:49
const char * stl_help
stl file for BoundaryElement model help description.
Definition HydroCmd.hpp:52
const char * help_help
Print help and exit help description.
int input_file_group_counter
Counter for group input_file.
Definition HydroCmd.hpp:89
const char * model_help
hydrodynamics model help description.
Definition HydroCmd.hpp:61
char * output_arg
output file name.
char ** inputs
unamed options (options without names)
const char * temperature_help
temperature (in Kelvin help description.
Definition HydroCmd.hpp:72
char * input_arg
input dump file.
unsigned int beadSize_given
Whether beadSize was given.
Definition HydroCmd.hpp:82
char * msms_orig
filename root for MSMS .vert and .face files original value given at command line.
Definition HydroCmd.hpp:54
char * xyz_orig
xyz file for AtomicBead model original value given at command line.
Definition HydroCmd.hpp:48
const char * elements_help
output the hydrodynamic elements (beads or triangles) only, hydrodynamics calculation will not be per...
Definition HydroCmd.hpp:66
double temperature_arg
temperature (in Kelvin (default='300').
Definition HydroCmd.hpp:70
const char * beadSize_help
bead size (diameter) for RoughShell model (in angstroms) help description.
Definition HydroCmd.hpp:64
unsigned int elements_given
Whether elements was given.
Definition HydroCmd.hpp:83
const char * viscosity_help
viscosity (in poise) help description.
Definition HydroCmd.hpp:69
char * stl_orig
stl file for BoundaryElement model original value given at command line.
Definition HydroCmd.hpp:51
unsigned int temperature_given
Whether temperature was given.
Definition HydroCmd.hpp:85
unsigned int stl_given
Whether stl was given.
Definition HydroCmd.hpp:78
unsigned int help_given
Whether help was given.
char * xyz_arg
xyz file for AtomicBead model.
Definition HydroCmd.hpp:47
int elements_flag
output the hydrodynamic elements (beads or triangles) only, hydrodynamics calculation will not be per...
Definition HydroCmd.hpp:65
unsigned int input_given
Whether input was given.
char * model_orig
hydrodynamics model original value given at command line.
Definition HydroCmd.hpp:60
unsigned int version_given
Whether version was given.
char * viscosity_orig
viscosity (in poise) original value given at command line.
Definition HydroCmd.hpp:68
unsigned int viscosity_given
Whether viscosity was given.
Definition HydroCmd.hpp:84
const char * version_help
Print version and exit help description.
char * input_orig
input dump file original value given at command line.
char * stl_arg
stl file for BoundaryElement model.
Definition HydroCmd.hpp:50
const char * input_help
input dump file help description.
unsigned int model_given
Whether model was given.
Definition HydroCmd.hpp:81
char * msms_arg
filename root for MSMS .vert and .face files.
Definition HydroCmd.hpp:53
const char * msms_help
filename root for MSMS .vert and .face files help description.
Definition HydroCmd.hpp:55