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

Comparing trunk/SHAPES/shaperCmd.c (file contents):
Revision 1295 by gezelter, Thu Jun 24 15:31:52 2004 UTC vs.
Revision 1312 by chrisfen, Sat Jun 26 15:32:12 2004 UTC

# Line 39 | Line 39 | void clear_given (struct gengetopt_args_info *args_inf
39    args_info->version_given = 0 ;
40    args_info->input_given = 0 ;
41    args_info->bandwidth_given = 0 ;
42 +  args_info->tolerance_given = 0 ;
43    args_info->charmm_given = 0 ;
44    args_info->amber_given = 0 ;
45    args_info->lj_given = 0 ;
# Line 52 | Line 53 | void clear_args (struct gengetopt_args_info *args_info
53   {
54    args_info->input_arg = NULL;
55    args_info->bandwidth_arg = 8 ;
56 +  args_info->tolerance_arg = 0.01 ;
57   }
58  
59   void
# Line 67 | Line 69 | cmdline_parser_print_help (void)
69    printf("\n"
70    "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE);
71    printf("\n");
72 <  printf("%s\n","  -h, --help            Print help and exit");
73 <  printf("%s\n","  -V, --version         Print version and exit");
74 <  printf("%s\n","  -i, --input=filename  input file name");
75 <  printf("%s\n","  -b, --bandwidth=INT   The step detail for the potential grids - typically a \n                          power of 2  (default=`8')");
72 >  printf("%s\n","  -h, --help              Print help and exit");
73 >  printf("%s\n","  -V, --version           Print version and exit");
74 >  printf("%s\n","  -i, --input=filename    input file name");
75 >  printf("%s\n","  -b, --bandwidth=INT     The step detail for the potential grids - typically \n                            a power of 2  (default=`8')");
76 >  printf("%s\n","  -t, --tolerance=DOUBLE  The tolerance for recognition of spherical harmonic \n                            terms  (default=`0.01')");
77    printf("\n");
78    printf(" Group: ForceField A Force Field must be specified\n");
79 <  printf("%s\n","  -c, --charmm          Use CHARMM 27 parameters");
80 <  printf("%s\n","  -a, --amber           Use Amber99 parameters");
81 <  printf("%s\n","  -l, --lj              Use Lennard-Jones parameters");
82 <  printf("%s\n","  -g, --gaff            Use GAFF parameters");
83 <  printf("%s\n","  -o, --opls            Use OPLS/AA parameters");
79 >  printf("%s\n","  -c, --charmm            Use CHARMM 27 parameters");
80 >  printf("%s\n","  -a, --amber             Use Amber99 parameters");
81 >  printf("%s\n","  -l, --lj                Use Lennard-Jones parameters");
82 >  printf("%s\n","  -g, --gaff              Use GAFF parameters");
83 >  printf("%s\n","  -o, --opls              Use OPLS/AA parameters");
84   }
85  
86   void
# Line 184 | Line 187 | cmdline_parser_internal (int argc, char * const *argv,
187          { "version",    0, NULL, 'V' },
188          { "input",      1, NULL, 'i' },
189          { "bandwidth",  1, NULL, 'b' },
190 +        { "tolerance",  1, NULL, 't' },
191          { "charmm",     0, NULL, 'c' },
192          { "amber",      0, NULL, 'a' },
193          { "lj", 0, NULL, 'l' },
# Line 193 | Line 197 | cmdline_parser_internal (int argc, char * const *argv,
197        };
198  
199        stop_char = 0;
200 <      c = getopt_long (argc, argv, "hVi:b:calgo", long_options, &option_index);
200 >      c = getopt_long (argc, argv, "hVi:b:t:calgo", long_options, &option_index);
201  
202        if (c == -1) break;       /* Exit from `while (1)' loop.  */
203  
# Line 233 | Line 237 | cmdline_parser_internal (int argc, char * const *argv,
237            local_args_info.bandwidth_given = 1;
238            args_info->bandwidth_given = 1;
239            args_info->bandwidth_arg = strtol (optarg,&stop_char,0);
240 +          break;
241 +
242 +        case 't':       /* The tolerance for recognition of spherical harmonic terms.  */
243 +          if (local_args_info.tolerance_given)
244 +            {
245 +              fprintf (stderr, "%s: `--tolerance' (`-t') option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));
246 +              goto failure;
247 +            }
248 +          if (args_info->tolerance_given && ! override)
249 +            continue;
250 +          local_args_info.tolerance_given = 1;
251 +          args_info->tolerance_given = 1;
252 +          args_info->tolerance_arg = strtod (optarg, NULL);
253            break;
254  
255          case 'c':       /* Use CHARMM 27 parameters.  */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines