OpenMD 3.0
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
omd2omdCmd.hpp
Go to the documentation of this file.
1/** @file omd2omdCmd.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 OMD2OMDCMD_H
9#define OMD2OMDCMD_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 "omd2omd"
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 "omd2omd"
30#endif
31
32#ifndef CMDLINE_PARSER_VERSION
33/** @brief the program version */
34#define CMDLINE_PARSER_VERSION ""
35#endif
36
37/** @brief Where the command line options are stored */
39{
40 const char *help_help; /**< @brief Print help and exit help description. */
41 const char *version_help; /**< @brief Print version and exit help description. */
42 char * input_arg; /**< @brief use specified input (.omd, .dump, .eor) file. */
43 char * input_orig; /**< @brief use specified input (.omd, .dump, .eor) file original value given at command line. */
44 const char *input_help; /**< @brief use specified input (.omd, .dump, .eor) file help description. */
45 char * output_arg; /**< @brief use specified output file. */
46 char * output_orig; /**< @brief use specified output file original value given at command line. */
47 const char *output_help; /**< @brief use specified output file help description. */
48 int repeatX_arg; /**< @brief make the system repeat in the x direction (default='1'). */
49 char * repeatX_orig; /**< @brief make the system repeat in the x direction original value given at command line. */
50 const char *repeatX_help; /**< @brief make the system repeat in the x direction help description. */
51 int repeatY_arg; /**< @brief make the system repeat in the y direction (default='1'). */
52 char * repeatY_orig; /**< @brief make the system repeat in the y direction original value given at command line. */
53 const char *repeatY_help; /**< @brief make the system repeat in the y direction help description. */
54 int repeatZ_arg; /**< @brief make the system repeat in the z direction (default='1'). */
55 char * repeatZ_orig; /**< @brief make the system repeat in the z direction original value given at command line. */
56 const char *repeatZ_help; /**< @brief make the system repeat in the z direction help description. */
57 double translateX_arg; /**< @brief translate all x coordinates by some amount (default='0.0'). */
58 char * translateX_orig; /**< @brief translate all x coordinates by some amount original value given at command line. */
59 const char *translateX_help; /**< @brief translate all x coordinates by some amount help description. */
60 double translateY_arg; /**< @brief translate all y coordinates by some amount (default='0.0'). */
61 char * translateY_orig; /**< @brief translate all y coordinates by some amount original value given at command line. */
62 const char *translateY_help; /**< @brief translate all y coordinates by some amount help description. */
63 double translateZ_arg; /**< @brief translate all z coordinates by some amount (default='0.0'). */
64 char * translateZ_orig; /**< @brief translate all z coordinates by some amount original value given at command line. */
65 const char *translateZ_help; /**< @brief translate all z coordinates by some amount help description. */
66 double rotatePhi_arg; /**< @brief rotate all coordinates Euler angle Phi (default='0.0'). */
67 char * rotatePhi_orig; /**< @brief rotate all coordinates Euler angle Phi original value given at command line. */
68 const char *rotatePhi_help; /**< @brief rotate all coordinates Euler angle Phi help description. */
69 double rotateTheta_arg; /**< @brief rotate all coordinates Euler angle Theta (default='0.0'). */
70 char * rotateTheta_orig; /**< @brief rotate all coordinates Euler angle Theta original value given at command line. */
71 const char *rotateTheta_help; /**< @brief rotate all coordinates Euler angle Theta help description. */
72 double rotatePsi_arg; /**< @brief rotate all coordinates Euler angle Psi (default='0.0'). */
73 char * rotatePsi_orig; /**< @brief rotate all coordinates Euler angle Psi original value given at command line. */
74 const char *rotatePsi_help; /**< @brief rotate all coordinates Euler angle Psi help description. */
75 int repairMolecules_arg; /**< @brief rewrap molecules around the molecular center of mass (default='1'). */
76 char * repairMolecules_orig; /**< @brief rewrap molecules around the molecular center of mass original value given at command line. */
77 const char *repairMolecules_help; /**< @brief rewrap molecules around the molecular center of mass help description. */
78
79 unsigned int help_given ; /**< @brief Whether help was given. */
80 unsigned int version_given ; /**< @brief Whether version was given. */
81 unsigned int input_given ; /**< @brief Whether input was given. */
82 unsigned int output_given ; /**< @brief Whether output was given. */
83 unsigned int repeatX_given ; /**< @brief Whether repeatX was given. */
84 unsigned int repeatY_given ; /**< @brief Whether repeatY was given. */
85 unsigned int repeatZ_given ; /**< @brief Whether repeatZ was given. */
86 unsigned int translateX_given ; /**< @brief Whether translateX was given. */
87 unsigned int translateY_given ; /**< @brief Whether translateY was given. */
88 unsigned int translateZ_given ; /**< @brief Whether translateZ was given. */
89 unsigned int rotatePhi_given ; /**< @brief Whether rotatePhi was given. */
90 unsigned int rotateTheta_given ; /**< @brief Whether rotateTheta was given. */
91 unsigned int rotatePsi_given ; /**< @brief Whether rotatePsi was given. */
92 unsigned int repairMolecules_given ; /**< @brief Whether repairMolecules was given. */
93
94 char **inputs ; /**< @brief unnamed options (options without names) */
95 unsigned inputs_num ; /**< @brief unnamed options number */
96} ;
97
98/** @brief The additional parameters to pass to parser functions */
100{
101 int override; /**< @brief whether to override possibly already present options (default 0) */
102 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
103 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
104 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
105 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
106} ;
107
108/** @brief the purpose string of the program */
109extern const char *gengetopt_args_info_purpose;
110/** @brief the usage string of the program */
111extern const char *gengetopt_args_info_usage;
112/** @brief the description string of the program */
113extern const char *gengetopt_args_info_description;
114/** @brief all the lines making the help output */
115extern const char *gengetopt_args_info_help[];
116
117/**
118 * The command line parser
119 * @param argc the number of command line options
120 * @param argv the command line options
121 * @param args_info the structure where option information will be stored
122 * @return 0 if everything went fine, NON 0 if an error took place
123 */
124int cmdline_parser (int argc, char **argv,
125 struct gengetopt_args_info *args_info);
126
127/**
128 * The command line parser (version with additional parameters - deprecated)
129 * @param argc the number of command line options
130 * @param argv the command line options
131 * @param args_info the structure where option information will be stored
132 * @param override whether to override possibly already present options
133 * @param initialize whether to initialize the option structure my_args_info
134 * @param check_required whether to check that all required options were provided
135 * @return 0 if everything went fine, NON 0 if an error took place
136 * @deprecated use cmdline_parser_ext() instead
137 */
138int cmdline_parser2 (int argc, char **argv,
139 struct gengetopt_args_info *args_info,
140 int override, int initialize, int check_required);
141
142/**
143 * The command line parser (version with additional parameters)
144 * @param argc the number of command line options
145 * @param argv the command line options
146 * @param args_info the structure where option information will be stored
147 * @param params additional parameters for the parser
148 * @return 0 if everything went fine, NON 0 if an error took place
149 */
150int cmdline_parser_ext (int argc, char **argv,
151 struct gengetopt_args_info *args_info,
152 struct cmdline_parser_params *params);
153
154/**
155 * Save the contents of the option struct into an already open FILE stream.
156 * @param outfile the stream where to dump options
157 * @param args_info the option struct to dump
158 * @return 0 if everything went fine, NON 0 if an error took place
159 */
160int cmdline_parser_dump(FILE *outfile,
161 struct gengetopt_args_info *args_info);
162
163/**
164 * Save the contents of the option struct into a (text) file.
165 * This file can be read by the config file parser (if generated by gengetopt)
166 * @param filename the file where to save
167 * @param args_info the option struct to save
168 * @return 0 if everything went fine, NON 0 if an error took place
169 */
170int cmdline_parser_file_save(const char *filename,
171 struct gengetopt_args_info *args_info);
172
173/**
174 * Print the help
175 */
177/**
178 * Print the version
179 */
181
182/**
183 * Initializes all the fields a cmdline_parser_params structure
184 * to their default values
185 * @param params the structure to initialize
186 */
188
189/**
190 * Allocates dynamically a cmdline_parser_params structure and initializes
191 * all its fields to their default values
192 * @return the created and initialized cmdline_parser_params structure
193 */
195
196/**
197 * Initializes the passed gengetopt_args_info structure's fields
198 * (also set default values for options that have a default)
199 * @param args_info the structure to initialize
200 */
201void cmdline_parser_init (struct gengetopt_args_info *args_info);
202/**
203 * Deallocates the string fields of the gengetopt_args_info structure
204 * (but does not deallocate the structure itself)
205 * @param args_info the structure to deallocate
206 */
207void cmdline_parser_free (struct gengetopt_args_info *args_info);
208
209/**
210 * Checks that all the required options were specified
211 * @param args_info the structure to check
212 * @param prog_name the name of the program that will be used to print
213 * possible errors
214 * @return
215 */
216int cmdline_parser_required (struct gengetopt_args_info *args_info,
217 const char *prog_name);
218
219
220#ifdef __cplusplus
221}
222#endif /* __cplusplus */
223#endif /* OMD2OMDCMD_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.
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 translateY_arg
translate all y coordinates by some amount (default='0.0').
int repeatY_arg
The number of images to repeat in the y direction (default='0').
const char * rotatePsi_help
rotate all coordinates Euler angle Psi help description.
unsigned int output_given
Whether output was given.
double translateZ_arg
translate all z coordinates by some amount (default='0.0').
char * rotateTheta_orig
rotate all coordinates Euler angle Theta original value given at command line.
unsigned int repeatY_given
Whether repeatY was given.
char * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
char * repeatX_orig
The number of images to repeat in the x direction original value given at command line.
char * translateY_orig
translate all y coordinates by some amount original value given at command line.
unsigned int repeatX_given
Whether repeatX was given.
int repeatX_arg
The number of images to repeat in the x direction (default='0').
char * repairMolecules_orig
rewrap molecules around the molecular center of mass original value given at command line.
char * translateX_orig
translate all x coordinates by some amount original value given at command line.
const char * repeatY_help
The number of images to repeat in the y direction help description.
double rotateTheta_arg
rotate all coordinates Euler angle Theta (default='0.0').
unsigned inputs_num
unamed options number
char * rotatePsi_orig
rotate all coordinates Euler angle Psi original value given at command line.
const char * repeatX_help
The number of images to repeat in the x direction help description.
unsigned int repairMolecules_given
Whether repairMolecules was given.
const char * translateX_help
translate all x coordinates by some amount help description.
int repairMolecules_arg
rewrap molecules around the molecular center of mass (default='1').
const char * help_help
Print help and exit help description.
char * output_arg
output file name.
char * repeatZ_orig
The number of images to repeat in the z direction original value given at command line.
const char * translateZ_help
translate all z coordinates by some amount help description.
char ** inputs
unamed options (options without names)
const char * translateY_help
translate all y coordinates by some amount help description.
char * input_arg
input dump file.
int repeatZ_arg
The number of images to repeat in the z direction (default='0').
unsigned int rotatePhi_given
Whether rotatePhi was given.
unsigned int repeatZ_given
Whether repeatZ was given.
unsigned int translateY_given
Whether translateY was given.
char * repeatY_orig
The number of images to repeat in the y direction original value given at command line.
double rotatePhi_arg
rotate all coordinates Euler angle Phi (default='0.0').
unsigned int help_given
Whether help was given.
unsigned int rotateTheta_given
Whether rotateTheta was given.
const char * repeatZ_help
The number of images to repeat in the z direction help description.
unsigned int rotatePsi_given
Whether rotatePsi was given.
unsigned int input_given
Whether input was given.
unsigned int translateX_given
Whether translateX was given.
char * translateZ_orig
translate all z coordinates by some amount original value given at command line.
const char * repairMolecules_help
rewrap molecules around the molecular center of mass help description.
unsigned int version_given
Whether version was given.
const char * version_help
Print version and exit help description.
char * input_orig
input dump file original value given at command line.
char * rotatePhi_orig
rotate all coordinates Euler angle Phi original value given at command line.
const char * rotateTheta_help
rotate all coordinates Euler angle Theta help description.
double rotatePsi_arg
rotate all coordinates Euler angle Psi (default='0.0').
const char * rotatePhi_help
rotate all coordinates Euler angle Phi help description.
double translateX_arg
translate all x coordinates by some amount (default='0.0').
const char * input_help
input dump file help description.
unsigned int translateZ_given
Whether translateZ was given.