ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/applications/dump2Xyz/Dump2XYZCmd.h
Revision: 1871
Committed: Fri May 10 14:59:13 2013 UTC (12 years ago) by gezelter
Content type: text/plain
File size: 12066 byte(s)
Log Message:
Bugs in the FQ samples, fixed for Dump2XYZ to print out charges and electric fields

File Contents

# User Rev Content
1 gezelter 1456 /** @file Dump2XYZCmd.h
2     * @brief The header file for the command line option parser
3 gezelter 1630 * generated by GNU Gengetopt version 2.22.4
4 gezelter 1456 * 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 tim 12
8 tim 302 #ifndef DUMP2XYZCMD_H
9     #define DUMP2XYZCMD_H
10 tim 12
11     /* If we use autoconf. */
12     #ifdef HAVE_CONFIG_H
13     #include "config.h"
14     #endif
15    
16 gezelter 1456 #include <stdio.h> /* for FILE */
17    
18 tim 12 #ifdef __cplusplus
19     extern "C" {
20     #endif /* __cplusplus */
21    
22     #ifndef CMDLINE_PARSER_PACKAGE
23 gezelter 1630 /** @brief the program name (used for printing errors) */
24 tim 12 #define CMDLINE_PARSER_PACKAGE "Dump2XYZ"
25     #endif
26    
27 gezelter 1630 #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 tim 12 #ifndef CMDLINE_PARSER_VERSION
33 gezelter 1456 /** @brief the program version */
34 gezelter 1871 #define CMDLINE_PARSER_VERSION "1.0"
35 tim 12 #endif
36    
37 gezelter 1456 /** @brief Where the command line options are stored */
38 tim 543 struct gengetopt_args_info
39     {
40 gezelter 1456 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 gezelter 1871 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 chuckv 1117
92 gezelter 1456 unsigned int help_given ; /**< @brief Whether help was given. */
93     unsigned int version_given ; /**< @brief Whether version was given. */
94     unsigned int input_given ; /**< @brief Whether input was given. */
95     unsigned int output_given ; /**< @brief Whether output was given. */
96     unsigned int frame_given ; /**< @brief Whether frame was given. */
97     unsigned int water_given ; /**< @brief Whether water was given. */
98     unsigned int periodicBox_given ; /**< @brief Whether periodicBox was given. */
99     unsigned int zconstraint_given ; /**< @brief Whether zconstraint was given. */
100     unsigned int rigidbody_given ; /**< @brief Whether rigidbody was given. */
101     unsigned int watertype_given ; /**< @brief Whether watertype was given. */
102     unsigned int selection_given ; /**< @brief Whether selection was given. */
103     unsigned int originsele_given ; /**< @brief Whether originsele was given. */
104     unsigned int refsele_given ; /**< @brief Whether refsele was given. */
105     unsigned int repeatX_given ; /**< @brief Whether repeatX was given. */
106     unsigned int repeatY_given ; /**< @brief Whether repeatY was given. */
107     unsigned int repeatZ_given ; /**< @brief Whether repeatZ was given. */
108     unsigned int basetype_given ; /**< @brief Whether basetype was given. */
109     unsigned int velocities_given ; /**< @brief Whether velocities was given. */
110     unsigned int forces_given ; /**< @brief Whether forces was given. */
111     unsigned int vectors_given ; /**< @brief Whether vectors was given. */
112     unsigned int charges_given ; /**< @brief Whether charges was given. */
113 gezelter 1871 unsigned int efield_given ; /**< @brief Whether efield was given. */
114 tim 12
115 gezelter 1456 char **inputs ; /**< @brief unamed options (options without names) */
116     unsigned inputs_num ; /**< @brief unamed options number */
117 tim 543 } ;
118 tim 12
119 gezelter 1456 /** @brief The additional parameters to pass to parser functions */
120     struct cmdline_parser_params
121     {
122     int override; /**< @brief whether to override possibly already present options (default 0) */
123     int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
124     int check_required; /**< @brief whether to check that all required options were provided (default 1) */
125     int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
126     int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
127     } ;
128 tim 12
129 gezelter 1456 /** @brief the purpose string of the program */
130     extern const char *gengetopt_args_info_purpose;
131     /** @brief the usage string of the program */
132     extern const char *gengetopt_args_info_usage;
133     /** @brief all the lines making the help output */
134     extern const char *gengetopt_args_info_help[];
135    
136     /**
137     * The command line parser
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     * @return 0 if everything went fine, NON 0 if an error took place
142     */
143 gezelter 1630 int cmdline_parser (int argc, char **argv,
144 gezelter 1456 struct gengetopt_args_info *args_info);
145    
146     /**
147     * The command line parser (version with additional parameters - deprecated)
148     * @param argc the number of command line options
149     * @param argv the command line options
150     * @param args_info the structure where option information will be stored
151     * @param override whether to override possibly already present options
152     * @param initialize whether to initialize the option structure my_args_info
153     * @param check_required whether to check that all required options were provided
154     * @return 0 if everything went fine, NON 0 if an error took place
155     * @deprecated use cmdline_parser_ext() instead
156     */
157 gezelter 1630 int cmdline_parser2 (int argc, char **argv,
158 gezelter 1456 struct gengetopt_args_info *args_info,
159     int override, int initialize, int check_required);
160    
161     /**
162     * The command line parser (version with additional parameters)
163     * @param argc the number of command line options
164     * @param argv the command line options
165     * @param args_info the structure where option information will be stored
166     * @param params additional parameters for the parser
167     * @return 0 if everything went fine, NON 0 if an error took place
168     */
169 gezelter 1630 int cmdline_parser_ext (int argc, char **argv,
170 gezelter 1456 struct gengetopt_args_info *args_info,
171     struct cmdline_parser_params *params);
172    
173     /**
174     * Save the contents of the option struct into an already open FILE stream.
175     * @param outfile the stream where to dump options
176     * @param args_info the option struct to dump
177     * @return 0 if everything went fine, NON 0 if an error took place
178     */
179     int cmdline_parser_dump(FILE *outfile,
180     struct gengetopt_args_info *args_info);
181    
182     /**
183     * Save the contents of the option struct into a (text) file.
184     * This file can be read by the config file parser (if generated by gengetopt)
185     * @param filename the file where to save
186     * @param args_info the option struct to save
187     * @return 0 if everything went fine, NON 0 if an error took place
188     */
189     int cmdline_parser_file_save(const char *filename,
190     struct gengetopt_args_info *args_info);
191    
192     /**
193     * Print the help
194     */
195 tim 543 void cmdline_parser_print_help(void);
196 gezelter 1456 /**
197     * Print the version
198     */
199 tim 543 void cmdline_parser_print_version(void);
200 tim 12
201 gezelter 1456 /**
202     * Initializes all the fields a cmdline_parser_params structure
203     * to their default values
204     * @param params the structure to initialize
205     */
206     void cmdline_parser_params_init(struct cmdline_parser_params *params);
207    
208     /**
209     * Allocates dynamically a cmdline_parser_params structure and initializes
210     * all its fields to their default values
211     * @return the created and initialized cmdline_parser_params structure
212     */
213     struct cmdline_parser_params *cmdline_parser_params_create(void);
214    
215     /**
216     * Initializes the passed gengetopt_args_info structure's fields
217     * (also set default values for options that have a default)
218     * @param args_info the structure to initialize
219     */
220 chuckv 1117 void cmdline_parser_init (struct gengetopt_args_info *args_info);
221 gezelter 1456 /**
222     * Deallocates the string fields of the gengetopt_args_info structure
223     * (but does not deallocate the structure itself)
224     * @param args_info the structure to deallocate
225     */
226 chuckv 1117 void cmdline_parser_free (struct gengetopt_args_info *args_info);
227    
228 gezelter 1456 /**
229     * Checks that all the required options were specified
230     * @param args_info the structure to check
231     * @param prog_name the name of the program that will be used to print
232     * possible errors
233     * @return
234     */
235     int cmdline_parser_required (struct gengetopt_args_info *args_info,
236     const char *prog_name);
237 chuckv 1117
238    
239 tim 12 #ifdef __cplusplus
240     }
241     #endif /* __cplusplus */
242 tim 302 #endif /* DUMP2XYZCMD_H */

Properties

Name Value
svn:keywords Author Id Revision Date