ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/SHAPES/forcerCmd.c
(Generate patch)

Comparing trunk/SHAPES/forcerCmd.c (file contents):
Revision 1240 by gezelter, Fri Jun 4 16:11:27 2004 UTC vs.
Revision 1275 by chrisfen, Tue Jun 15 22:36:23 2004 UTC

# Line 38 | Line 38 | void clear_given (struct gengetopt_args_info *args_inf
38    args_info->help_given = 0 ;
39    args_info->version_given = 0 ;
40    args_info->input_given = 0 ;
41 +  args_info->bandwidth_given = 0 ;
42    args_info->charmm_given = 0 ;
43    args_info->amber_given = 0 ;
44    args_info->lj_given = 0 ;
# Line 50 | Line 51 | void clear_args (struct gengetopt_args_info *args_info
51   void clear_args (struct gengetopt_args_info *args_info)
52   {
53    args_info->input_arg = NULL;
54 +  args_info->bandwidth_arg = 8 ;
55   }
56  
57   void
# Line 68 | Line 70 | cmdline_parser_print_help (void)
70    printf("%s\n","  -h, --help            Print help and exit");
71    printf("%s\n","  -V, --version         Print version and exit");
72    printf("%s\n","  -i, --input=filename  input file name");
73 +  printf("%s\n","  -b, --bandwidth=INT   The step detail for the potential grids - typically a \n                          power of 2  (default=`8')");
74    printf("\n");
75    printf(" Group: ForceField A Force Field must be specified\n");
76    printf("%s\n","  -c, --charmm          Use CHARMM 27 parameters");
# Line 180 | Line 183 | cmdline_parser_internal (int argc, char * const *argv,
183          { "help",       0, NULL, 'h' },
184          { "version",    0, NULL, 'V' },
185          { "input",      1, NULL, 'i' },
186 +        { "bandwidth",  1, NULL, 'b' },
187          { "charmm",     0, NULL, 'c' },
188          { "amber",      0, NULL, 'a' },
189          { "lj", 0, NULL, 'l' },
# Line 189 | Line 193 | cmdline_parser_internal (int argc, char * const *argv,
193        };
194  
195        stop_char = 0;
196 <      c = getopt_long (argc, argv, "hVi:calgo", long_options, &option_index);
196 >      c = getopt_long (argc, argv, "hVi:b:calgo", long_options, &option_index);
197  
198        if (c == -1) break;       /* Exit from `while (1)' loop.  */
199  
# Line 218 | Line 222 | cmdline_parser_internal (int argc, char * const *argv,
222            args_info->input_arg = gengetopt_strdup (optarg);
223            break;
224  
225 +        case 'b':       /* The step detail for the potential grids - typically a power of 2.  */
226 +          if (local_args_info.bandwidth_given)
227 +            {
228 +              fprintf (stderr, "%s: `--bandwidth' (`-b') option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));
229 +              goto failure;
230 +            }
231 +          if (args_info->bandwidth_given && ! override)
232 +            continue;
233 +          local_args_info.bandwidth_given = 1;
234 +          args_info->bandwidth_given = 1;
235 +          args_info->bandwidth_arg = strtol (optarg,&stop_char,0);
236 +          break;
237 +
238          case 'c':       /* Use CHARMM 27 parameters.  */
239            if (local_args_info.charmm_given)
240              {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines