OpenMD 3.1
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 int noWrap_flag; /**< @brief do not rewrap coordinates into the box (default=off). */
79 const char *noWrap_help; /**< @brief do not rewrap coordinates into the box help description. */
80 int noCOM_flag; /**< @brief do not use Center of Mass as origin of the box (default=off). */
81 const char *noCOM_help; /**< @brief do not use Center of Mass as origin of the box help description. */
82
83 unsigned int help_given ; /**< @brief Whether help was given. */
84 unsigned int version_given ; /**< @brief Whether version was given. */
85 unsigned int input_given ; /**< @brief Whether input was given. */
86 unsigned int output_given ; /**< @brief Whether output was given. */
87 unsigned int repeatX_given ; /**< @brief Whether repeatX was given. */
88 unsigned int repeatY_given ; /**< @brief Whether repeatY was given. */
89 unsigned int repeatZ_given ; /**< @brief Whether repeatZ was given. */
90 unsigned int translateX_given ; /**< @brief Whether translateX was given. */
91 unsigned int translateY_given ; /**< @brief Whether translateY was given. */
92 unsigned int translateZ_given ; /**< @brief Whether translateZ was given. */
93 unsigned int rotatePhi_given ; /**< @brief Whether rotatePhi was given. */
94 unsigned int rotateTheta_given ; /**< @brief Whether rotateTheta was given. */
95 unsigned int rotatePsi_given ; /**< @brief Whether rotatePsi was given. */
96 unsigned int repairMolecules_given ; /**< @brief Whether repairMolecules was given. */
97 unsigned int noWrap_given ; /**< @brief Whether noWrap was given. */
98 unsigned int noCOM_given ; /**< @brief Whether noCOM was given. */
99
100 char **inputs ; /**< @brief unnamed options (options without names) */
101 unsigned inputs_num ; /**< @brief unnamed options number */
102} ;
103
104/** @brief The additional parameters to pass to parser functions */
106{
107 int override; /**< @brief whether to override possibly already present options (default 0) */
108 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
109 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
110 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
111 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
112} ;
113
114/** @brief the purpose string of the program */
115extern const char *gengetopt_args_info_purpose;
116/** @brief the usage string of the program */
117extern const char *gengetopt_args_info_usage;
118/** @brief the description string of the program */
119extern const char *gengetopt_args_info_description;
120/** @brief all the lines making the help output */
121extern const char *gengetopt_args_info_help[];
122
123/**
124 * The command line parser
125 * @param argc the number of command line options
126 * @param argv the command line options
127 * @param args_info the structure where option information will be stored
128 * @return 0 if everything went fine, NON 0 if an error took place
129 */
130int cmdline_parser (int argc, char **argv,
131 struct gengetopt_args_info *args_info);
132
133/**
134 * The command line parser (version with additional parameters - deprecated)
135 * @param argc the number of command line options
136 * @param argv the command line options
137 * @param args_info the structure where option information will be stored
138 * @param override whether to override possibly already present options
139 * @param initialize whether to initialize the option structure my_args_info
140 * @param check_required whether to check that all required options were provided
141 * @return 0 if everything went fine, NON 0 if an error took place
142 * @deprecated use cmdline_parser_ext() instead
143 */
144int cmdline_parser2 (int argc, char **argv,
145 struct gengetopt_args_info *args_info,
146 int override, int initialize, int check_required);
147
148/**
149 * The command line parser (version with additional parameters)
150 * @param argc the number of command line options
151 * @param argv the command line options
152 * @param args_info the structure where option information will be stored
153 * @param params additional parameters for the parser
154 * @return 0 if everything went fine, NON 0 if an error took place
155 */
156int cmdline_parser_ext (int argc, char **argv,
157 struct gengetopt_args_info *args_info,
158 struct cmdline_parser_params *params);
159
160/**
161 * Save the contents of the option struct into an already open FILE stream.
162 * @param outfile the stream where to dump options
163 * @param args_info the option struct to dump
164 * @return 0 if everything went fine, NON 0 if an error took place
165 */
166int cmdline_parser_dump(FILE *outfile,
167 struct gengetopt_args_info *args_info);
168
169/**
170 * Save the contents of the option struct into a (text) file.
171 * This file can be read by the config file parser (if generated by gengetopt)
172 * @param filename the file where to save
173 * @param args_info the option struct to save
174 * @return 0 if everything went fine, NON 0 if an error took place
175 */
176int cmdline_parser_file_save(const char *filename,
177 struct gengetopt_args_info *args_info);
178
179/**
180 * Print the help
181 */
183/**
184 * Print the version
185 */
187
188/**
189 * Initializes all the fields a cmdline_parser_params structure
190 * to their default values
191 * @param params the structure to initialize
192 */
194
195/**
196 * Allocates dynamically a cmdline_parser_params structure and initializes
197 * all its fields to their default values
198 * @return the created and initialized cmdline_parser_params structure
199 */
201
202/**
203 * Initializes the passed gengetopt_args_info structure's fields
204 * (also set default values for options that have a default)
205 * @param args_info the structure to initialize
206 */
207void cmdline_parser_init (struct gengetopt_args_info *args_info);
208/**
209 * Deallocates the string fields of the gengetopt_args_info structure
210 * (but does not deallocate the structure itself)
211 * @param args_info the structure to deallocate
212 */
213void cmdline_parser_free (struct gengetopt_args_info *args_info);
214
215/**
216 * Checks that all the required options were specified
217 * @param args_info the structure to check
218 * @param prog_name the name of the program that will be used to print
219 * possible errors
220 * @return
221 */
222int cmdline_parser_required (struct gengetopt_args_info *args_info,
223 const char *prog_name);
224
225
226#ifdef __cplusplus
227}
228#endif /* __cplusplus */
229#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').
unsigned int noCOM_given
Whether noCOM was given.
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').
int noCOM_flag
do not use Center of Mass as origin of the box (default=off).
char * rotateTheta_orig
rotate all coordinates Euler angle Theta original value given at command line.
unsigned int noWrap_given
Whether noWrap was given.
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.
int noWrap_flag
do not rewrap coordinates into the box (default=off).
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.
const char * noWrap_help
do not rewrap coordinates into the box help description.
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 * noCOM_help
do not use Center of Mass as origin of the box help description.
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.