--- trunk/src/applications/sequentialProps/SequentialPropsCmd.cpp 2014/11/04 15:31:51 2035 +++ trunk/src/applications/sequentialProps/SequentialPropsCmd.cpp 2015/03/17 18:22:18 2081 @@ -44,9 +44,12 @@ const char *gengetopt_args_info_help[] = { " --sele2=selection script select second stuntdouble set (if sele2 is not \n set, use script from sele1)", " -b, --nbins=INT number of bins (general purpose) \n (default=`100')", " --nbins_z=INT number of bins in z axis (default=`100')", + " -x, --centroidX=DOUBLE Location of droplet centroid in x", + " -y, --centroidY=DOUBLE Location of droplet centroid in y", " -z, --referenceZ=DOUBLE Reference z-height of solid surface", " -r, --dropletR=DOUBLE Droplet radius in angstroms", " --threshDens=DOUBLE Threshold Density in g/cm^3", + " --bufferLength=DOUBLE Buffer length in angstroms", "\n Group: sequentialProps\n an option of this group is required", " -c, --com selection center of mass", " --ca1 contact angle of selection (using center of \n mass)", @@ -86,9 +89,12 @@ void clear_given (struct gengetopt_args_info *args_inf args_info->sele2_given = 0 ; args_info->nbins_given = 0 ; args_info->nbins_z_given = 0 ; + args_info->centroidX_given = 0 ; + args_info->centroidY_given = 0 ; args_info->referenceZ_given = 0 ; args_info->dropletR_given = 0 ; args_info->threshDens_given = 0 ; + args_info->bufferLength_given = 0 ; args_info->com_given = 0 ; args_info->ca1_given = 0 ; args_info->ca2_given = 0 ; @@ -111,9 +117,12 @@ void clear_args (struct gengetopt_args_info *args_info args_info->nbins_orig = NULL; args_info->nbins_z_arg = 100; args_info->nbins_z_orig = NULL; + args_info->centroidX_orig = NULL; + args_info->centroidY_orig = NULL; args_info->referenceZ_orig = NULL; args_info->dropletR_orig = NULL; args_info->threshDens_orig = NULL; + args_info->bufferLength_orig = NULL; } @@ -130,12 +139,15 @@ void init_args_info(struct gengetopt_args_info *args_i args_info->sele2_help = gengetopt_args_info_help[5] ; args_info->nbins_help = gengetopt_args_info_help[6] ; args_info->nbins_z_help = gengetopt_args_info_help[7] ; - args_info->referenceZ_help = gengetopt_args_info_help[8] ; - args_info->dropletR_help = gengetopt_args_info_help[9] ; - args_info->threshDens_help = gengetopt_args_info_help[10] ; - args_info->com_help = gengetopt_args_info_help[12] ; - args_info->ca1_help = gengetopt_args_info_help[13] ; - args_info->ca2_help = gengetopt_args_info_help[14] ; + args_info->centroidX_help = gengetopt_args_info_help[8] ; + args_info->centroidY_help = gengetopt_args_info_help[9] ; + args_info->referenceZ_help = gengetopt_args_info_help[10] ; + args_info->dropletR_help = gengetopt_args_info_help[11] ; + args_info->threshDens_help = gengetopt_args_info_help[12] ; + args_info->bufferLength_help = gengetopt_args_info_help[13] ; + args_info->com_help = gengetopt_args_info_help[15] ; + args_info->ca1_help = gengetopt_args_info_help[16] ; + args_info->ca2_help = gengetopt_args_info_help[17] ; } @@ -229,9 +241,12 @@ cmdline_parser_release (struct gengetopt_args_info *ar free_string_field (&(args_info->sele2_orig)); free_string_field (&(args_info->nbins_orig)); free_string_field (&(args_info->nbins_z_orig)); + free_string_field (&(args_info->centroidX_orig)); + free_string_field (&(args_info->centroidY_orig)); free_string_field (&(args_info->referenceZ_orig)); free_string_field (&(args_info->dropletR_orig)); free_string_field (&(args_info->threshDens_orig)); + free_string_field (&(args_info->bufferLength_orig)); for (i = 0; i < args_info->inputs_num; ++i) @@ -283,12 +298,18 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "nbins", args_info->nbins_orig, 0); if (args_info->nbins_z_given) write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0); + if (args_info->centroidX_given) + write_into_file(outfile, "centroidX", args_info->centroidX_orig, 0); + if (args_info->centroidY_given) + write_into_file(outfile, "centroidY", args_info->centroidY_orig, 0); if (args_info->referenceZ_given) write_into_file(outfile, "referenceZ", args_info->referenceZ_orig, 0); if (args_info->dropletR_given) write_into_file(outfile, "dropletR", args_info->dropletR_orig, 0); if (args_info->threshDens_given) write_into_file(outfile, "threshDens", args_info->threshDens_orig, 0); + if (args_info->bufferLength_given) + write_into_file(outfile, "bufferLength", args_info->bufferLength_orig, 0); if (args_info->com_given) write_into_file(outfile, "com", 0, 0 ); if (args_info->ca1_given) @@ -604,16 +625,19 @@ cmdline_parser_internal ( { "sele2", 1, NULL, 0 }, { "nbins", 1, NULL, 'b' }, { "nbins_z", 1, NULL, 0 }, + { "centroidX", 1, NULL, 'x' }, + { "centroidY", 1, NULL, 'y' }, { "referenceZ", 1, NULL, 'z' }, { "dropletR", 1, NULL, 'r' }, { "threshDens", 1, NULL, 0 }, + { "bufferLength", 1, NULL, 0 }, { "com", 0, NULL, 'c' }, { "ca1", 0, NULL, 0 }, { "ca2", 0, NULL, 0 }, { 0, 0, 0, 0 } }; - c = getopt_long (argc, argv, "hVi:o:b:z:r:c", long_options, &option_index); + c = getopt_long (argc, argv, "hVi:o:b:x:y:z:r:c", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ @@ -665,6 +689,30 @@ cmdline_parser_internal ( goto failure; break; + case 'x': /* Location of droplet centroid in x. */ + + + if (update_arg( (void *)&(args_info->centroidX_arg), + &(args_info->centroidX_orig), &(args_info->centroidX_given), + &(local_args_info.centroidX_given), optarg, 0, 0, ARG_DOUBLE, + check_ambiguity, override, 0, 0, + "centroidX", 'x', + additional_error)) + goto failure; + + break; + case 'y': /* Location of droplet centroid in y. */ + + + if (update_arg( (void *)&(args_info->centroidY_arg), + &(args_info->centroidY_orig), &(args_info->centroidY_given), + &(local_args_info.centroidY_given), optarg, 0, 0, ARG_DOUBLE, + check_ambiguity, override, 0, 0, + "centroidY", 'y', + additional_error)) + goto failure; + + break; case 'z': /* Reference z-height of solid surface. */ @@ -762,6 +810,20 @@ cmdline_parser_internal ( goto failure; } + /* Buffer length in angstroms. */ + else if (strcmp (long_options[option_index].name, "bufferLength") == 0) + { + + + if (update_arg( (void *)&(args_info->bufferLength_arg), + &(args_info->bufferLength_orig), &(args_info->bufferLength_given), + &(local_args_info.bufferLength_given), optarg, 0, 0, ARG_DOUBLE, + check_ambiguity, override, 0, 0, + "bufferLength", '-', + additional_error)) + goto failure; + + } /* contact angle of selection (using center of mass). */ else if (strcmp (long_options[option_index].name, "ca1") == 0) {