ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/dump2Xyz/Dump2XYZCmd.c
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/dump2Xyz/Dump2XYZCmd.c (file contents):
Revision 1501 by tim, Tue Sep 28 23:24:25 2004 UTC vs.
Revision 1988 by tim, Mon Feb 7 22:38:35 2005 UTC

# Line 1 | Line 1
1   /*
2    File autogenerated by gengetopt version 2.11
3    generated with the following command:
4 <  /home/maul/gezelter/tim/program/gengetopt-2.11/src/gengetopt --file-name=Dump2XYZCmd
4 >  /home/maul/gezelter/tim/bin/gengetopt -F Dump2XYZCmd
5  
6    The developers of gengetopt consider the fixed text that goes in all
7    gengetopt output files to be in the public domain:
# Line 18 | Line 18
18   #include "config.h"
19   #endif
20  
21
21   #include "getopt.h"
22  
23 < #include "applications/dump2Xyz/Dump2XYZCmd.h"
23 > #include "Dump2XYZCmd.h"
24  
25   void
26   cmdline_parser_print_version (void)
# Line 36 | Line 35 | cmdline_parser_print_help (void)
35    printf("\n"
36    "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE);
37    printf("\n");
38 <  printf("  -h, --help             Print help and exit\n");
39 <  printf("  -V, --version          Print version and exit\n");
40 <  printf("  -i, --input=filename   input dump file\n");
41 <  printf("  -o, --output=filename  output file name\n");
42 <  printf("  -n, --frame=INT        print every n frame  (default=`1')\n");
43 <  printf("  -d, --dipole           print the dipole moments  (default=off)\n");
44 <  printf("  -w, --water            skip the the waters  (default=off)\n");
45 <  printf("  -m, --periodicBox      map to the periodic box  (default=off)\n");
46 <  printf("  -z, --zconstraint      replace the atom types of zconstraint molecules  \n                           (default=off)\n");
47 <  printf("  -r, --rigidbody        add a pseudo COM atom to rigidbody  (default=off)\n");
48 <  printf("  -t, --watertype        replace the atom type of water model  (default=on)\n");
49 <  printf("  -s, --ignore=atomtype  ignore the atom types\n");
50 <  printf("      --repeatX=INT      The number of images to repeat in the x direction  \n                           (default=`0')\n");
51 <  printf("      --repeatY=INT      The number of images to repeat in the y direction  \n                           (default=`0')\n");
52 <  printf("      --repeatZ=INT      The number of images to repeat in the z direction  \n                           (default=`0')\n");
38 >  printf("  -h, --help                        Print help and exit\n");
39 >  printf("  -V, --version                     Print version and exit\n");
40 >  printf("  -i, --input=filename              input dump file\n");
41 >  printf("  -o, --output=filename             output file name\n");
42 >  printf("  -n, --frame=INT                   print every n frame  (default=`1')\n");
43 >  printf("  -d, --dipole                      print the dipole moments  (default=off)\n");
44 >  printf("  -w, --water                       skip the the waters  (default=off)\n");
45 >  printf("  -m, --periodicBox                 map to the periodic box  (default=off)\n");
46 >  printf("  -z, --zconstraint                 replace the atom types of zconstraint \n                                      molecules  (default=off)\n");
47 >  printf("  -r, --rigidbody                   add a pseudo COM atom to rigidbody  \n                                      (default=off)\n");
48 >  printf("  -t, --watertype                   replace the atom type of water model  \n                                      (default=on)\n");
49 >  printf("  -g, --ignore=atomtype             ignore the atom types\n");
50 >  printf("  -s, --selection=selection script  selection syntax:\n"                                      
51 >         "                                    select DMPC -- select DMPC molecule\n"                    
52 >         "                                    select DMPC.* -- select all atoms and all rigidbodies belong to DMPC molecule(same as above)\n"          
53 >         "                                    select not DMPC -- select all atoms and all rigidbodies do not belong to DMPC molecule\n"
54 >         "                                    select C* and 4 to 7 -- select stuntdoubles which match C* and which index is between [4, 7)\n"  
55 >         "                                    select 5 -- select stuntdobule whose global index is 5\n"                                      
56 >         "                                    select within (5.0, HDP or PO4) -- select stuntdoubles which is within 5 A to HDP or PO4\n"
57 >         "                                    select DMPC.3 -- select stuntdouble which internal index is 3\n"
58 >         "                                    select DMPC.DMPC_RB_*.* --select atoms belong to rigid body inside DMPC molecule \n");
59 >  printf("      --repeatX=INT                 The number of images to repeat in the x \n                                      direction  (default=`0')\n");
60 >  printf("      --repeatY=INT                 The number of images to repeat in the y \n                                      direction  (default=`0')\n");
61 >  printf("      --repeatZ=INT                 The number of images to repeat in the z \n                                      direction  (default=`0')\n");
62   }
63  
64  
# Line 94 | Line 102 | cmdline_parser (int argc, char * const *argv, struct g
102    args_info->rigidbody_given = 0 ;
103    args_info->watertype_given = 0 ;
104    args_info->ignore_given = 0 ;
105 +  args_info->selection_given = 0 ;
106    args_info->repeatX_given = 0 ;
107    args_info->repeatY_given = 0 ;
108    args_info->repeatZ_given = 0 ;
# Line 108 | Line 117 | cmdline_parser (int argc, char * const *argv, struct g
117    args_info->rigidbody_flag = 0;\
118    args_info->watertype_flag = 1;\
119    args_info->ignore_arg = NULL; \
120 +  args_info->selection_arg = NULL; \
121    args_info->repeatX_arg = 0 ;\
122    args_info->repeatY_arg = 0 ;\
123    args_info->repeatZ_arg = 0 ;\
# Line 137 | Line 147 | cmdline_parser (int argc, char * const *argv, struct g
147          { "zconstraint",        0, NULL, 'z' },
148          { "rigidbody",  0, NULL, 'r' },
149          { "watertype",  0, NULL, 't' },
150 <        { "ignore",     1, NULL, 's' },
150 >        { "ignore",     1, NULL, 'g' },
151 >        { "selection",  1, NULL, 's' },
152          { "repeatX",    1, NULL, 0 },
153          { "repeatY",    1, NULL, 0 },
154          { "repeatZ",    1, NULL, 0 },
# Line 145 | Line 156 | cmdline_parser (int argc, char * const *argv, struct g
156        };
157  
158        stop_char = 0;
159 <      c = getopt_long (argc, argv, "hVi:o:n:dwmzrts:", long_options, &option_index);
159 >      c = getopt_long (argc, argv, "hVi:o:n:dwmzrtg:s:", long_options, &option_index);
160  
161        if (c == -1) break;       /* Exit from `while (1)' loop.  */
162  
# Line 260 | Line 271 | cmdline_parser (int argc, char * const *argv, struct g
271            args_info->watertype_flag = !(args_info->watertype_flag);
272            break;
273  
274 <        case 's':       /* ignore the atom types.  */
274 >        case 'g':       /* ignore the atom types.  */
275            args_info->ignore_given++;
276            ignore_new = (struct ignore_list *) malloc (sizeof (struct ignore_list));
277            ignore_new->next = ignore_list;
# Line 268 | Line 279 | cmdline_parser (int argc, char * const *argv, struct g
279            ignore_new->ignore_arg = gengetopt_strdup (optarg);
280            break;
281  
282 +        case 's':       /* general selection syntax:\n
283 + select DMPC -- select DMPC molecule\n \
284 + select DMPC.* -- select all atoms and all rigidbodies belong to DMPC molecule\n \
285 + select 5 -- select stuntdobule whose global index is 5\n \
286 + select within (5.0, HDP or PO4) -- select stuntdoubles which is within 5 A to HDP or PO4\n \
287 + select DMPC.DMPC_RB_*.* --select atoms belong to rigid body inside DMPC molecule .  */
288 +          if (args_info->selection_given)
289 +            {
290 +              fprintf (stderr, "%s: `--selection' (`-s') option given more than once\n", CMDLINE_PARSER_PACKAGE);
291 +              clear_args ();
292 +              exit (EXIT_FAILURE);
293 +            }
294 +          args_info->selection_given = 1;
295 +          args_info->selection_arg = gengetopt_strdup (optarg);
296 +          break;
297  
298 +
299          case 0: /* Long option with no short option */
300            /* The number of images to repeat in the x direction.  */
301            if (strcmp (long_options[option_index].name, "repeatX") == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines