--- branches/development/src/applications/staticProps/StaticPropsCmd.cpp 2011/10/03 20:32:45 1655 +++ trunk/src/applications/staticProps/StaticPropsCmd.cpp 2014/08/13 20:42:43 2015 @@ -1,7 +1,7 @@ /* File autogenerated by gengetopt version 2.22.4 generated with the following command: - gengetopt -F StaticPropsCmd -u + gengetopt --file-name=StaticPropsCmd --unamed-opts The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: @@ -21,7 +21,11 @@ #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ #endif +#ifdef WIN32 +#include "utils/wingetopt.h" +#else #include +#endif #include "StaticPropsCmd.h" @@ -52,13 +56,18 @@ const char *gengetopt_args_info_help[] = { " --sele3=selection script select the third stuntdouble set", " --refsele=selection script\n select reference (use and only use with --gxyz)", " --comsele=selection script\n select stunt doubles for center-of-mass \n reference point", + " --seleoffset=INT global index offset for a second object (used \n to define a vector between sites in molecule)", + " --seleoffset2=INT global index offset for a third object (used to \n define a vector between sites in molecule)", " --molname=STRING molecule name", " --begin=INT begin internal index", " --end=INT end internal index", " --radius=DOUBLE nanoparticle radius", + " -v, --voxelSize=DOUBLE voxel size (angstroms)", + " --gaussWidth=DOUBLE Gaussian width (angstroms)", "\n Group: staticProps\n an option of this group is required", " --bo bond order parameter (--rcut must be specified)", - " --bor bond order parameter as a function of radius \n (--rcut must be specified)", + " --ior icosahedral bond order parameter as a function \n of radius (--rcut must be specified)", + " --for FCC bond order parameter as a function of \n radius (--rcut must be specified)", " --bad N(theta) bond angle density within (--rcut must \n be specified)", " --count count of molecules matching selection criteria \n (and associated statistics)", " -g, --gofr g(r)", @@ -74,13 +83,20 @@ const char *gengetopt_args_info_help[] = { " -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)", " -d, --density density plot", " --slab_density slab density", - " --p_angle p(cos(theta))", + " --p_angle p(cos(theta)) (--sele1 must be specified, \n --sele2 is optional)", " --hxy hxy", " --rho_r rho of R", " --angle_r angle of R", " --hullvol hull volume of nanoparticle", " --rodlength length of nanorod", - " -Q, --tet_param tetrahedrality order parameter", + " -Q, --tet_param tetrahedrality order parameter (Qk)", + " --tet_param_z spatially-resolved tetrahedrality order \n parameter Qk(z)", + " --tet_param_xyz volume-resolved tetrahedrality order parameter \n Qk(x,y,z). (voxelSize, rcut, and gaussWidth \n must be specified)", + " --rnemdz slab-resolved RNEMD statistics (temperature, \n density, velocity)", + " --rnemdr shell-resolved RNEMD statistics (temperature, \n density, angular velocity)", + " --rnemdrt shell and angle-resolved RNEMD statistics \n (temperature, density, angular velocity)", + " --nitrile electrostatic potential to frequency map based \n on the Cho nitrile fits", + " -m, --multipole average multipole moments contained within \n cutoff spheres as a function of radius", 0 }; @@ -128,12 +144,17 @@ void clear_given (struct gengetopt_args_info *args_inf args_info->sele3_given = 0 ; args_info->refsele_given = 0 ; args_info->comsele_given = 0 ; + args_info->seleoffset_given = 0 ; + args_info->seleoffset2_given = 0 ; args_info->molname_given = 0 ; args_info->begin_given = 0 ; args_info->end_given = 0 ; args_info->radius_given = 0 ; + args_info->voxelSize_given = 0 ; + args_info->gaussWidth_given = 0 ; args_info->bo_given = 0 ; - args_info->bor_given = 0 ; + args_info->ior_given = 0 ; + args_info->for_given = 0 ; args_info->bad_given = 0 ; args_info->count_given = 0 ; args_info->gofr_given = 0 ; @@ -156,6 +177,13 @@ void clear_given (struct gengetopt_args_info *args_inf args_info->hullvol_given = 0 ; args_info->rodlength_given = 0 ; args_info->tet_param_given = 0 ; + args_info->tet_param_z_given = 0 ; + args_info->tet_param_xyz_given = 0 ; + args_info->rnemdz_given = 0 ; + args_info->rnemdr_given = 0 ; + args_info->rnemdrt_given = 0 ; + args_info->nitrile_given = 0 ; + args_info->multipole_given = 0 ; args_info->staticProps_group_counter = 0 ; } @@ -195,11 +223,15 @@ void clear_args (struct gengetopt_args_info *args_info args_info->refsele_orig = NULL; args_info->comsele_arg = NULL; args_info->comsele_orig = NULL; + args_info->seleoffset_orig = NULL; + args_info->seleoffset2_orig = NULL; args_info->molname_arg = NULL; args_info->molname_orig = NULL; args_info->begin_orig = NULL; args_info->end_orig = NULL; args_info->radius_orig = NULL; + args_info->voxelSize_orig = NULL; + args_info->gaussWidth_orig = NULL; } @@ -228,34 +260,46 @@ void init_args_info(struct gengetopt_args_info *args_i args_info->sele3_help = gengetopt_args_info_help[17] ; args_info->refsele_help = gengetopt_args_info_help[18] ; args_info->comsele_help = gengetopt_args_info_help[19] ; - args_info->molname_help = gengetopt_args_info_help[20] ; - args_info->begin_help = gengetopt_args_info_help[21] ; - args_info->end_help = gengetopt_args_info_help[22] ; - args_info->radius_help = gengetopt_args_info_help[23] ; - args_info->bo_help = gengetopt_args_info_help[25] ; - args_info->bor_help = gengetopt_args_info_help[26] ; - args_info->bad_help = gengetopt_args_info_help[27] ; - args_info->count_help = gengetopt_args_info_help[28] ; - args_info->gofr_help = gengetopt_args_info_help[29] ; - args_info->gofz_help = gengetopt_args_info_help[30] ; - args_info->r_theta_help = gengetopt_args_info_help[31] ; - args_info->r_omega_help = gengetopt_args_info_help[32] ; - args_info->r_z_help = gengetopt_args_info_help[33] ; - args_info->theta_omega_help = gengetopt_args_info_help[34] ; - args_info->gxyz_help = gengetopt_args_info_help[35] ; - args_info->twodgofr_help = gengetopt_args_info_help[36] ; - args_info->p2_help = gengetopt_args_info_help[37] ; - args_info->rp2_help = gengetopt_args_info_help[38] ; - args_info->scd_help = gengetopt_args_info_help[39] ; - args_info->density_help = gengetopt_args_info_help[40] ; - args_info->slab_density_help = gengetopt_args_info_help[41] ; - args_info->p_angle_help = gengetopt_args_info_help[42] ; - args_info->hxy_help = gengetopt_args_info_help[43] ; - args_info->rho_r_help = gengetopt_args_info_help[44] ; - args_info->angle_r_help = gengetopt_args_info_help[45] ; - args_info->hullvol_help = gengetopt_args_info_help[46] ; - args_info->rodlength_help = gengetopt_args_info_help[47] ; - args_info->tet_param_help = gengetopt_args_info_help[48] ; + args_info->seleoffset_help = gengetopt_args_info_help[20] ; + args_info->seleoffset2_help = gengetopt_args_info_help[21] ; + args_info->molname_help = gengetopt_args_info_help[22] ; + args_info->begin_help = gengetopt_args_info_help[23] ; + args_info->end_help = gengetopt_args_info_help[24] ; + args_info->radius_help = gengetopt_args_info_help[25] ; + args_info->voxelSize_help = gengetopt_args_info_help[26] ; + args_info->gaussWidth_help = gengetopt_args_info_help[27] ; + args_info->bo_help = gengetopt_args_info_help[29] ; + args_info->ior_help = gengetopt_args_info_help[30] ; + args_info->for_help = gengetopt_args_info_help[31] ; + args_info->bad_help = gengetopt_args_info_help[32] ; + args_info->count_help = gengetopt_args_info_help[33] ; + args_info->gofr_help = gengetopt_args_info_help[34] ; + args_info->gofz_help = gengetopt_args_info_help[35] ; + args_info->r_theta_help = gengetopt_args_info_help[36] ; + args_info->r_omega_help = gengetopt_args_info_help[37] ; + args_info->r_z_help = gengetopt_args_info_help[38] ; + args_info->theta_omega_help = gengetopt_args_info_help[39] ; + args_info->gxyz_help = gengetopt_args_info_help[40] ; + args_info->twodgofr_help = gengetopt_args_info_help[41] ; + args_info->p2_help = gengetopt_args_info_help[42] ; + args_info->rp2_help = gengetopt_args_info_help[43] ; + args_info->scd_help = gengetopt_args_info_help[44] ; + args_info->density_help = gengetopt_args_info_help[45] ; + args_info->slab_density_help = gengetopt_args_info_help[46] ; + args_info->p_angle_help = gengetopt_args_info_help[47] ; + args_info->hxy_help = gengetopt_args_info_help[48] ; + args_info->rho_r_help = gengetopt_args_info_help[49] ; + args_info->angle_r_help = gengetopt_args_info_help[50] ; + args_info->hullvol_help = gengetopt_args_info_help[51] ; + args_info->rodlength_help = gengetopt_args_info_help[52] ; + args_info->tet_param_help = gengetopt_args_info_help[53] ; + args_info->tet_param_z_help = gengetopt_args_info_help[54] ; + args_info->tet_param_xyz_help = gengetopt_args_info_help[55] ; + args_info->rnemdz_help = gengetopt_args_info_help[56] ; + args_info->rnemdr_help = gengetopt_args_info_help[57] ; + args_info->rnemdrt_help = gengetopt_args_info_help[58] ; + args_info->nitrile_help = gengetopt_args_info_help[59] ; + args_info->multipole_help = gengetopt_args_info_help[60] ; } @@ -364,11 +408,15 @@ cmdline_parser_release (struct gengetopt_args_info *ar free_string_field (&(args_info->refsele_orig)); free_string_field (&(args_info->comsele_arg)); free_string_field (&(args_info->comsele_orig)); + free_string_field (&(args_info->seleoffset_orig)); + free_string_field (&(args_info->seleoffset2_orig)); free_string_field (&(args_info->molname_arg)); free_string_field (&(args_info->molname_orig)); free_string_field (&(args_info->begin_orig)); free_string_field (&(args_info->end_orig)); free_string_field (&(args_info->radius_orig)); + free_string_field (&(args_info->voxelSize_orig)); + free_string_field (&(args_info->gaussWidth_orig)); for (i = 0; i < args_info->inputs_num; ++i) @@ -444,6 +492,10 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "refsele", args_info->refsele_orig, 0); if (args_info->comsele_given) write_into_file(outfile, "comsele", args_info->comsele_orig, 0); + if (args_info->seleoffset_given) + write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0); + if (args_info->seleoffset2_given) + write_into_file(outfile, "seleoffset2", args_info->seleoffset2_orig, 0); if (args_info->molname_given) write_into_file(outfile, "molname", args_info->molname_orig, 0); if (args_info->begin_given) @@ -452,10 +504,16 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "end", args_info->end_orig, 0); if (args_info->radius_given) write_into_file(outfile, "radius", args_info->radius_orig, 0); + if (args_info->voxelSize_given) + write_into_file(outfile, "voxelSize", args_info->voxelSize_orig, 0); + if (args_info->gaussWidth_given) + write_into_file(outfile, "gaussWidth", args_info->gaussWidth_orig, 0); if (args_info->bo_given) write_into_file(outfile, "bo", 0, 0 ); - if (args_info->bor_given) - write_into_file(outfile, "bor", 0, 0 ); + if (args_info->ior_given) + write_into_file(outfile, "ior", 0, 0 ); + if (args_info->for_given) + write_into_file(outfile, "for", 0, 0 ); if (args_info->bad_given) write_into_file(outfile, "bad", 0, 0 ); if (args_info->count_given) @@ -500,6 +558,20 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_ar write_into_file(outfile, "rodlength", 0, 0 ); if (args_info->tet_param_given) write_into_file(outfile, "tet_param", 0, 0 ); + if (args_info->tet_param_z_given) + write_into_file(outfile, "tet_param_z", 0, 0 ); + if (args_info->tet_param_xyz_given) + write_into_file(outfile, "tet_param_xyz", 0, 0 ); + if (args_info->rnemdz_given) + write_into_file(outfile, "rnemdz", 0, 0 ); + if (args_info->rnemdr_given) + write_into_file(outfile, "rnemdr", 0, 0 ); + if (args_info->rnemdrt_given) + write_into_file(outfile, "rnemdrt", 0, 0 ); + if (args_info->nitrile_given) + write_into_file(outfile, "nitrile", 0, 0 ); + if (args_info->multipole_given) + write_into_file(outfile, "multipole", 0, 0 ); i = EXIT_SUCCESS; @@ -554,7 +626,8 @@ reset_group_staticProps(struct gengetopt_args_info *ar return; args_info->bo_given = 0 ; - args_info->bor_given = 0 ; + args_info->ior_given = 0 ; + args_info->for_given = 0 ; args_info->bad_given = 0 ; args_info->count_given = 0 ; args_info->gofr_given = 0 ; @@ -577,6 +650,13 @@ reset_group_staticProps(struct gengetopt_args_info *ar args_info->hullvol_given = 0 ; args_info->rodlength_given = 0 ; args_info->tet_param_given = 0 ; + args_info->tet_param_z_given = 0 ; + args_info->tet_param_xyz_given = 0 ; + args_info->rnemdz_given = 0 ; + args_info->rnemdr_given = 0 ; + args_info->rnemdrt_given = 0 ; + args_info->nitrile_given = 0 ; + args_info->multipole_given = 0 ; args_info->staticProps_group_counter = 0; } @@ -842,12 +922,17 @@ cmdline_parser_internal ( { "sele3", 1, NULL, 0 }, { "refsele", 1, NULL, 0 }, { "comsele", 1, NULL, 0 }, + { "seleoffset", 1, NULL, 0 }, + { "seleoffset2", 1, NULL, 0 }, { "molname", 1, NULL, 0 }, { "begin", 1, NULL, 0 }, { "end", 1, NULL, 0 }, { "radius", 1, NULL, 0 }, + { "voxelSize", 1, NULL, 'v' }, + { "gaussWidth", 1, NULL, 0 }, { "bo", 0, NULL, 0 }, - { "bor", 0, NULL, 0 }, + { "ior", 0, NULL, 0 }, + { "for", 0, NULL, 0 }, { "bad", 0, NULL, 0 }, { "count", 0, NULL, 0 }, { "gofr", 0, NULL, 'g' }, @@ -870,10 +955,17 @@ cmdline_parser_internal ( { "hullvol", 0, NULL, 0 }, { "rodlength", 0, NULL, 0 }, { "tet_param", 0, NULL, 'Q' }, + { "tet_param_z", 0, NULL, 0 }, + { "tet_param_xyz", 0, NULL, 0 }, + { "rnemdz", 0, NULL, 0 }, + { "rnemdr", 0, NULL, 0 }, + { "rnemdrt", 0, NULL, 0 }, + { "nitrile", 0, NULL, 0 }, + { "multipole", 0, NULL, 'm' }, { 0, 0, 0, 0 } }; - c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index); + c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:v:gpsdQm", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ @@ -997,6 +1089,18 @@ cmdline_parser_internal ( goto failure; break; + case 'v': /* voxel size (angstroms). */ + + + if (update_arg( (void *)&(args_info->voxelSize_arg), + &(args_info->voxelSize_orig), &(args_info->voxelSize_given), + &(local_args_info.voxelSize_given), optarg, 0, 0, ARG_DOUBLE, + check_ambiguity, override, 0, 0, + "voxelSize", 'v', + additional_error)) + goto failure; + + break; case 'g': /* g(r). */ if (args_info->staticProps_group_counter && override) @@ -1057,7 +1161,7 @@ cmdline_parser_internal ( goto failure; break; - case 'Q': /* tetrahedrality order parameter. */ + case 'Q': /* tetrahedrality order parameter (Qk). */ if (args_info->staticProps_group_counter && override) reset_group_staticProps (args_info); @@ -1068,6 +1172,21 @@ cmdline_parser_internal ( &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "tet_param", 'Q', + additional_error)) + goto failure; + + break; + case 'm': /* average multipole moments contained within cutoff spheres as a function of radius. */ + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->multipole_given), + &(local_args_info.multipole_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "multipole", 'm', additional_error)) goto failure; @@ -1200,6 +1319,34 @@ cmdline_parser_internal ( goto failure; } + /* global index offset for a second object (used to define a vector between sites in molecule). */ + else if (strcmp (long_options[option_index].name, "seleoffset") == 0) + { + + + if (update_arg( (void *)&(args_info->seleoffset_arg), + &(args_info->seleoffset_orig), &(args_info->seleoffset_given), + &(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT, + check_ambiguity, override, 0, 0, + "seleoffset", '-', + additional_error)) + goto failure; + + } + /* global index offset for a third object (used to define a vector between sites in molecule). */ + else if (strcmp (long_options[option_index].name, "seleoffset2") == 0) + { + + + if (update_arg( (void *)&(args_info->seleoffset2_arg), + &(args_info->seleoffset2_orig), &(args_info->seleoffset2_given), + &(local_args_info.seleoffset2_given), optarg, 0, 0, ARG_INT, + check_ambiguity, override, 0, 0, + "seleoffset2", '-', + additional_error)) + goto failure; + + } /* molecule name. */ else if (strcmp (long_options[option_index].name, "molname") == 0) { @@ -1256,6 +1403,20 @@ cmdline_parser_internal ( goto failure; } + /* Gaussian width (angstroms). */ + else if (strcmp (long_options[option_index].name, "gaussWidth") == 0) + { + + + if (update_arg( (void *)&(args_info->gaussWidth_arg), + &(args_info->gaussWidth_orig), &(args_info->gaussWidth_given), + &(local_args_info.gaussWidth_given), optarg, 0, 0, ARG_DOUBLE, + check_ambiguity, override, 0, 0, + "gaussWidth", '-', + additional_error)) + goto failure; + + } /* bond order parameter (--rcut must be specified). */ else if (strcmp (long_options[option_index].name, "bo") == 0) { @@ -1273,8 +1434,8 @@ cmdline_parser_internal ( goto failure; } - /* bond order parameter as a function of radius (--rcut must be specified). */ - else if (strcmp (long_options[option_index].name, "bor") == 0) + /* icosahedral bond order parameter as a function of radius (--rcut must be specified). */ + else if (strcmp (long_options[option_index].name, "ior") == 0) { if (args_info->staticProps_group_counter && override) @@ -1282,10 +1443,27 @@ cmdline_parser_internal ( args_info->staticProps_group_counter += 1; if (update_arg( 0 , - 0 , &(args_info->bor_given), - &(local_args_info.bor_given), optarg, 0, 0, ARG_NO, + 0 , &(args_info->ior_given), + &(local_args_info.ior_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, - "bor", '-', + "ior", '-', + additional_error)) + goto failure; + + } + /* FCC bond order parameter as a function of radius (--rcut must be specified). */ + else if (strcmp (long_options[option_index].name, "for") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->for_given), + &(local_args_info.for_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "for", '-', additional_error)) goto failure; @@ -1477,7 +1655,7 @@ cmdline_parser_internal ( goto failure; } - /* p(cos(theta)). */ + /* p(cos(theta)) (--sele1 must be specified, --sele2 is optional). */ else if (strcmp (long_options[option_index].name, "p_angle") == 0) { @@ -1579,7 +1757,109 @@ cmdline_parser_internal ( goto failure; } + /* spatially-resolved tetrahedrality order parameter Qk(z). */ + else if (strcmp (long_options[option_index].name, "tet_param_z") == 0) + { + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->tet_param_z_given), + &(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "tet_param_z", '-', + additional_error)) + goto failure; + + } + /* volume-resolved tetrahedrality order parameter Qk(x,y,z). (voxelSize, rcut, and gaussWidth must be specified). */ + else if (strcmp (long_options[option_index].name, "tet_param_xyz") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->tet_param_xyz_given), + &(local_args_info.tet_param_xyz_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "tet_param_xyz", '-', + additional_error)) + goto failure; + + } + /* slab-resolved RNEMD statistics (temperature, density, velocity). */ + else if (strcmp (long_options[option_index].name, "rnemdz") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->rnemdz_given), + &(local_args_info.rnemdz_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "rnemdz", '-', + additional_error)) + goto failure; + + } + /* shell-resolved RNEMD statistics (temperature, density, angular velocity). */ + else if (strcmp (long_options[option_index].name, "rnemdr") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->rnemdr_given), + &(local_args_info.rnemdr_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "rnemdr", '-', + additional_error)) + goto failure; + + } + /* shell and angle-resolved RNEMD statistics (temperature, density, angular velocity). */ + else if (strcmp (long_options[option_index].name, "rnemdrt") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->rnemdrt_given), + &(local_args_info.rnemdrt_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "rnemdrt", '-', + additional_error)) + goto failure; + + } + /* electrostatic potential to frequency map based on the Cho nitrile fits. */ + else if (strcmp (long_options[option_index].name, "nitrile") == 0) + { + + if (args_info->staticProps_group_counter && override) + reset_group_staticProps (args_info); + args_info->staticProps_group_counter += 1; + + if (update_arg( 0 , + 0 , &(args_info->nitrile_given), + &(local_args_info.nitrile_given), optarg, 0, 0, ARG_NO, + check_ambiguity, override, 0, 0, + "nitrile", '-', + additional_error)) + goto failure; + + } + break; case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */