| 1 | 
  | 
/* | 
| 2 | 
< | 
  File autogenerated by gengetopt version 2.22 | 
| 2 | 
> | 
  File autogenerated by gengetopt version 2.22.4 | 
| 3 | 
  | 
  generated with the following command: | 
| 4 | 
< | 
  gengetopt -F StaticPropsCmd -u  | 
| 4 | 
> | 
  gengetopt --file-name=StaticPropsCmd --unamed-opts  | 
| 5 | 
  | 
 | 
| 6 | 
  | 
  The developers of gengetopt consider the fixed text that goes in all | 
| 7 | 
  | 
  gengetopt output files to be in the public domain: | 
| 17 | 
  | 
#include <stdlib.h> | 
| 18 | 
  | 
#include <string.h> | 
| 19 | 
  | 
 | 
| 20 | 
< | 
#include "getopt.h" | 
| 20 | 
> | 
#ifndef FIX_UNUSED | 
| 21 | 
> | 
#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ | 
| 22 | 
> | 
#endif | 
| 23 | 
  | 
 | 
| 24 | 
+ | 
#ifdef WIN32 | 
| 25 | 
+ | 
#include "utils/wingetopt.h" | 
| 26 | 
+ | 
#else | 
| 27 | 
+ | 
#include <getopt.h> | 
| 28 | 
+ | 
#endif | 
| 29 | 
+ | 
 | 
| 30 | 
  | 
#include "StaticPropsCmd.h" | 
| 31 | 
  | 
 | 
| 32 | 
  | 
const char *gengetopt_args_info_purpose = ""; | 
| 56 | 
  | 
  "      --sele3=selection script  select the third stuntdouble set", | 
| 57 | 
  | 
  "      --refsele=selection script\n                                select reference (use and only use with --gxyz)", | 
| 58 | 
  | 
  "      --comsele=selection script\n                                select stunt doubles for center-of-mass \n                                  reference point", | 
| 59 | 
+ | 
  "      --seleoffset=INT          global index offset for a second object (used \n                                  to define a vector between sites in molecule)", | 
| 60 | 
+ | 
  "      --seleoffset2=INT         global index offset for a third object (used to \n                                  define a vector between sites in molecule)", | 
| 61 | 
  | 
  "      --molname=STRING          molecule name", | 
| 62 | 
  | 
  "      --begin=INT               begin internal index", | 
| 63 | 
  | 
  "      --end=INT                 end internal index", | 
| 64 | 
  | 
  "      --radius=DOUBLE           nanoparticle radius", | 
| 65 | 
+ | 
  "  -v, --voxelSize=DOUBLE        voxel size (angstroms)", | 
| 66 | 
+ | 
  "      --gaussWidth=DOUBLE       Gaussian width (angstroms)", | 
| 67 | 
  | 
  "\n Group: staticProps\n   an option of this group is required", | 
| 68 | 
  | 
  "      --bo                      bond order parameter (--rcut must be specified)", | 
| 69 | 
< | 
  "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)", | 
| 69 | 
> | 
  "      --ior                     icosahedral bond order parameter as a function \n                                  of radius (--rcut must be specified)", | 
| 70 | 
> | 
  "      --for                     FCC bond order parameter as a function of \n                                  radius (--rcut must be specified)", | 
| 71 | 
  | 
  "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)", | 
| 72 | 
+ | 
  "      --count                   count of molecules matching selection criteria \n                                  (and associated statistics)", | 
| 73 | 
  | 
  "  -g, --gofr                    g(r)", | 
| 74 | 
  | 
  "      --gofz                    g(z)", | 
| 75 | 
  | 
  "      --r_theta                 g(r, cos(theta))", | 
| 78 | 
  | 
  "      --theta_omega             g(cos(theta), cos(omega))", | 
| 79 | 
  | 
  "      --gxyz                    g(x, y, z)", | 
| 80 | 
  | 
  "      --twodgofr                2D g(r) (Slab width --dz must be specified)", | 
| 81 | 
< | 
  "  -p, --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)", | 
| 81 | 
> | 
  "  -p, --p2                      p2 order parameter (--sele1 must be specified, \n                                  --sele2 is optional)", | 
| 82 | 
  | 
  "      --rp2                     rp2 order parameter (--sele1 and --sele2 must \n                                  be specified)", | 
| 83 | 
  | 
  "  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)", | 
| 84 | 
  | 
  "  -d, --density                 density plot", | 
| 85 | 
  | 
  "      --slab_density            slab density", | 
| 86 | 
< | 
  "      --p_angle                 p(cos(theta))", | 
| 86 | 
> | 
  "      --p_angle                 p(cos(theta)) (--sele1 must be specified, \n                                  --sele2 is optional)", | 
| 87 | 
  | 
  "      --hxy                     hxy", | 
| 88 | 
  | 
  "      --rho_r                   rho of R", | 
| 89 | 
+ | 
  "      --angle_r                 angle of R", | 
| 90 | 
  | 
  "      --hullvol                 hull volume of nanoparticle", | 
| 91 | 
+ | 
  "      --rodlength               length of nanorod", | 
| 92 | 
+ | 
  "  -Q, --tet_param               tetrahedrality order parameter (Qk)", | 
| 93 | 
+ | 
  "      --tet_param_z             spatially-resolved tetrahedrality order \n                                  parameter Qk(z)", | 
| 94 | 
+ | 
  "      --tet_param_xyz           volume-resolved tetrahedrality order parameter \n                                  Qk(x,y,z).  (voxelSize, rcut, and gaussWidth \n                                  must be specified)", | 
| 95 | 
+ | 
  "      --rnemdz                  slab-resolved RNEMD statistics (temperature, \n                                  density, velocity)", | 
| 96 | 
+ | 
  "      --rnemdr                  shell-resolved RNEMD statistics (temperature, \n                                  density, angular velocity)", | 
| 97 | 
+ | 
  "      --rnemdrt                 shell and angle-resolved RNEMD statistics \n                                  (temperature, density, angular velocity)", | 
| 98 | 
+ | 
  "      --nitrile                 electrostatic potential to frequency map based \n                                  on the Cho nitrile fits", | 
| 99 | 
+ | 
  "  -m, --multipole               average multipole moments contained within \n                                  cutoff spheres as a function of radius", | 
| 100 | 
  | 
    0 | 
| 101 | 
  | 
}; | 
| 102 | 
  | 
 | 
| 112 | 
  | 
void clear_args (struct gengetopt_args_info *args_info); | 
| 113 | 
  | 
 | 
| 114 | 
  | 
static int | 
| 115 | 
< | 
cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, | 
| 115 | 
> | 
cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, | 
| 116 | 
  | 
                        struct cmdline_parser_params *params, const char *additional_error); | 
| 117 | 
  | 
 | 
| 118 | 
  | 
static int | 
| 144 | 
  | 
  args_info->sele3_given = 0 ; | 
| 145 | 
  | 
  args_info->refsele_given = 0 ; | 
| 146 | 
  | 
  args_info->comsele_given = 0 ; | 
| 147 | 
+ | 
  args_info->seleoffset_given = 0 ; | 
| 148 | 
+ | 
  args_info->seleoffset2_given = 0 ; | 
| 149 | 
  | 
  args_info->molname_given = 0 ; | 
| 150 | 
  | 
  args_info->begin_given = 0 ; | 
| 151 | 
  | 
  args_info->end_given = 0 ; | 
| 152 | 
  | 
  args_info->radius_given = 0 ; | 
| 153 | 
+ | 
  args_info->voxelSize_given = 0 ; | 
| 154 | 
+ | 
  args_info->gaussWidth_given = 0 ; | 
| 155 | 
  | 
  args_info->bo_given = 0 ; | 
| 156 | 
< | 
  args_info->bor_given = 0 ; | 
| 156 | 
> | 
  args_info->ior_given = 0 ; | 
| 157 | 
> | 
  args_info->for_given = 0 ; | 
| 158 | 
  | 
  args_info->bad_given = 0 ; | 
| 159 | 
+ | 
  args_info->count_given = 0 ; | 
| 160 | 
  | 
  args_info->gofr_given = 0 ; | 
| 161 | 
  | 
  args_info->gofz_given = 0 ; | 
| 162 | 
  | 
  args_info->r_theta_given = 0 ; | 
| 173 | 
  | 
  args_info->p_angle_given = 0 ; | 
| 174 | 
  | 
  args_info->hxy_given = 0 ; | 
| 175 | 
  | 
  args_info->rho_r_given = 0 ; | 
| 176 | 
+ | 
  args_info->angle_r_given = 0 ; | 
| 177 | 
  | 
  args_info->hullvol_given = 0 ; | 
| 178 | 
+ | 
  args_info->rodlength_given = 0 ; | 
| 179 | 
+ | 
  args_info->tet_param_given = 0 ; | 
| 180 | 
+ | 
  args_info->tet_param_z_given = 0 ; | 
| 181 | 
+ | 
  args_info->tet_param_xyz_given = 0 ; | 
| 182 | 
+ | 
  args_info->rnemdz_given = 0 ; | 
| 183 | 
+ | 
  args_info->rnemdr_given = 0 ; | 
| 184 | 
+ | 
  args_info->rnemdrt_given = 0 ; | 
| 185 | 
+ | 
  args_info->nitrile_given = 0 ; | 
| 186 | 
+ | 
  args_info->multipole_given = 0 ; | 
| 187 | 
  | 
  args_info->staticProps_group_counter = 0 ; | 
| 188 | 
  | 
} | 
| 189 | 
  | 
 | 
| 190 | 
  | 
static | 
| 191 | 
  | 
void clear_args (struct gengetopt_args_info *args_info) | 
| 192 | 
  | 
{ | 
| 193 | 
+ | 
  FIX_UNUSED (args_info); | 
| 194 | 
  | 
  args_info->input_arg = NULL; | 
| 195 | 
  | 
  args_info->input_orig = NULL; | 
| 196 | 
  | 
  args_info->output_arg = NULL; | 
| 223 | 
  | 
  args_info->refsele_orig = NULL; | 
| 224 | 
  | 
  args_info->comsele_arg = NULL; | 
| 225 | 
  | 
  args_info->comsele_orig = NULL; | 
| 226 | 
+ | 
  args_info->seleoffset_orig = NULL; | 
| 227 | 
+ | 
  args_info->seleoffset2_orig = NULL; | 
| 228 | 
  | 
  args_info->molname_arg = NULL; | 
| 229 | 
  | 
  args_info->molname_orig = NULL; | 
| 230 | 
  | 
  args_info->begin_orig = NULL; | 
| 231 | 
  | 
  args_info->end_orig = NULL; | 
| 232 | 
  | 
  args_info->radius_orig = NULL; | 
| 233 | 
+ | 
  args_info->voxelSize_orig = NULL; | 
| 234 | 
+ | 
  args_info->gaussWidth_orig = NULL; | 
| 235 | 
  | 
   | 
| 236 | 
  | 
} | 
| 237 | 
  | 
 | 
| 260 | 
  | 
  args_info->sele3_help = gengetopt_args_info_help[17] ; | 
| 261 | 
  | 
  args_info->refsele_help = gengetopt_args_info_help[18] ; | 
| 262 | 
  | 
  args_info->comsele_help = gengetopt_args_info_help[19] ; | 
| 263 | 
< | 
  args_info->molname_help = gengetopt_args_info_help[20] ; | 
| 264 | 
< | 
  args_info->begin_help = gengetopt_args_info_help[21] ; | 
| 265 | 
< | 
  args_info->end_help = gengetopt_args_info_help[22] ; | 
| 266 | 
< | 
  args_info->radius_help = gengetopt_args_info_help[23] ; | 
| 267 | 
< | 
  args_info->bo_help = gengetopt_args_info_help[25] ; | 
| 268 | 
< | 
  args_info->bor_help = gengetopt_args_info_help[26] ; | 
| 269 | 
< | 
  args_info->bad_help = gengetopt_args_info_help[27] ; | 
| 270 | 
< | 
  args_info->gofr_help = gengetopt_args_info_help[28] ; | 
| 271 | 
< | 
  args_info->gofz_help = gengetopt_args_info_help[29] ; | 
| 272 | 
< | 
  args_info->r_theta_help = gengetopt_args_info_help[30] ; | 
| 273 | 
< | 
  args_info->r_omega_help = gengetopt_args_info_help[31] ; | 
| 274 | 
< | 
  args_info->r_z_help = gengetopt_args_info_help[32] ; | 
| 275 | 
< | 
  args_info->theta_omega_help = gengetopt_args_info_help[33] ; | 
| 276 | 
< | 
  args_info->gxyz_help = gengetopt_args_info_help[34] ; | 
| 277 | 
< | 
  args_info->twodgofr_help = gengetopt_args_info_help[35] ; | 
| 278 | 
< | 
  args_info->p2_help = gengetopt_args_info_help[36] ; | 
| 279 | 
< | 
  args_info->rp2_help = gengetopt_args_info_help[37] ; | 
| 280 | 
< | 
  args_info->scd_help = gengetopt_args_info_help[38] ; | 
| 281 | 
< | 
  args_info->density_help = gengetopt_args_info_help[39] ; | 
| 282 | 
< | 
  args_info->slab_density_help = gengetopt_args_info_help[40] ; | 
| 283 | 
< | 
  args_info->p_angle_help = gengetopt_args_info_help[41] ; | 
| 284 | 
< | 
  args_info->hxy_help = gengetopt_args_info_help[42] ; | 
| 285 | 
< | 
  args_info->rho_r_help = gengetopt_args_info_help[43] ; | 
| 286 | 
< | 
  args_info->hullvol_help = gengetopt_args_info_help[44] ; | 
| 263 | 
> | 
  args_info->seleoffset_help = gengetopt_args_info_help[20] ; | 
| 264 | 
> | 
  args_info->seleoffset2_help = gengetopt_args_info_help[21] ; | 
| 265 | 
> | 
  args_info->molname_help = gengetopt_args_info_help[22] ; | 
| 266 | 
> | 
  args_info->begin_help = gengetopt_args_info_help[23] ; | 
| 267 | 
> | 
  args_info->end_help = gengetopt_args_info_help[24] ; | 
| 268 | 
> | 
  args_info->radius_help = gengetopt_args_info_help[25] ; | 
| 269 | 
> | 
  args_info->voxelSize_help = gengetopt_args_info_help[26] ; | 
| 270 | 
> | 
  args_info->gaussWidth_help = gengetopt_args_info_help[27] ; | 
| 271 | 
> | 
  args_info->bo_help = gengetopt_args_info_help[29] ; | 
| 272 | 
> | 
  args_info->ior_help = gengetopt_args_info_help[30] ; | 
| 273 | 
> | 
  args_info->for_help = gengetopt_args_info_help[31] ; | 
| 274 | 
> | 
  args_info->bad_help = gengetopt_args_info_help[32] ; | 
| 275 | 
> | 
  args_info->count_help = gengetopt_args_info_help[33] ; | 
| 276 | 
> | 
  args_info->gofr_help = gengetopt_args_info_help[34] ; | 
| 277 | 
> | 
  args_info->gofz_help = gengetopt_args_info_help[35] ; | 
| 278 | 
> | 
  args_info->r_theta_help = gengetopt_args_info_help[36] ; | 
| 279 | 
> | 
  args_info->r_omega_help = gengetopt_args_info_help[37] ; | 
| 280 | 
> | 
  args_info->r_z_help = gengetopt_args_info_help[38] ; | 
| 281 | 
> | 
  args_info->theta_omega_help = gengetopt_args_info_help[39] ; | 
| 282 | 
> | 
  args_info->gxyz_help = gengetopt_args_info_help[40] ; | 
| 283 | 
> | 
  args_info->twodgofr_help = gengetopt_args_info_help[41] ; | 
| 284 | 
> | 
  args_info->p2_help = gengetopt_args_info_help[42] ; | 
| 285 | 
> | 
  args_info->rp2_help = gengetopt_args_info_help[43] ; | 
| 286 | 
> | 
  args_info->scd_help = gengetopt_args_info_help[44] ; | 
| 287 | 
> | 
  args_info->density_help = gengetopt_args_info_help[45] ; | 
| 288 | 
> | 
  args_info->slab_density_help = gengetopt_args_info_help[46] ; | 
| 289 | 
> | 
  args_info->p_angle_help = gengetopt_args_info_help[47] ; | 
| 290 | 
> | 
  args_info->hxy_help = gengetopt_args_info_help[48] ; | 
| 291 | 
> | 
  args_info->rho_r_help = gengetopt_args_info_help[49] ; | 
| 292 | 
> | 
  args_info->angle_r_help = gengetopt_args_info_help[50] ; | 
| 293 | 
> | 
  args_info->hullvol_help = gengetopt_args_info_help[51] ; | 
| 294 | 
> | 
  args_info->rodlength_help = gengetopt_args_info_help[52] ; | 
| 295 | 
> | 
  args_info->tet_param_help = gengetopt_args_info_help[53] ; | 
| 296 | 
> | 
  args_info->tet_param_z_help = gengetopt_args_info_help[54] ; | 
| 297 | 
> | 
  args_info->tet_param_xyz_help = gengetopt_args_info_help[55] ; | 
| 298 | 
> | 
  args_info->rnemdz_help = gengetopt_args_info_help[56] ; | 
| 299 | 
> | 
  args_info->rnemdr_help = gengetopt_args_info_help[57] ; | 
| 300 | 
> | 
  args_info->rnemdrt_help = gengetopt_args_info_help[58] ; | 
| 301 | 
> | 
  args_info->nitrile_help = gengetopt_args_info_help[59] ; | 
| 302 | 
> | 
  args_info->multipole_help = gengetopt_args_info_help[60] ; | 
| 303 | 
  | 
   | 
| 304 | 
  | 
} | 
| 305 | 
  | 
 | 
| 306 | 
  | 
void | 
| 307 | 
  | 
cmdline_parser_print_version (void) | 
| 308 | 
  | 
{ | 
| 309 | 
< | 
  printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); | 
| 309 | 
> | 
  printf ("%s %s\n", | 
| 310 | 
> | 
     (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), | 
| 311 | 
> | 
     CMDLINE_PARSER_VERSION); | 
| 312 | 
  | 
} | 
| 313 | 
  | 
 | 
| 314 | 
  | 
static void print_help_common(void) { | 
| 323 | 
  | 
  printf("\n"); | 
| 324 | 
  | 
 | 
| 325 | 
  | 
  if (strlen(gengetopt_args_info_description) > 0) | 
| 326 | 
< | 
    printf("%s\n", gengetopt_args_info_description); | 
| 326 | 
> | 
    printf("%s\n\n", gengetopt_args_info_description); | 
| 327 | 
  | 
} | 
| 328 | 
  | 
 | 
| 329 | 
  | 
void | 
| 342 | 
  | 
  clear_args (args_info); | 
| 343 | 
  | 
  init_args_info (args_info); | 
| 344 | 
  | 
 | 
| 345 | 
< | 
  args_info->inputs = NULL; | 
| 345 | 
> | 
  args_info->inputs = 0; | 
| 346 | 
  | 
  args_info->inputs_num = 0; | 
| 347 | 
  | 
} | 
| 348 | 
  | 
 | 
| 408 | 
  | 
  free_string_field (&(args_info->refsele_orig)); | 
| 409 | 
  | 
  free_string_field (&(args_info->comsele_arg)); | 
| 410 | 
  | 
  free_string_field (&(args_info->comsele_orig)); | 
| 411 | 
+ | 
  free_string_field (&(args_info->seleoffset_orig)); | 
| 412 | 
+ | 
  free_string_field (&(args_info->seleoffset2_orig)); | 
| 413 | 
  | 
  free_string_field (&(args_info->molname_arg)); | 
| 414 | 
  | 
  free_string_field (&(args_info->molname_orig)); | 
| 415 | 
  | 
  free_string_field (&(args_info->begin_orig)); | 
| 416 | 
  | 
  free_string_field (&(args_info->end_orig)); | 
| 417 | 
  | 
  free_string_field (&(args_info->radius_orig)); | 
| 418 | 
+ | 
  free_string_field (&(args_info->voxelSize_orig)); | 
| 419 | 
+ | 
  free_string_field (&(args_info->gaussWidth_orig)); | 
| 420 | 
  | 
   | 
| 421 | 
  | 
   | 
| 422 | 
  | 
  for (i = 0; i < args_info->inputs_num; ++i) | 
| 430 | 
  | 
 | 
| 431 | 
  | 
 | 
| 432 | 
  | 
static void | 
| 433 | 
< | 
write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[]) | 
| 433 | 
> | 
write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) | 
| 434 | 
  | 
{ | 
| 435 | 
+ | 
  FIX_UNUSED (values); | 
| 436 | 
  | 
  if (arg) { | 
| 437 | 
  | 
    fprintf(outfile, "%s=\"%s\"\n", opt, arg); | 
| 438 | 
  | 
  } else { | 
| 492 | 
  | 
    write_into_file(outfile, "refsele", args_info->refsele_orig, 0); | 
| 493 | 
  | 
  if (args_info->comsele_given) | 
| 494 | 
  | 
    write_into_file(outfile, "comsele", args_info->comsele_orig, 0); | 
| 495 | 
+ | 
  if (args_info->seleoffset_given) | 
| 496 | 
+ | 
    write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0); | 
| 497 | 
+ | 
  if (args_info->seleoffset2_given) | 
| 498 | 
+ | 
    write_into_file(outfile, "seleoffset2", args_info->seleoffset2_orig, 0); | 
| 499 | 
  | 
  if (args_info->molname_given) | 
| 500 | 
  | 
    write_into_file(outfile, "molname", args_info->molname_orig, 0); | 
| 501 | 
  | 
  if (args_info->begin_given) | 
| 504 | 
  | 
    write_into_file(outfile, "end", args_info->end_orig, 0); | 
| 505 | 
  | 
  if (args_info->radius_given) | 
| 506 | 
  | 
    write_into_file(outfile, "radius", args_info->radius_orig, 0); | 
| 507 | 
+ | 
  if (args_info->voxelSize_given) | 
| 508 | 
+ | 
    write_into_file(outfile, "voxelSize", args_info->voxelSize_orig, 0); | 
| 509 | 
+ | 
  if (args_info->gaussWidth_given) | 
| 510 | 
+ | 
    write_into_file(outfile, "gaussWidth", args_info->gaussWidth_orig, 0); | 
| 511 | 
  | 
  if (args_info->bo_given) | 
| 512 | 
  | 
    write_into_file(outfile, "bo", 0, 0 ); | 
| 513 | 
< | 
  if (args_info->bor_given) | 
| 514 | 
< | 
    write_into_file(outfile, "bor", 0, 0 ); | 
| 513 | 
> | 
  if (args_info->ior_given) | 
| 514 | 
> | 
    write_into_file(outfile, "ior", 0, 0 ); | 
| 515 | 
> | 
  if (args_info->for_given) | 
| 516 | 
> | 
    write_into_file(outfile, "for", 0, 0 ); | 
| 517 | 
  | 
  if (args_info->bad_given) | 
| 518 | 
  | 
    write_into_file(outfile, "bad", 0, 0 ); | 
| 519 | 
+ | 
  if (args_info->count_given) | 
| 520 | 
+ | 
    write_into_file(outfile, "count", 0, 0 ); | 
| 521 | 
  | 
  if (args_info->gofr_given) | 
| 522 | 
  | 
    write_into_file(outfile, "gofr", 0, 0 ); | 
| 523 | 
  | 
  if (args_info->gofz_given) | 
| 550 | 
  | 
    write_into_file(outfile, "hxy", 0, 0 ); | 
| 551 | 
  | 
  if (args_info->rho_r_given) | 
| 552 | 
  | 
    write_into_file(outfile, "rho_r", 0, 0 ); | 
| 553 | 
+ | 
  if (args_info->angle_r_given) | 
| 554 | 
+ | 
    write_into_file(outfile, "angle_r", 0, 0 ); | 
| 555 | 
  | 
  if (args_info->hullvol_given) | 
| 556 | 
  | 
    write_into_file(outfile, "hullvol", 0, 0 ); | 
| 557 | 
+ | 
  if (args_info->rodlength_given) | 
| 558 | 
+ | 
    write_into_file(outfile, "rodlength", 0, 0 ); | 
| 559 | 
+ | 
  if (args_info->tet_param_given) | 
| 560 | 
+ | 
    write_into_file(outfile, "tet_param", 0, 0 ); | 
| 561 | 
+ | 
  if (args_info->tet_param_z_given) | 
| 562 | 
+ | 
    write_into_file(outfile, "tet_param_z", 0, 0 ); | 
| 563 | 
+ | 
  if (args_info->tet_param_xyz_given) | 
| 564 | 
+ | 
    write_into_file(outfile, "tet_param_xyz", 0, 0 ); | 
| 565 | 
+ | 
  if (args_info->rnemdz_given) | 
| 566 | 
+ | 
    write_into_file(outfile, "rnemdz", 0, 0 ); | 
| 567 | 
+ | 
  if (args_info->rnemdr_given) | 
| 568 | 
+ | 
    write_into_file(outfile, "rnemdr", 0, 0 ); | 
| 569 | 
+ | 
  if (args_info->rnemdrt_given) | 
| 570 | 
+ | 
    write_into_file(outfile, "rnemdrt", 0, 0 ); | 
| 571 | 
+ | 
  if (args_info->nitrile_given) | 
| 572 | 
+ | 
    write_into_file(outfile, "nitrile", 0, 0 ); | 
| 573 | 
+ | 
  if (args_info->multipole_given) | 
| 574 | 
+ | 
    write_into_file(outfile, "multipole", 0, 0 ); | 
| 575 | 
  | 
   | 
| 576 | 
  | 
 | 
| 577 | 
  | 
  i = EXIT_SUCCESS; | 
| 608 | 
  | 
char * | 
| 609 | 
  | 
gengetopt_strdup (const char *s) | 
| 610 | 
  | 
{ | 
| 611 | 
< | 
  char *result = NULL; | 
| 611 | 
> | 
  char *result = 0; | 
| 612 | 
  | 
  if (!s) | 
| 613 | 
  | 
    return result; | 
| 614 | 
  | 
 | 
| 626 | 
  | 
    return; | 
| 627 | 
  | 
   | 
| 628 | 
  | 
  args_info->bo_given = 0 ; | 
| 629 | 
< | 
  args_info->bor_given = 0 ; | 
| 629 | 
> | 
  args_info->ior_given = 0 ; | 
| 630 | 
> | 
  args_info->for_given = 0 ; | 
| 631 | 
  | 
  args_info->bad_given = 0 ; | 
| 632 | 
+ | 
  args_info->count_given = 0 ; | 
| 633 | 
  | 
  args_info->gofr_given = 0 ; | 
| 634 | 
  | 
  args_info->gofz_given = 0 ; | 
| 635 | 
  | 
  args_info->r_theta_given = 0 ; | 
| 646 | 
  | 
  args_info->p_angle_given = 0 ; | 
| 647 | 
  | 
  args_info->hxy_given = 0 ; | 
| 648 | 
  | 
  args_info->rho_r_given = 0 ; | 
| 649 | 
+ | 
  args_info->angle_r_given = 0 ; | 
| 650 | 
  | 
  args_info->hullvol_given = 0 ; | 
| 651 | 
+ | 
  args_info->rodlength_given = 0 ; | 
| 652 | 
+ | 
  args_info->tet_param_given = 0 ; | 
| 653 | 
+ | 
  args_info->tet_param_z_given = 0 ; | 
| 654 | 
+ | 
  args_info->tet_param_xyz_given = 0 ; | 
| 655 | 
+ | 
  args_info->rnemdz_given = 0 ; | 
| 656 | 
+ | 
  args_info->rnemdr_given = 0 ; | 
| 657 | 
+ | 
  args_info->rnemdrt_given = 0 ; | 
| 658 | 
+ | 
  args_info->nitrile_given = 0 ; | 
| 659 | 
+ | 
  args_info->multipole_given = 0 ; | 
| 660 | 
  | 
 | 
| 661 | 
  | 
  args_info->staticProps_group_counter = 0; | 
| 662 | 
  | 
} | 
| 663 | 
  | 
 | 
| 664 | 
  | 
int | 
| 665 | 
< | 
cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) | 
| 665 | 
> | 
cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) | 
| 666 | 
  | 
{ | 
| 667 | 
  | 
  return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); | 
| 668 | 
  | 
} | 
| 669 | 
  | 
 | 
| 670 | 
  | 
int | 
| 671 | 
< | 
cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info, | 
| 671 | 
> | 
cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, | 
| 672 | 
  | 
                   struct cmdline_parser_params *params) | 
| 673 | 
  | 
{ | 
| 674 | 
  | 
  int result; | 
| 675 | 
< | 
  result = cmdline_parser_internal (argc, argv, args_info, params, NULL); | 
| 675 | 
> | 
  result = cmdline_parser_internal (argc, argv, args_info, params, 0); | 
| 676 | 
  | 
 | 
| 677 | 
  | 
  if (result == EXIT_FAILURE) | 
| 678 | 
  | 
    { | 
| 684 | 
  | 
} | 
| 685 | 
  | 
 | 
| 686 | 
  | 
int | 
| 687 | 
< | 
cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) | 
| 687 | 
> | 
cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) | 
| 688 | 
  | 
{ | 
| 689 | 
  | 
  int result; | 
| 690 | 
  | 
  struct cmdline_parser_params params; | 
| 695 | 
  | 
  params.check_ambiguity = 0; | 
| 696 | 
  | 
  params.print_errors = 1; | 
| 697 | 
  | 
 | 
| 698 | 
< | 
  result = cmdline_parser_internal (argc, argv, args_info, ¶ms, NULL); | 
| 698 | 
> | 
  result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0); | 
| 699 | 
  | 
 | 
| 700 | 
  | 
  if (result == EXIT_FAILURE) | 
| 701 | 
  | 
    { | 
| 711 | 
  | 
{ | 
| 712 | 
  | 
  int result = EXIT_SUCCESS; | 
| 713 | 
  | 
 | 
| 714 | 
< | 
  if (cmdline_parser_required2(args_info, prog_name, NULL) > 0) | 
| 714 | 
> | 
  if (cmdline_parser_required2(args_info, prog_name, 0) > 0) | 
| 715 | 
  | 
    result = EXIT_FAILURE; | 
| 716 | 
  | 
 | 
| 717 | 
  | 
  if (result == EXIT_FAILURE) | 
| 727 | 
  | 
cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error) | 
| 728 | 
  | 
{ | 
| 729 | 
  | 
  int error = 0; | 
| 730 | 
+ | 
  FIX_UNUSED (additional_error); | 
| 731 | 
  | 
 | 
| 732 | 
  | 
  /* checks for required options */ | 
| 733 | 
  | 
  if (! args_info->input_given) | 
| 738 | 
  | 
   | 
| 739 | 
  | 
  if (args_info->staticProps_group_counter == 0) | 
| 740 | 
  | 
    { | 
| 741 | 
< | 
      fprintf (stderr, "%s: %d options of group staticProps were given. One is required.%s\n", prog_name, args_info->staticProps_group_counter, (additional_error ? additional_error : "")); | 
| 741 | 
> | 
      fprintf (stderr, "%s: %d options of group staticProps were given. One is required%s.\n", prog_name, args_info->staticProps_group_counter, (additional_error ? additional_error : "")); | 
| 742 | 
  | 
      error = 1; | 
| 743 | 
  | 
    } | 
| 744 | 
  | 
   | 
| 772 | 
  | 
static | 
| 773 | 
  | 
int update_arg(void *field, char **orig_field, | 
| 774 | 
  | 
               unsigned int *field_given, unsigned int *prev_given,  | 
| 775 | 
< | 
               char *value, char *possible_values[], const char *default_value, | 
| 775 | 
> | 
               char *value, const char *possible_values[], | 
| 776 | 
> | 
               const char *default_value, | 
| 777 | 
  | 
               cmdline_parser_arg_type arg_type, | 
| 778 | 
  | 
               int check_ambiguity, int override, | 
| 779 | 
  | 
               int no_free, int multiple_option, | 
| 784 | 
  | 
  const char *val = value; | 
| 785 | 
  | 
  int found; | 
| 786 | 
  | 
  char **string_field; | 
| 787 | 
+ | 
  FIX_UNUSED (field); | 
| 788 | 
  | 
 | 
| 789 | 
  | 
  stop_char = 0; | 
| 790 | 
  | 
  found = 0; | 
| 802 | 
  | 
      return 1; /* failure */ | 
| 803 | 
  | 
    } | 
| 804 | 
  | 
 | 
| 805 | 
+ | 
  FIX_UNUSED (default_value); | 
| 806 | 
  | 
     | 
| 807 | 
  | 
  if (field_given && *field_given && ! override) | 
| 808 | 
  | 
    return 0; | 
| 866 | 
  | 
 | 
| 867 | 
  | 
 | 
| 868 | 
  | 
int | 
| 869 | 
< | 
cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, | 
| 869 | 
> | 
cmdline_parser_internal ( | 
| 870 | 
> | 
  int argc, char **argv, struct gengetopt_args_info *args_info, | 
| 871 | 
  | 
                        struct cmdline_parser_params *params, const char *additional_error) | 
| 872 | 
  | 
{ | 
| 873 | 
  | 
  int c;        /* Character of the parsed option.  */ | 
| 922 | 
  | 
        { "sele3",      1, NULL, 0 }, | 
| 923 | 
  | 
        { "refsele",    1, NULL, 0 }, | 
| 924 | 
  | 
        { "comsele",    1, NULL, 0 }, | 
| 925 | 
+ | 
        { "seleoffset", 1, NULL, 0 }, | 
| 926 | 
+ | 
        { "seleoffset2",        1, NULL, 0 }, | 
| 927 | 
  | 
        { "molname",    1, NULL, 0 }, | 
| 928 | 
  | 
        { "begin",      1, NULL, 0 }, | 
| 929 | 
  | 
        { "end",        1, NULL, 0 }, | 
| 930 | 
  | 
        { "radius",     1, NULL, 0 }, | 
| 931 | 
+ | 
        { "voxelSize",  1, NULL, 'v' }, | 
| 932 | 
+ | 
        { "gaussWidth", 1, NULL, 0 }, | 
| 933 | 
  | 
        { "bo", 0, NULL, 0 }, | 
| 934 | 
< | 
        { "bor",        0, NULL, 0 }, | 
| 934 | 
> | 
        { "ior",        0, NULL, 0 }, | 
| 935 | 
> | 
        { "for",        0, NULL, 0 }, | 
| 936 | 
  | 
        { "bad",        0, NULL, 0 }, | 
| 937 | 
+ | 
        { "count",      0, NULL, 0 }, | 
| 938 | 
  | 
        { "gofr",       0, NULL, 'g' }, | 
| 939 | 
  | 
        { "gofz",       0, NULL, 0 }, | 
| 940 | 
  | 
        { "r_theta",    0, NULL, 0 }, | 
| 951 | 
  | 
        { "p_angle",    0, NULL, 0 }, | 
| 952 | 
  | 
        { "hxy",        0, NULL, 0 }, | 
| 953 | 
  | 
        { "rho_r",      0, NULL, 0 }, | 
| 954 | 
+ | 
        { "angle_r",    0, NULL, 0 }, | 
| 955 | 
  | 
        { "hullvol",    0, NULL, 0 }, | 
| 956 | 
< | 
        { NULL, 0, NULL, 0 } | 
| 956 | 
> | 
        { "rodlength",  0, NULL, 0 }, | 
| 957 | 
> | 
        { "tet_param",  0, NULL, 'Q' }, | 
| 958 | 
> | 
        { "tet_param_z",        0, NULL, 0 }, | 
| 959 | 
> | 
        { "tet_param_xyz",      0, NULL, 0 }, | 
| 960 | 
> | 
        { "rnemdz",     0, NULL, 0 }, | 
| 961 | 
> | 
        { "rnemdr",     0, NULL, 0 }, | 
| 962 | 
> | 
        { "rnemdrt",    0, NULL, 0 }, | 
| 963 | 
> | 
        { "nitrile",    0, NULL, 0 }, | 
| 964 | 
> | 
        { "multipole",  0, NULL, 'm' }, | 
| 965 | 
> | 
        { 0,  0, 0, 0 } | 
| 966 | 
  | 
      }; | 
| 967 | 
  | 
 | 
| 968 | 
< | 
      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index); | 
| 968 | 
> | 
      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:v:gpsdQm", long_options, &option_index); | 
| 969 | 
  | 
 | 
| 970 | 
  | 
      if (c == -1) break;       /* Exit from `while (1)' loop.  */ | 
| 971 | 
  | 
 | 
| 1089 | 
  | 
            goto failure; | 
| 1090 | 
  | 
         | 
| 1091 | 
  | 
          break; | 
| 1092 | 
+ | 
        case 'v':       /* voxel size (angstroms).  */ | 
| 1093 | 
+ | 
         | 
| 1094 | 
+ | 
         | 
| 1095 | 
+ | 
          if (update_arg( (void *)&(args_info->voxelSize_arg),  | 
| 1096 | 
+ | 
               &(args_info->voxelSize_orig), &(args_info->voxelSize_given), | 
| 1097 | 
+ | 
              &(local_args_info.voxelSize_given), optarg, 0, 0, ARG_DOUBLE, | 
| 1098 | 
+ | 
              check_ambiguity, override, 0, 0, | 
| 1099 | 
+ | 
              "voxelSize", 'v', | 
| 1100 | 
+ | 
              additional_error)) | 
| 1101 | 
+ | 
            goto failure; | 
| 1102 | 
+ | 
         | 
| 1103 | 
+ | 
          break; | 
| 1104 | 
  | 
        case 'g':       /* g(r).  */ | 
| 1105 | 
  | 
         | 
| 1106 | 
  | 
          if (args_info->staticProps_group_counter && override) | 
| 1116 | 
  | 
            goto failure; | 
| 1117 | 
  | 
         | 
| 1118 | 
  | 
          break; | 
| 1119 | 
< | 
        case 'p':       /* p2 order parameter (--sele1 and --sele2 must be specified).  */ | 
| 1119 | 
> | 
        case 'p':       /* p2 order parameter (--sele1 must be specified, --sele2 is optional).  */ | 
| 1120 | 
  | 
         | 
| 1121 | 
  | 
          if (args_info->staticProps_group_counter && override) | 
| 1122 | 
  | 
            reset_group_staticProps (args_info); | 
| 1161 | 
  | 
            goto failure; | 
| 1162 | 
  | 
         | 
| 1163 | 
  | 
          break; | 
| 1164 | 
+ | 
        case 'Q':       /* tetrahedrality order parameter (Qk).  */ | 
| 1165 | 
+ | 
         | 
| 1166 | 
+ | 
          if (args_info->staticProps_group_counter && override) | 
| 1167 | 
+ | 
            reset_group_staticProps (args_info); | 
| 1168 | 
+ | 
          args_info->staticProps_group_counter += 1; | 
| 1169 | 
+ | 
         | 
| 1170 | 
+ | 
          if (update_arg( 0 ,  | 
| 1171 | 
+ | 
               0 , &(args_info->tet_param_given), | 
| 1172 | 
+ | 
              &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO, | 
| 1173 | 
+ | 
              check_ambiguity, override, 0, 0, | 
| 1174 | 
+ | 
              "tet_param", 'Q', | 
| 1175 | 
+ | 
              additional_error)) | 
| 1176 | 
+ | 
            goto failure; | 
| 1177 | 
+ | 
         | 
| 1178 | 
+ | 
          break; | 
| 1179 | 
+ | 
        case 'm':       /* average multipole moments contained within cutoff spheres as a function of radius.  */ | 
| 1180 | 
+ | 
         | 
| 1181 | 
+ | 
          if (args_info->staticProps_group_counter && override) | 
| 1182 | 
+ | 
            reset_group_staticProps (args_info); | 
| 1183 | 
+ | 
          args_info->staticProps_group_counter += 1; | 
| 1184 | 
+ | 
         | 
| 1185 | 
+ | 
          if (update_arg( 0 ,  | 
| 1186 | 
+ | 
               0 , &(args_info->multipole_given), | 
| 1187 | 
+ | 
              &(local_args_info.multipole_given), optarg, 0, 0, ARG_NO, | 
| 1188 | 
+ | 
              check_ambiguity, override, 0, 0, | 
| 1189 | 
+ | 
              "multipole", 'm', | 
| 1190 | 
+ | 
              additional_error)) | 
| 1191 | 
+ | 
            goto failure; | 
| 1192 | 
+ | 
         | 
| 1193 | 
+ | 
          break; | 
| 1194 | 
  | 
 | 
| 1195 | 
  | 
        case 0: /* Long option with no short option */ | 
| 1196 | 
  | 
          /* number of bins in z axis.  */ | 
| 1319 | 
  | 
              goto failure; | 
| 1320 | 
  | 
           | 
| 1321 | 
  | 
          } | 
| 1322 | 
+ | 
          /* global index offset for a second object (used to define a vector between sites in molecule).  */ | 
| 1323 | 
+ | 
          else if (strcmp (long_options[option_index].name, "seleoffset") == 0) | 
| 1324 | 
+ | 
          { | 
| 1325 | 
+ | 
           | 
| 1326 | 
+ | 
           | 
| 1327 | 
+ | 
            if (update_arg( (void *)&(args_info->seleoffset_arg),  | 
| 1328 | 
+ | 
                 &(args_info->seleoffset_orig), &(args_info->seleoffset_given), | 
| 1329 | 
+ | 
                &(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT, | 
| 1330 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1331 | 
+ | 
                "seleoffset", '-', | 
| 1332 | 
+ | 
                additional_error)) | 
| 1333 | 
+ | 
              goto failure; | 
| 1334 | 
+ | 
           | 
| 1335 | 
+ | 
          } | 
| 1336 | 
+ | 
          /* global index offset for a third object (used to define a vector between sites in molecule).  */ | 
| 1337 | 
+ | 
          else if (strcmp (long_options[option_index].name, "seleoffset2") == 0) | 
| 1338 | 
+ | 
          { | 
| 1339 | 
+ | 
           | 
| 1340 | 
+ | 
           | 
| 1341 | 
+ | 
            if (update_arg( (void *)&(args_info->seleoffset2_arg),  | 
| 1342 | 
+ | 
                 &(args_info->seleoffset2_orig), &(args_info->seleoffset2_given), | 
| 1343 | 
+ | 
                &(local_args_info.seleoffset2_given), optarg, 0, 0, ARG_INT, | 
| 1344 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1345 | 
+ | 
                "seleoffset2", '-', | 
| 1346 | 
+ | 
                additional_error)) | 
| 1347 | 
+ | 
              goto failure; | 
| 1348 | 
+ | 
           | 
| 1349 | 
+ | 
          } | 
| 1350 | 
  | 
          /* molecule name.  */ | 
| 1351 | 
  | 
          else if (strcmp (long_options[option_index].name, "molname") == 0) | 
| 1352 | 
  | 
          { | 
| 1399 | 
  | 
                &(local_args_info.radius_given), optarg, 0, 0, ARG_DOUBLE, | 
| 1400 | 
  | 
                check_ambiguity, override, 0, 0, | 
| 1401 | 
  | 
                "radius", '-', | 
| 1402 | 
+ | 
                additional_error)) | 
| 1403 | 
+ | 
              goto failure; | 
| 1404 | 
+ | 
           | 
| 1405 | 
+ | 
          } | 
| 1406 | 
+ | 
          /* Gaussian width (angstroms).  */ | 
| 1407 | 
+ | 
          else if (strcmp (long_options[option_index].name, "gaussWidth") == 0) | 
| 1408 | 
+ | 
          { | 
| 1409 | 
+ | 
           | 
| 1410 | 
+ | 
           | 
| 1411 | 
+ | 
            if (update_arg( (void *)&(args_info->gaussWidth_arg),  | 
| 1412 | 
+ | 
                 &(args_info->gaussWidth_orig), &(args_info->gaussWidth_given), | 
| 1413 | 
+ | 
                &(local_args_info.gaussWidth_given), optarg, 0, 0, ARG_DOUBLE, | 
| 1414 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1415 | 
+ | 
                "gaussWidth", '-', | 
| 1416 | 
  | 
                additional_error)) | 
| 1417 | 
  | 
              goto failure; | 
| 1418 | 
  | 
           | 
| 1434 | 
  | 
              goto failure; | 
| 1435 | 
  | 
           | 
| 1436 | 
  | 
          } | 
| 1437 | 
< | 
          /* bond order parameter as a function of radius (--rcut must be specified).  */ | 
| 1438 | 
< | 
          else if (strcmp (long_options[option_index].name, "bor") == 0) | 
| 1437 | 
> | 
          /* icosahedral bond order parameter as a function of radius (--rcut must be specified).  */ | 
| 1438 | 
> | 
          else if (strcmp (long_options[option_index].name, "ior") == 0) | 
| 1439 | 
  | 
          { | 
| 1440 | 
  | 
           | 
| 1441 | 
  | 
            if (args_info->staticProps_group_counter && override) | 
| 1443 | 
  | 
            args_info->staticProps_group_counter += 1; | 
| 1444 | 
  | 
           | 
| 1445 | 
  | 
            if (update_arg( 0 ,  | 
| 1446 | 
< | 
                 0 , &(args_info->bor_given), | 
| 1447 | 
< | 
                &(local_args_info.bor_given), optarg, 0, 0, ARG_NO, | 
| 1446 | 
> | 
                 0 , &(args_info->ior_given), | 
| 1447 | 
> | 
                &(local_args_info.ior_given), optarg, 0, 0, ARG_NO, | 
| 1448 | 
  | 
                check_ambiguity, override, 0, 0, | 
| 1449 | 
< | 
                "bor", '-', | 
| 1449 | 
> | 
                "ior", '-', | 
| 1450 | 
  | 
                additional_error)) | 
| 1451 | 
  | 
              goto failure; | 
| 1452 | 
  | 
           | 
| 1453 | 
  | 
          } | 
| 1454 | 
+ | 
          /* FCC bond order parameter as a function of radius (--rcut must be specified).  */ | 
| 1455 | 
+ | 
          else if (strcmp (long_options[option_index].name, "for") == 0) | 
| 1456 | 
+ | 
          { | 
| 1457 | 
+ | 
           | 
| 1458 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1459 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1460 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1461 | 
+ | 
           | 
| 1462 | 
+ | 
            if (update_arg( 0 ,  | 
| 1463 | 
+ | 
                 0 , &(args_info->for_given), | 
| 1464 | 
+ | 
                &(local_args_info.for_given), optarg, 0, 0, ARG_NO, | 
| 1465 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1466 | 
+ | 
                "for", '-', | 
| 1467 | 
+ | 
                additional_error)) | 
| 1468 | 
+ | 
              goto failure; | 
| 1469 | 
+ | 
           | 
| 1470 | 
+ | 
          } | 
| 1471 | 
  | 
          /* N(theta) bond angle density within (--rcut must be specified).  */ | 
| 1472 | 
  | 
          else if (strcmp (long_options[option_index].name, "bad") == 0) | 
| 1473 | 
  | 
          { | 
| 1485 | 
  | 
              goto failure; | 
| 1486 | 
  | 
           | 
| 1487 | 
  | 
          } | 
| 1488 | 
+ | 
          /* count of molecules matching selection criteria (and associated statistics).  */ | 
| 1489 | 
+ | 
          else if (strcmp (long_options[option_index].name, "count") == 0) | 
| 1490 | 
+ | 
          { | 
| 1491 | 
+ | 
           | 
| 1492 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1493 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1494 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1495 | 
+ | 
           | 
| 1496 | 
+ | 
            if (update_arg( 0 ,  | 
| 1497 | 
+ | 
                 0 , &(args_info->count_given), | 
| 1498 | 
+ | 
                &(local_args_info.count_given), optarg, 0, 0, ARG_NO, | 
| 1499 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1500 | 
+ | 
                "count", '-', | 
| 1501 | 
+ | 
                additional_error)) | 
| 1502 | 
+ | 
              goto failure; | 
| 1503 | 
+ | 
           | 
| 1504 | 
+ | 
          } | 
| 1505 | 
  | 
          /* g(z).  */ | 
| 1506 | 
  | 
          else if (strcmp (long_options[option_index].name, "gofz") == 0) | 
| 1507 | 
  | 
          { | 
| 1655 | 
  | 
              goto failure; | 
| 1656 | 
  | 
           | 
| 1657 | 
  | 
          } | 
| 1658 | 
< | 
          /* p(cos(theta)).  */ | 
| 1658 | 
> | 
          /* p(cos(theta)) (--sele1 must be specified, --sele2 is optional).  */ | 
| 1659 | 
  | 
          else if (strcmp (long_options[option_index].name, "p_angle") == 0) | 
| 1660 | 
  | 
          { | 
| 1661 | 
  | 
           | 
| 1702 | 
  | 
                &(local_args_info.rho_r_given), optarg, 0, 0, ARG_NO, | 
| 1703 | 
  | 
                check_ambiguity, override, 0, 0, | 
| 1704 | 
  | 
                "rho_r", '-', | 
| 1705 | 
+ | 
                additional_error)) | 
| 1706 | 
+ | 
              goto failure; | 
| 1707 | 
+ | 
           | 
| 1708 | 
+ | 
          } | 
| 1709 | 
+ | 
          /* angle of R.  */ | 
| 1710 | 
+ | 
          else if (strcmp (long_options[option_index].name, "angle_r") == 0) | 
| 1711 | 
+ | 
          { | 
| 1712 | 
+ | 
           | 
| 1713 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1714 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1715 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1716 | 
+ | 
           | 
| 1717 | 
+ | 
            if (update_arg( 0 ,  | 
| 1718 | 
+ | 
                 0 , &(args_info->angle_r_given), | 
| 1719 | 
+ | 
                &(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO, | 
| 1720 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1721 | 
+ | 
                "angle_r", '-', | 
| 1722 | 
  | 
                additional_error)) | 
| 1723 | 
  | 
              goto failure; | 
| 1724 | 
  | 
           | 
| 1740 | 
  | 
              goto failure; | 
| 1741 | 
  | 
           | 
| 1742 | 
  | 
          } | 
| 1743 | 
+ | 
          /* length of nanorod.  */ | 
| 1744 | 
+ | 
          else if (strcmp (long_options[option_index].name, "rodlength") == 0) | 
| 1745 | 
+ | 
          { | 
| 1746 | 
  | 
           | 
| 1747 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1748 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1749 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1750 | 
+ | 
           | 
| 1751 | 
+ | 
            if (update_arg( 0 ,  | 
| 1752 | 
+ | 
                 0 , &(args_info->rodlength_given), | 
| 1753 | 
+ | 
                &(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO, | 
| 1754 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1755 | 
+ | 
                "rodlength", '-', | 
| 1756 | 
+ | 
                additional_error)) | 
| 1757 | 
+ | 
              goto failure; | 
| 1758 | 
+ | 
           | 
| 1759 | 
+ | 
          } | 
| 1760 | 
+ | 
          /* spatially-resolved tetrahedrality order parameter Qk(z).  */ | 
| 1761 | 
+ | 
          else if (strcmp (long_options[option_index].name, "tet_param_z") == 0) | 
| 1762 | 
+ | 
          { | 
| 1763 | 
+ | 
           | 
| 1764 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1765 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1766 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1767 | 
+ | 
           | 
| 1768 | 
+ | 
            if (update_arg( 0 ,  | 
| 1769 | 
+ | 
                 0 , &(args_info->tet_param_z_given), | 
| 1770 | 
+ | 
                &(local_args_info.tet_param_z_given), optarg, 0, 0, ARG_NO, | 
| 1771 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1772 | 
+ | 
                "tet_param_z", '-', | 
| 1773 | 
+ | 
                additional_error)) | 
| 1774 | 
+ | 
              goto failure; | 
| 1775 | 
+ | 
           | 
| 1776 | 
+ | 
          } | 
| 1777 | 
+ | 
          /* volume-resolved tetrahedrality order parameter Qk(x,y,z).  (voxelSize, rcut, and gaussWidth must be specified).  */ | 
| 1778 | 
+ | 
          else if (strcmp (long_options[option_index].name, "tet_param_xyz") == 0) | 
| 1779 | 
+ | 
          { | 
| 1780 | 
+ | 
           | 
| 1781 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1782 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1783 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1784 | 
+ | 
           | 
| 1785 | 
+ | 
            if (update_arg( 0 ,  | 
| 1786 | 
+ | 
                 0 , &(args_info->tet_param_xyz_given), | 
| 1787 | 
+ | 
                &(local_args_info.tet_param_xyz_given), optarg, 0, 0, ARG_NO, | 
| 1788 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1789 | 
+ | 
                "tet_param_xyz", '-', | 
| 1790 | 
+ | 
                additional_error)) | 
| 1791 | 
+ | 
              goto failure; | 
| 1792 | 
+ | 
           | 
| 1793 | 
+ | 
          } | 
| 1794 | 
+ | 
          /* slab-resolved RNEMD statistics (temperature, density, velocity).  */ | 
| 1795 | 
+ | 
          else if (strcmp (long_options[option_index].name, "rnemdz") == 0) | 
| 1796 | 
+ | 
          { | 
| 1797 | 
+ | 
           | 
| 1798 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1799 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1800 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1801 | 
+ | 
           | 
| 1802 | 
+ | 
            if (update_arg( 0 ,  | 
| 1803 | 
+ | 
                 0 , &(args_info->rnemdz_given), | 
| 1804 | 
+ | 
                &(local_args_info.rnemdz_given), optarg, 0, 0, ARG_NO, | 
| 1805 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1806 | 
+ | 
                "rnemdz", '-', | 
| 1807 | 
+ | 
                additional_error)) | 
| 1808 | 
+ | 
              goto failure; | 
| 1809 | 
+ | 
           | 
| 1810 | 
+ | 
          } | 
| 1811 | 
+ | 
          /* shell-resolved RNEMD statistics (temperature, density, angular velocity).  */ | 
| 1812 | 
+ | 
          else if (strcmp (long_options[option_index].name, "rnemdr") == 0) | 
| 1813 | 
+ | 
          { | 
| 1814 | 
+ | 
           | 
| 1815 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1816 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1817 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1818 | 
+ | 
           | 
| 1819 | 
+ | 
            if (update_arg( 0 ,  | 
| 1820 | 
+ | 
                 0 , &(args_info->rnemdr_given), | 
| 1821 | 
+ | 
                &(local_args_info.rnemdr_given), optarg, 0, 0, ARG_NO, | 
| 1822 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1823 | 
+ | 
                "rnemdr", '-', | 
| 1824 | 
+ | 
                additional_error)) | 
| 1825 | 
+ | 
              goto failure; | 
| 1826 | 
+ | 
           | 
| 1827 | 
+ | 
          } | 
| 1828 | 
+ | 
          /* shell and angle-resolved RNEMD statistics (temperature, density, angular velocity).  */ | 
| 1829 | 
+ | 
          else if (strcmp (long_options[option_index].name, "rnemdrt") == 0) | 
| 1830 | 
+ | 
          { | 
| 1831 | 
+ | 
           | 
| 1832 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1833 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1834 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1835 | 
+ | 
           | 
| 1836 | 
+ | 
            if (update_arg( 0 ,  | 
| 1837 | 
+ | 
                 0 , &(args_info->rnemdrt_given), | 
| 1838 | 
+ | 
                &(local_args_info.rnemdrt_given), optarg, 0, 0, ARG_NO, | 
| 1839 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1840 | 
+ | 
                "rnemdrt", '-', | 
| 1841 | 
+ | 
                additional_error)) | 
| 1842 | 
+ | 
              goto failure; | 
| 1843 | 
+ | 
           | 
| 1844 | 
+ | 
          } | 
| 1845 | 
+ | 
          /* electrostatic potential to frequency map based on the Cho nitrile fits.  */ | 
| 1846 | 
+ | 
          else if (strcmp (long_options[option_index].name, "nitrile") == 0) | 
| 1847 | 
+ | 
          { | 
| 1848 | 
+ | 
           | 
| 1849 | 
+ | 
            if (args_info->staticProps_group_counter && override) | 
| 1850 | 
+ | 
              reset_group_staticProps (args_info); | 
| 1851 | 
+ | 
            args_info->staticProps_group_counter += 1; | 
| 1852 | 
+ | 
           | 
| 1853 | 
+ | 
            if (update_arg( 0 ,  | 
| 1854 | 
+ | 
                 0 , &(args_info->nitrile_given), | 
| 1855 | 
+ | 
                &(local_args_info.nitrile_given), optarg, 0, 0, ARG_NO, | 
| 1856 | 
+ | 
                check_ambiguity, override, 0, 0, | 
| 1857 | 
+ | 
                "nitrile", '-', | 
| 1858 | 
+ | 
                additional_error)) | 
| 1859 | 
+ | 
              goto failure; | 
| 1860 | 
+ | 
           | 
| 1861 | 
+ | 
          } | 
| 1862 | 
+ | 
           | 
| 1863 | 
  | 
          break; | 
| 1864 | 
  | 
        case '?':       /* Invalid option.  */ | 
| 1865 | 
  | 
          /* `getopt_long' already printed an error message.  */ | 
| 1873 | 
  | 
 | 
| 1874 | 
  | 
  if (args_info->staticProps_group_counter > 1) | 
| 1875 | 
  | 
    { | 
| 1876 | 
< | 
      fprintf (stderr, "%s: %d options of group staticProps were given. One is required.%s\n", argv[0], args_info->staticProps_group_counter, (additional_error ? additional_error : "")); | 
| 1876 | 
> | 
      fprintf (stderr, "%s: %d options of group staticProps were given. One is required%s.\n", argv[0], args_info->staticProps_group_counter, (additional_error ? additional_error : "")); | 
| 1877 | 
  | 
      error = 1; | 
| 1878 | 
  | 
    } | 
| 1879 | 
  | 
   |