--- trunk/OOPSE-1.0/utils/sysbuilder/simpleBuilderCmd.c 2004/07/29 03:31:50 1432 +++ trunk/OOPSE-1.0/utils/sysbuilder/simpleBuilderCmd.c 2004/07/29 19:12:00 1436 @@ -39,8 +39,7 @@ cmdline_parser_print_help (void) printf(" -V, --version Print version and exit\n"); printf(" -o, --output=STRING Output file name\n"); printf(" --latticetype=STRING Lattice type string. Valid types are fcc,hcp,bcc \n and hcp-water. (default=`fcc')\n"); - printf(" --density=DOUBLE density g/cm^3\n"); - printf(" --ndensity=DOUBLE number density\n"); + printf(" --density=DOUBLE density (g/cm^3)\n"); printf(" --nx=INT number of unit cells in x\n"); printf(" --ny=INT number of unit cells in y\n"); printf(" --nz=INT number of unit cells in z\n"); @@ -72,7 +71,6 @@ cmdline_parser (int argc, char * const *argv, struct g args_info->output_given = 0 ; args_info->latticetype_given = 0 ; args_info->density_given = 0 ; - args_info->ndensity_given = 0 ; args_info->nx_given = 0 ; args_info->ny_given = 0 ; args_info->nz_given = 0 ; @@ -102,7 +100,6 @@ cmdline_parser (int argc, char * const *argv, struct g { "output", 1, NULL, 'o' }, { "latticetype", 1, NULL, 0 }, { "density", 1, NULL, 0 }, - { "ndensity", 1, NULL, 0 }, { "nx", 1, NULL, 0 }, { "ny", 1, NULL, 0 }, { "nz", 1, NULL, 0 }, @@ -155,7 +152,7 @@ cmdline_parser (int argc, char * const *argv, struct g break; } - /* density g/cm^3. */ + /* density (g/cm^3). */ else if (strcmp (long_options[option_index].name, "density") == 0) { if (args_info->density_given) @@ -166,20 +163,6 @@ cmdline_parser (int argc, char * const *argv, struct g } args_info->density_given = 1; args_info->density_arg = strtod (optarg, NULL); - break; - } - - /* number density. */ - else if (strcmp (long_options[option_index].name, "ndensity") == 0) - { - if (args_info->ndensity_given) - { - fprintf (stderr, "%s: `--ndensity' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->ndensity_given = 1; - args_info->ndensity_arg = strtod (optarg, NULL); break; } @@ -237,6 +220,11 @@ cmdline_parser (int argc, char * const *argv, struct g } /* while */ + if (! args_info->density_given) + { + fprintf (stderr, "%s: '--density' option required\n", CMDLINE_PARSER_PACKAGE); + missing_required_options = 1; + } if (! args_info->nx_given) { fprintf (stderr, "%s: '--nx' option required\n", CMDLINE_PARSER_PACKAGE);