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