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 ; |
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 |
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 number of spherical harmonic l values - typically\na 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"); |
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' }, |
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 |
|
|
222 |
|
args_info->input_arg = gengetopt_strdup (optarg); |
223 |
|
break; |
224 |
|
|
225 |
+ |
case 'b': /* The number of spherical harmonic l values - 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 |
|
{ |