21#define FIX_UNUSED(X) (void) (X)
27const char *gengetopt_args_info_purpose =
"Converts an OpenMD dump file into a file suitable for viewing in a\nmolecular dynamics viewer like Jmol or VMD";
29const char *gengetopt_args_info_usage =
"Usage: Dump2XYZ [OPTIONS]... [FILES]...";
31const char *gengetopt_args_info_versiontext =
"";
33const char *gengetopt_args_info_description =
"";
35const char *gengetopt_args_info_help[] = {
36 " -h, --help Print help and exit",
37 " -V, --version Print version and exit",
38 " -i, --input=filename input dump file (mandatory)",
39 " -o, --output=filename output file name",
40 " -n, --frame=INT print every n frame (default=`1')",
41 " -w, --water skip the the waters (default=off)",
42 " -m, --periodicBox map to the periodic box (default=off)",
43 " -z, --zconstraint replace the atom types of zconstraint molecules\n (default=off)",
44 " -r, --rigidbody add a pseudo COM atom to rigidbody\n (default=off)",
45 " -t, --watertype replace the atom type of water model\n (default=on)",
46 " -s, --selection=selection script\n general selection syntax",
47 " --originsele=selection script\n select origin",
48 " --refsele=selection script\n select reference",
49 " --repeatX=INT The number of images to repeat in the x\n direction (default=`0')",
50 " --repeatY=INT The number of images to repeat in the y\n direction (default=`0')",
51 " --repeatZ=INT The number of images to repeat in the z\n direction (default=`0')",
52 " -b, --basetype Convert to base atom type (default=off)",
53 " -v, --velocities Print velocities in xyz file (default=off)",
54 " -f, --forces Print forces xyz file (default=off)",
55 " -u, --vectors Print vectors (dipoles, etc) in xyz file\n (default=off)",
56 " -c, --charges Print charges in xyz file (default=off)",
57 " -e, --efield Print electric field vector in xyz file\n (default=off)",
58 " -g, --globalID Print global ID in xyz file (default=off)",
66} cmdline_parser_arg_type;
78cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error);
81gengetopt_strdup (
const char *s);
114 FIX_UNUSED (args_info);
153 args_info->
help_help = gengetopt_args_info_help[0] ;
155 args_info->
input_help = gengetopt_args_info_help[2] ;
156 args_info->
output_help = gengetopt_args_info_help[3] ;
157 args_info->
frame_help = gengetopt_args_info_help[4] ;
158 args_info->
water_help = gengetopt_args_info_help[5] ;
165 args_info->
refsele_help = gengetopt_args_info_help[12] ;
166 args_info->
repeatX_help = gengetopt_args_info_help[13] ;
167 args_info->
repeatY_help = gengetopt_args_info_help[14] ;
168 args_info->
repeatZ_help = gengetopt_args_info_help[15] ;
171 args_info->
forces_help = gengetopt_args_info_help[18] ;
172 args_info->
vectors_help = gengetopt_args_info_help[19] ;
173 args_info->
charges_help = gengetopt_args_info_help[20] ;
174 args_info->
efield_help = gengetopt_args_info_help[21] ;
180cmdline_parser_print_version (
void)
186 if (strlen(gengetopt_args_info_versiontext) > 0)
187 printf(
"\n%s\n", gengetopt_args_info_versiontext);
190static void print_help_common(
void) {
191 cmdline_parser_print_version ();
193 if (strlen(gengetopt_args_info_purpose) > 0)
194 printf(
"\n%s\n", gengetopt_args_info_purpose);
196 if (strlen(gengetopt_args_info_usage) > 0)
197 printf(
"\n%s\n", gengetopt_args_info_usage);
201 if (strlen(gengetopt_args_info_description) > 0)
202 printf(
"%s\n\n", gengetopt_args_info_description);
206cmdline_parser_print_help (
void)
210 while (gengetopt_args_info_help[i])
211 printf(
"%s\n", gengetopt_args_info_help[i++]);
217 clear_given (args_info);
218 clear_args (args_info);
219 init_args_info (args_info);
248free_string_field (
char **s)
262 free_string_field (&(args_info->
input_arg));
279 free (args_info->
inputs [i]);
284 clear_given (args_info);
289write_into_file(FILE *outfile,
const char *opt,
const char *arg,
const char *values[])
293 fprintf(outfile,
"%s=\"%s\"\n", opt, arg);
295 fprintf(outfile,
"%s\n", opt);
312 write_into_file(outfile,
"help", 0, 0 );
314 write_into_file(outfile,
"version", 0, 0 );
316 write_into_file(outfile,
"input", args_info->
input_orig, 0);
318 write_into_file(outfile,
"output", args_info->
output_orig, 0);
320 write_into_file(outfile,
"frame", args_info->
frame_orig, 0);
322 write_into_file(outfile,
"water", 0, 0 );
324 write_into_file(outfile,
"periodicBox", 0, 0 );
326 write_into_file(outfile,
"zconstraint", 0, 0 );
328 write_into_file(outfile,
"rigidbody", 0, 0 );
330 write_into_file(outfile,
"watertype", 0, 0 );
332 write_into_file(outfile,
"selection", args_info->
selection_orig, 0);
336 write_into_file(outfile,
"refsele", args_info->
refsele_orig, 0);
338 write_into_file(outfile,
"repeatX", args_info->
repeatX_orig, 0);
340 write_into_file(outfile,
"repeatY", args_info->
repeatY_orig, 0);
342 write_into_file(outfile,
"repeatZ", args_info->
repeatZ_orig, 0);
344 write_into_file(outfile,
"basetype", 0, 0 );
346 write_into_file(outfile,
"velocities", 0, 0 );
348 write_into_file(outfile,
"forces", 0, 0 );
350 write_into_file(outfile,
"vectors", 0, 0 );
352 write_into_file(outfile,
"charges", 0, 0 );
354 write_into_file(outfile,
"efield", 0, 0 );
356 write_into_file(outfile,
"globalID", 0, 0 );
369 outfile = fopen(filename,
"w");
386 cmdline_parser_release (args_info);
391gengetopt_strdup (
const char *s)
397 result = (
char*)malloc(strlen(s) + 1);
398 if (result == (
char*)0)
415 result = cmdline_parser_internal (argc, argv, args_info, params, 0);
432 result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0);
440 int result = EXIT_SUCCESS;
442 if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
443 result = EXIT_FAILURE;
449cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error)
451 int error_occurred = 0;
452 FIX_UNUSED (additional_error);
457 fprintf (stderr,
"%s: '--input' ('-i') option required%s\n", prog_name, (additional_error ? additional_error :
""));
464 return error_occurred;
522#ifndef required_argument
523#define required_argument 1
526#ifndef optional_argument
527#define optional_argument 2
530struct custom_getopt_data {
572static char *custom_optarg;
589static int custom_optind = 1;
595static int custom_opterr = 1;
601static int custom_optopt =
'?';
611static void exchange(
char **argv,
struct custom_getopt_data *d)
613 int bottom = d->first_nonopt;
614 int middle = d->last_nonopt;
615 int top = d->custom_optind;
624 while (top > middle && middle > bottom) {
625 if (top - middle > middle - bottom) {
627 int len = middle - bottom;
631 for (i = 0; i < len; i++) {
632 tem = argv[bottom + i];
634 argv[top - (middle - bottom) + i];
635 argv[top - (middle - bottom) + i] = tem;
641 int len = top - middle;
645 for (i = 0; i < len; i++) {
646 tem = argv[bottom + i];
647 argv[bottom + i] = argv[middle + i];
648 argv[middle + i] = tem;
655 d->first_nonopt += (d->custom_optind - d->last_nonopt);
656 d->last_nonopt = d->custom_optind;
660static void custom_getopt_initialize(
struct custom_getopt_data *d)
667 d->first_nonopt = d->last_nonopt = d->custom_optind;
672#define NONOPTION_P (argv[d->custom_optind][0] != '-' || argv[d->custom_optind][1] == '\0')
675static int shuffle_argv(
int argc,
char *
const *argv,
const struct option *longopts,
676 struct custom_getopt_data *d)
682 if (d->last_nonopt > d->custom_optind)
683 d->last_nonopt = d->custom_optind;
684 if (d->first_nonopt > d->custom_optind)
685 d->first_nonopt = d->custom_optind;
690 if (d->first_nonopt != d->last_nonopt &&
691 d->last_nonopt != d->custom_optind)
692 exchange((
char **) argv, d);
693 else if (d->last_nonopt != d->custom_optind)
694 d->first_nonopt = d->custom_optind;
699 while (d->custom_optind < argc && NONOPTION_P)
701 d->last_nonopt = d->custom_optind;
707 if (d->custom_optind != argc && !strcmp(argv[d->custom_optind],
"--")) {
709 if (d->first_nonopt != d->last_nonopt
710 && d->last_nonopt != d->custom_optind)
711 exchange((
char **) argv, d);
712 else if (d->first_nonopt == d->last_nonopt)
713 d->first_nonopt = d->custom_optind;
714 d->last_nonopt = argc;
715 d->custom_optind = argc;
721 if (d->custom_optind == argc) {
726 if (d->first_nonopt != d->last_nonopt)
727 d->custom_optind = d->first_nonopt;
735 d->custom_optarg = argv[d->custom_optind++];
742 d->nextchar = (argv[d->custom_optind] + 1 + (longopts != NULL && argv[d->custom_optind][1] ==
'-'));
756static int check_long_opt(
int argc,
char *
const *argv,
const char *optstring,
757 const struct option *longopts,
int *longind,
758 int print_errors,
struct custom_getopt_data *d)
761 const struct option *p;
762 const struct option *pfound = NULL;
768 for (nameend = d->nextchar; *nameend && *nameend !=
'='; nameend++)
772 for (p = longopts, option_index = 0; p->name; p++, option_index++)
773 if (!strncmp(p->name, d->nextchar, nameend - d->nextchar)) {
774 if ((
unsigned int) (nameend - d->nextchar)
775 == (
unsigned int) strlen(p->name)) {
778 indfound = option_index;
781 }
else if (pfound == NULL) {
784 indfound = option_index;
785 }
else if (pfound->has_arg != p->has_arg
786 || pfound->flag != p->flag
787 || pfound->val != p->val)
791 if (ambig && !exact) {
794 "%s: option `%s' is ambiguous\n",
795 argv[0], argv[d->custom_optind]);
797 d->nextchar += strlen(d->nextchar);
799 d->custom_optopt = 0;
803 option_index = indfound;
806 if (pfound->has_arg != no_argument)
807 d->custom_optarg = nameend + 1;
810 if (argv[d->custom_optind - 1][1] ==
'-') {
812 fprintf(stderr,
"%s: option `--%s' doesn't allow an argument\n",
813 argv[0], pfound->name);
816 fprintf(stderr,
"%s: option `%c%s' doesn't allow an argument\n",
817 argv[0], argv[d->custom_optind - 1][0], pfound->name);
821 d->nextchar += strlen(d->nextchar);
822 d->custom_optopt = pfound->val;
825 }
else if (pfound->has_arg == required_argument) {
826 if (d->custom_optind < argc)
827 d->custom_optarg = argv[d->custom_optind++];
831 "%s: option `%s' requires an argument\n",
833 argv[d->custom_optind - 1]);
835 d->nextchar += strlen(d->nextchar);
836 d->custom_optopt = pfound->val;
837 return optstring[0] ==
':' ?
':' :
'?';
840 d->nextchar += strlen(d->nextchar);
842 *longind = option_index;
844 *(pfound->flag) = pfound->val;
855 if (argv[d->custom_optind][1] ==
'-') {
858 "%s: unrecognized option `--%s'\n",
859 argv[0], d->nextchar);
863 "%s: unrecognized option `%c%s'\n",
864 argv[0], argv[d->custom_optind][0],
868 d->nextchar = (
char *)
"";
870 d->custom_optopt = 0;
874static int check_short_opt(
int argc,
char *
const *argv,
const char *optstring,
875 int print_errors,
struct custom_getopt_data *d)
877 char c = *d->nextchar++;
878 const char *temp = strchr(optstring, c);
881 if (*d->nextchar ==
'\0')
883 if (!temp || c ==
':') {
885 fprintf(stderr,
"%s: invalid option -- %c\n", argv[0], c);
887 d->custom_optopt = c;
890 if (temp[1] ==
':') {
891 if (temp[2] ==
':') {
893 if (*d->nextchar !=
'\0') {
894 d->custom_optarg = d->nextchar;
897 d->custom_optarg = NULL;
901 if (*d->nextchar !=
'\0') {
902 d->custom_optarg = d->nextchar;
909 }
else if (d->custom_optind == argc) {
912 "%s: option requires an argument -- %c\n",
915 d->custom_optopt = c;
916 if (optstring[0] ==
':')
926 d->custom_optarg = argv[d->custom_optind++];
1003static int getopt_internal_r(
int argc,
char *
const *argv,
const char *optstring,
1004 const struct option *longopts,
int *longind,
1005 struct custom_getopt_data *d)
1007 int ret, print_errors = d->custom_opterr;
1009 if (optstring[0] ==
':')
1013 d->custom_optarg = NULL;
1019 if (d->custom_optind == 0 || !d->initialized) {
1020 if (d->custom_optind == 0)
1021 d->custom_optind = 1;
1022 custom_getopt_initialize(d);
1024 if (d->nextchar == NULL || *d->nextchar ==
'\0') {
1025 ret = shuffle_argv(argc, argv, longopts, d);
1029 if (longopts && (argv[d->custom_optind][1] ==
'-' ))
1030 return check_long_opt(argc, argv, optstring, longopts,
1031 longind, print_errors, d);
1032 return check_short_opt(argc, argv, optstring, print_errors, d);
1035static int custom_getopt_internal(
int argc,
char *
const *argv,
const char *optstring,
1036 const struct option *longopts,
int *longind)
1040 static struct custom_getopt_data d;
1042 d.custom_optind = custom_optind;
1043 d.custom_opterr = custom_opterr;
1044 result = getopt_internal_r(argc, argv, optstring, longopts,
1046 custom_optind = d.custom_optind;
1047 custom_optarg = d.custom_optarg;
1048 custom_optopt = d.custom_optopt;
1052static int custom_getopt_long (
int argc,
char *
const *argv,
const char *options,
1053 const struct option *long_options,
int *opt_index)
1055 return custom_getopt_internal(argc, argv, options, long_options,
1060static char *package_name = 0;
1081int update_arg(
void *field,
char **orig_field,
1082 unsigned int *field_given,
unsigned int *prev_given,
1083 char *value,
const char *possible_values[],
1084 const char *default_value,
1085 cmdline_parser_arg_type arg_type,
1086 int check_ambiguity,
int override,
1087 int no_free,
int multiple_option,
1088 const char *long_opt,
char short_opt,
1089 const char *additional_error)
1091 char *stop_char = 0;
1092 const char *val = value;
1094 char **string_field;
1100 if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
1102 if (short_opt !=
'-')
1103 fprintf (stderr,
"%s: `--%s' (`-%c') option given more than once%s\n",
1104 package_name, long_opt, short_opt,
1105 (additional_error ? additional_error :
""));
1107 fprintf (stderr,
"%s: `--%s' option given more than once%s\n",
1108 package_name, long_opt,
1109 (additional_error ? additional_error :
""));
1113 FIX_UNUSED (default_value);
1115 if (field_given && *field_given && !
override)
1121 if (possible_values)
1122 val = possible_values[found];
1126 *((
int *)field) = !*((
int *)field);
1129 if (val) *((
int *)field) = strtol (val, &stop_char, 0);
1133 string_field = (
char **)field;
1134 if (!no_free && *string_field)
1135 free (*string_field);
1136 *string_field = gengetopt_strdup (val);
1146 if (val && !(stop_char && *stop_char ==
'\0')) {
1147 fprintf(stderr,
"%s: invalid numeric value: %s\n", package_name, val);
1161 if (value && orig_field) {
1163 *orig_field = value;
1167 *orig_field = gengetopt_strdup (value);
1177cmdline_parser_internal (
1183 int error_occurred = 0;
1189 int check_ambiguity;
1196 package_name = argv[0];
1215 int option_index = 0;
1217 static struct option long_options[] = {
1218 {
"help", 0, NULL,
'h' },
1219 {
"version", 0, NULL,
'V' },
1220 {
"input", 1, NULL,
'i' },
1221 {
"output", 1, NULL,
'o' },
1222 {
"frame", 1, NULL,
'n' },
1223 {
"water", 0, NULL,
'w' },
1224 {
"periodicBox", 0, NULL,
'm' },
1225 {
"zconstraint", 0, NULL,
'z' },
1226 {
"rigidbody", 0, NULL,
'r' },
1227 {
"watertype", 0, NULL,
't' },
1228 {
"selection", 1, NULL,
's' },
1229 {
"originsele", 1, NULL, 0 },
1230 {
"refsele", 1, NULL, 0 },
1231 {
"repeatX", 1, NULL, 0 },
1232 {
"repeatY", 1, NULL, 0 },
1233 {
"repeatZ", 1, NULL, 0 },
1234 {
"basetype", 0, NULL,
'b' },
1235 {
"velocities", 0, NULL,
'v' },
1236 {
"forces", 0, NULL,
'f' },
1237 {
"vectors", 0, NULL,
'u' },
1238 {
"charges", 0, NULL,
'c' },
1239 {
"efield", 0, NULL,
'e' },
1240 {
"globalID", 0, NULL,
'g' },
1244 custom_optarg = optarg;
1245 custom_optind = optind;
1246 custom_opterr = opterr;
1247 custom_optopt = optopt;
1249 c = custom_getopt_long (argc, argv,
"hVi:o:n:wmzrts:bvfuceg", long_options, &option_index);
1251 optarg = custom_optarg;
1252 optind = custom_optind;
1253 opterr = custom_opterr;
1254 optopt = custom_optopt;
1261 cmdline_parser_print_help ();
1262 cmdline_parser_free (&local_args_info);
1263 exit (EXIT_SUCCESS);
1266 cmdline_parser_print_version ();
1267 cmdline_parser_free (&local_args_info);
1268 exit (EXIT_SUCCESS);
1273 if (update_arg( (
void *)&(args_info->
input_arg),
1275 &(local_args_info.input_given), optarg, 0, 0, ARG_STRING,
1276 check_ambiguity,
override, 0, 0,
1285 if (update_arg( (
void *)&(args_info->
output_arg),
1287 &(local_args_info.output_given), optarg, 0, 0, ARG_STRING,
1288 check_ambiguity,
override, 0, 0,
1297 if (update_arg( (
void *)&(args_info->
frame_arg),
1299 &(local_args_info.frame_given), optarg, 0,
"1", ARG_INT,
1300 check_ambiguity,
override, 0, 0,
1310 &(local_args_info.water_given), optarg, 0, 0, ARG_FLAG,
1311 check_ambiguity,
override, 1, 0,
"water",
'w',
1320 &(local_args_info.periodicBox_given), optarg, 0, 0, ARG_FLAG,
1321 check_ambiguity,
override, 1, 0,
"periodicBox",
'm',
1330 &(local_args_info.zconstraint_given), optarg, 0, 0, ARG_FLAG,
1331 check_ambiguity,
override, 1, 0,
"zconstraint",
'z',
1340 &(local_args_info.rigidbody_given), optarg, 0, 0, ARG_FLAG,
1341 check_ambiguity,
override, 1, 0,
"rigidbody",
'r',
1350 &(local_args_info.watertype_given), optarg, 0, 0, ARG_FLAG,
1351 check_ambiguity,
override, 1, 0,
"watertype",
't',
1361 &(local_args_info.selection_given), optarg, 0, 0, ARG_STRING,
1362 check_ambiguity,
override, 0, 0,
1372 &(local_args_info.basetype_given), optarg, 0, 0, ARG_FLAG,
1373 check_ambiguity,
override, 1, 0,
"basetype",
'b',
1382 &(local_args_info.velocities_given), optarg, 0, 0, ARG_FLAG,
1383 check_ambiguity,
override, 1, 0,
"velocities",
'v',
1392 &(local_args_info.forces_given), optarg, 0, 0, ARG_FLAG,
1393 check_ambiguity,
override, 1, 0,
"forces",
'f',
1402 &(local_args_info.vectors_given), optarg, 0, 0, ARG_FLAG,
1403 check_ambiguity,
override, 1, 0,
"vectors",
'u',
1412 &(local_args_info.charges_given), optarg, 0, 0, ARG_FLAG,
1413 check_ambiguity,
override, 1, 0,
"charges",
'c',
1422 &(local_args_info.efield_given), optarg, 0, 0, ARG_FLAG,
1423 check_ambiguity,
override, 1, 0,
"efield",
'e',
1432 &(local_args_info.globalID_given), optarg, 0, 0, ARG_FLAG,
1433 check_ambiguity,
override, 1, 0,
"globalID",
'g',
1441 if (strcmp (long_options[option_index].name,
"originsele") == 0)
1447 &(local_args_info.originsele_given), optarg, 0, 0, ARG_STRING,
1448 check_ambiguity,
override, 0, 0,
1455 else if (strcmp (long_options[option_index].name,
"refsele") == 0)
1459 if (update_arg( (
void *)&(args_info->
refsele_arg),
1461 &(local_args_info.refsele_given), optarg, 0, 0, ARG_STRING,
1462 check_ambiguity,
override, 0, 0,
1469 else if (strcmp (long_options[option_index].name,
"repeatX") == 0)
1473 if (update_arg( (
void *)&(args_info->
repeatX_arg),
1475 &(local_args_info.repeatX_given), optarg, 0,
"0", ARG_INT,
1476 check_ambiguity,
override, 0, 0,
1483 else if (strcmp (long_options[option_index].name,
"repeatY") == 0)
1487 if (update_arg( (
void *)&(args_info->
repeatY_arg),
1489 &(local_args_info.repeatY_given), optarg, 0,
"0", ARG_INT,
1490 check_ambiguity,
override, 0, 0,
1497 else if (strcmp (long_options[option_index].name,
"repeatZ") == 0)
1501 if (update_arg( (
void *)&(args_info->
repeatZ_arg),
1503 &(local_args_info.repeatZ_given), optarg, 0,
"0", ARG_INT,
1504 check_ambiguity,
override, 0, 0,
1517 fprintf (stderr,
"%s: option unknown: %c%s\n",
CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error :
""));
1526 error_occurred += cmdline_parser_required2 (args_info, argv[0], additional_error);
1529 cmdline_parser_release (&local_args_info);
1531 if ( error_occurred )
1532 return (EXIT_FAILURE);
1537 int found_prog_name = 0;
1543 args_info->
inputs_num = argc - optind - found_prog_name;
1545 (
char **)(malloc ((args_info->
inputs_num)*
sizeof(
char *))) ;
1546 while (optind < argc)
1547 args_info->
inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;
1554 cmdline_parser_release (&local_args_info);
1555 return (EXIT_FAILURE);
The header file for the command line option parser generated by GNU Gengetopt version 2....
#define CMDLINE_PARSER_VERSION
the program version
#define CMDLINE_PARSER_PACKAGE_NAME
the complete program name (used for help and version)
#define CMDLINE_PARSER_PACKAGE
the program name (used for printing errors)
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)
int override
whether to override possibly already present options (default 0)
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.
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.
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.
struct cmdline_parser_params * cmdline_parser_params_create(void)
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their defau...
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...
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.