46 |
|
args_info->width_given = 0 ; |
47 |
|
args_info->latticeCnst_given = 0 ; |
48 |
|
args_info->genGeomview_given = 0 ; |
49 |
+ |
args_info->twinnedCrystal_given = 0 ; |
50 |
|
} |
51 |
|
|
52 |
|
static |
55 |
|
args_info->output_arg = NULL; |
56 |
|
args_info->latticetype_arg = gengetopt_strdup ("fcc"); |
57 |
|
args_info->genGeomview_flag = 0; |
58 |
+ |
args_info->twinnedCrystal_flag = 0; |
59 |
|
} |
60 |
|
|
61 |
|
void |
78 |
|
printf("%s\n"," --width=DOUBLE diameter of nanorod in Angstroms"); |
79 |
|
printf("%s\n"," --latticeCnst=DOUBLE lattice spacing in Angstrons for cubic lattice"); |
80 |
|
printf("%s\n"," --genGeomview generate a geomview file with the object geometry \n (default=off)"); |
81 |
+ |
printf("%s\n"," --twinnedCrystal generate a twinned crystal nanorod (default=off)"); |
82 |
|
|
83 |
|
} |
84 |
|
|
228 |
|
{ "width", 1, NULL, 0 }, |
229 |
|
{ "latticeCnst", 1, NULL, 0 }, |
230 |
|
{ "genGeomview", 0, NULL, 0 }, |
231 |
+ |
{ "twinnedCrystal", 0, NULL, 0 }, |
232 |
|
{ NULL, 0, NULL, 0 } |
233 |
|
}; |
234 |
|
|
335 |
|
local_args_info.genGeomview_given = 1; |
336 |
|
args_info->genGeomview_given = 1; |
337 |
|
args_info->genGeomview_flag = !(args_info->genGeomview_flag); |
338 |
+ |
} |
339 |
+ |
/* generate a twinned crystal nanorod. */ |
340 |
+ |
else if (strcmp (long_options[option_index].name, "twinnedCrystal") == 0) |
341 |
+ |
{ |
342 |
+ |
if (local_args_info.twinnedCrystal_given) |
343 |
+ |
{ |
344 |
+ |
fprintf (stderr, "%s: `--twinnedCrystal' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
345 |
+ |
goto failure; |
346 |
+ |
} |
347 |
+ |
if (args_info->twinnedCrystal_given && ! override) |
348 |
+ |
continue; |
349 |
+ |
local_args_info.twinnedCrystal_given = 1; |
350 |
+ |
args_info->twinnedCrystal_given = 1; |
351 |
+ |
args_info->twinnedCrystal_flag = !(args_info->twinnedCrystal_flag); |
352 |
|
} |
353 |
|
|
354 |
|
break; |