ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/staticProps/StaticPropsCmd.cpp
(Generate patch)

Comparing trunk/src/applications/staticProps/StaticPropsCmd.cpp (file contents):
Revision 1979 by gezelter, Sat Apr 5 20:56:01 2014 UTC vs.
Revision 1992 by gezelter, Thu Apr 24 17:30:00 2014 UTC

# Line 57 | Line 57 | const char *gengetopt_args_info_help[] = {
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    "\n Group: staticProps\n   an option of this group is required",
66    "      --bo                      bond order parameter (--rcut must be specified)",
67 <  "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)",
67 >  "      --ior                     icosahedral bond order parameter as a function \n                                  of radius (--rcut must be specified)",
68 >  "      --for                     FCC bond order parameter as a function of \n                                  radius (--rcut must be specified)",
69    "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)",
70    "      --count                   count of molecules matching selection criteria \n                                  (and associated statistics)",
71    "  -g, --gofr                    g(r)",
# Line 138 | Line 140 | void clear_given (struct gengetopt_args_info *args_inf
140    args_info->refsele_given = 0 ;
141    args_info->comsele_given = 0 ;
142    args_info->seleoffset_given = 0 ;
143 +  args_info->seleoffset2_given = 0 ;
144    args_info->molname_given = 0 ;
145    args_info->begin_given = 0 ;
146    args_info->end_given = 0 ;
147    args_info->radius_given = 0 ;
148    args_info->bo_given = 0 ;
149 <  args_info->bor_given = 0 ;
149 >  args_info->ior_given = 0 ;
150 >  args_info->for_given = 0 ;
151    args_info->bad_given = 0 ;
152    args_info->count_given = 0 ;
153    args_info->gofr_given = 0 ;
# Line 210 | Line 214 | void clear_args (struct gengetopt_args_info *args_info
214    args_info->comsele_arg = NULL;
215    args_info->comsele_orig = NULL;
216    args_info->seleoffset_orig = NULL;
217 +  args_info->seleoffset2_orig = NULL;
218    args_info->molname_arg = NULL;
219    args_info->molname_orig = NULL;
220    args_info->begin_orig = NULL;
# Line 244 | Line 249 | void init_args_info(struct gengetopt_args_info *args_i
249    args_info->refsele_help = gengetopt_args_info_help[18] ;
250    args_info->comsele_help = gengetopt_args_info_help[19] ;
251    args_info->seleoffset_help = gengetopt_args_info_help[20] ;
252 <  args_info->molname_help = gengetopt_args_info_help[21] ;
253 <  args_info->begin_help = gengetopt_args_info_help[22] ;
254 <  args_info->end_help = gengetopt_args_info_help[23] ;
255 <  args_info->radius_help = gengetopt_args_info_help[24] ;
256 <  args_info->bo_help = gengetopt_args_info_help[26] ;
257 <  args_info->bor_help = gengetopt_args_info_help[27] ;
258 <  args_info->bad_help = gengetopt_args_info_help[28] ;
259 <  args_info->count_help = gengetopt_args_info_help[29] ;
260 <  args_info->gofr_help = gengetopt_args_info_help[30] ;
261 <  args_info->gofz_help = gengetopt_args_info_help[31] ;
262 <  args_info->r_theta_help = gengetopt_args_info_help[32] ;
263 <  args_info->r_omega_help = gengetopt_args_info_help[33] ;
264 <  args_info->r_z_help = gengetopt_args_info_help[34] ;
265 <  args_info->theta_omega_help = gengetopt_args_info_help[35] ;
266 <  args_info->gxyz_help = gengetopt_args_info_help[36] ;
267 <  args_info->twodgofr_help = gengetopt_args_info_help[37] ;
268 <  args_info->p2_help = gengetopt_args_info_help[38] ;
269 <  args_info->rp2_help = gengetopt_args_info_help[39] ;
270 <  args_info->scd_help = gengetopt_args_info_help[40] ;
271 <  args_info->density_help = gengetopt_args_info_help[41] ;
272 <  args_info->slab_density_help = gengetopt_args_info_help[42] ;
273 <  args_info->p_angle_help = gengetopt_args_info_help[43] ;
274 <  args_info->hxy_help = gengetopt_args_info_help[44] ;
275 <  args_info->rho_r_help = gengetopt_args_info_help[45] ;
276 <  args_info->angle_r_help = gengetopt_args_info_help[46] ;
277 <  args_info->hullvol_help = gengetopt_args_info_help[47] ;
278 <  args_info->rodlength_help = gengetopt_args_info_help[48] ;
279 <  args_info->tet_param_help = gengetopt_args_info_help[49] ;
280 <  args_info->tet_param_z_help = gengetopt_args_info_help[50] ;
281 <  args_info->rnemdz_help = gengetopt_args_info_help[51] ;
282 <  args_info->rnemdr_help = gengetopt_args_info_help[52] ;
283 <  args_info->rnemdrt_help = gengetopt_args_info_help[53] ;
252 >  args_info->seleoffset2_help = gengetopt_args_info_help[21] ;
253 >  args_info->molname_help = gengetopt_args_info_help[22] ;
254 >  args_info->begin_help = gengetopt_args_info_help[23] ;
255 >  args_info->end_help = gengetopt_args_info_help[24] ;
256 >  args_info->radius_help = gengetopt_args_info_help[25] ;
257 >  args_info->bo_help = gengetopt_args_info_help[27] ;
258 >  args_info->ior_help = gengetopt_args_info_help[28] ;
259 >  args_info->for_help = gengetopt_args_info_help[29] ;
260 >  args_info->bad_help = gengetopt_args_info_help[30] ;
261 >  args_info->count_help = gengetopt_args_info_help[31] ;
262 >  args_info->gofr_help = gengetopt_args_info_help[32] ;
263 >  args_info->gofz_help = gengetopt_args_info_help[33] ;
264 >  args_info->r_theta_help = gengetopt_args_info_help[34] ;
265 >  args_info->r_omega_help = gengetopt_args_info_help[35] ;
266 >  args_info->r_z_help = gengetopt_args_info_help[36] ;
267 >  args_info->theta_omega_help = gengetopt_args_info_help[37] ;
268 >  args_info->gxyz_help = gengetopt_args_info_help[38] ;
269 >  args_info->twodgofr_help = gengetopt_args_info_help[39] ;
270 >  args_info->p2_help = gengetopt_args_info_help[40] ;
271 >  args_info->rp2_help = gengetopt_args_info_help[41] ;
272 >  args_info->scd_help = gengetopt_args_info_help[42] ;
273 >  args_info->density_help = gengetopt_args_info_help[43] ;
274 >  args_info->slab_density_help = gengetopt_args_info_help[44] ;
275 >  args_info->p_angle_help = gengetopt_args_info_help[45] ;
276 >  args_info->hxy_help = gengetopt_args_info_help[46] ;
277 >  args_info->rho_r_help = gengetopt_args_info_help[47] ;
278 >  args_info->angle_r_help = gengetopt_args_info_help[48] ;
279 >  args_info->hullvol_help = gengetopt_args_info_help[49] ;
280 >  args_info->rodlength_help = gengetopt_args_info_help[50] ;
281 >  args_info->tet_param_help = gengetopt_args_info_help[51] ;
282 >  args_info->tet_param_z_help = gengetopt_args_info_help[52] ;
283 >  args_info->rnemdz_help = gengetopt_args_info_help[53] ;
284 >  args_info->rnemdr_help = gengetopt_args_info_help[54] ;
285 >  args_info->rnemdrt_help = gengetopt_args_info_help[55] ;
286    
287   }
288  
# Line 385 | Line 392 | cmdline_parser_release (struct gengetopt_args_info *ar
392    free_string_field (&(args_info->comsele_arg));
393    free_string_field (&(args_info->comsele_orig));
394    free_string_field (&(args_info->seleoffset_orig));
395 +  free_string_field (&(args_info->seleoffset2_orig));
396    free_string_field (&(args_info->molname_arg));
397    free_string_field (&(args_info->molname_orig));
398    free_string_field (&(args_info->begin_orig));
# Line 467 | Line 475 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
475      write_into_file(outfile, "comsele", args_info->comsele_orig, 0);
476    if (args_info->seleoffset_given)
477      write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0);
478 +  if (args_info->seleoffset2_given)
479 +    write_into_file(outfile, "seleoffset2", args_info->seleoffset2_orig, 0);
480    if (args_info->molname_given)
481      write_into_file(outfile, "molname", args_info->molname_orig, 0);
482    if (args_info->begin_given)
# Line 477 | Line 487 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
487      write_into_file(outfile, "radius", args_info->radius_orig, 0);
488    if (args_info->bo_given)
489      write_into_file(outfile, "bo", 0, 0 );
490 <  if (args_info->bor_given)
491 <    write_into_file(outfile, "bor", 0, 0 );
490 >  if (args_info->ior_given)
491 >    write_into_file(outfile, "ior", 0, 0 );
492 >  if (args_info->for_given)
493 >    write_into_file(outfile, "for", 0, 0 );
494    if (args_info->bad_given)
495      write_into_file(outfile, "bad", 0, 0 );
496    if (args_info->count_given)
# Line 585 | Line 597 | reset_group_staticProps(struct gengetopt_args_info *ar
597      return;
598    
599    args_info->bo_given = 0 ;
600 <  args_info->bor_given = 0 ;
600 >  args_info->ior_given = 0 ;
601 >  args_info->for_given = 0 ;
602    args_info->bad_given = 0 ;
603    args_info->count_given = 0 ;
604    args_info->gofr_given = 0 ;
# Line 878 | Line 891 | cmdline_parser_internal (
891          { "refsele",    1, NULL, 0 },
892          { "comsele",    1, NULL, 0 },
893          { "seleoffset", 1, NULL, 0 },
894 +        { "seleoffset2",        1, NULL, 0 },
895          { "molname",    1, NULL, 0 },
896          { "begin",      1, NULL, 0 },
897          { "end",        1, NULL, 0 },
898          { "radius",     1, NULL, 0 },
899          { "bo", 0, NULL, 0 },
900 <        { "bor",        0, NULL, 0 },
900 >        { "ior",        0, NULL, 0 },
901 >        { "for",        0, NULL, 0 },
902          { "bad",        0, NULL, 0 },
903          { "count",      0, NULL, 0 },
904          { "gofr",       0, NULL, 'g' },
# Line 1250 | Line 1265 | cmdline_parser_internal (
1265                  &(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT,
1266                  check_ambiguity, override, 0, 0,
1267                  "seleoffset", '-',
1268 +                additional_error))
1269 +              goto failure;
1270 +          
1271 +          }
1272 +          /* global index offset for a third object (used to define a vector between sites in molecule).  */
1273 +          else if (strcmp (long_options[option_index].name, "seleoffset2") == 0)
1274 +          {
1275 +          
1276 +          
1277 +            if (update_arg( (void *)&(args_info->seleoffset2_arg),
1278 +                 &(args_info->seleoffset2_orig), &(args_info->seleoffset2_given),
1279 +                &(local_args_info.seleoffset2_given), optarg, 0, 0, ARG_INT,
1280 +                check_ambiguity, override, 0, 0,
1281 +                "seleoffset2", '-',
1282                  additional_error))
1283                goto failure;
1284            
# Line 1327 | Line 1356 | cmdline_parser_internal (
1356                goto failure;
1357            
1358            }
1359 <          /* bond order parameter as a function of radius (--rcut must be specified).  */
1360 <          else if (strcmp (long_options[option_index].name, "bor") == 0)
1359 >          /* icosahedral bond order parameter as a function of radius (--rcut must be specified).  */
1360 >          else if (strcmp (long_options[option_index].name, "ior") == 0)
1361            {
1362            
1363              if (args_info->staticProps_group_counter && override)
# Line 1336 | Line 1365 | cmdline_parser_internal (
1365              args_info->staticProps_group_counter += 1;
1366            
1367              if (update_arg( 0 ,
1368 <                 0 , &(args_info->bor_given),
1369 <                &(local_args_info.bor_given), optarg, 0, 0, ARG_NO,
1368 >                 0 , &(args_info->ior_given),
1369 >                &(local_args_info.ior_given), optarg, 0, 0, ARG_NO,
1370                  check_ambiguity, override, 0, 0,
1371 <                "bor", '-',
1371 >                "ior", '-',
1372 >                additional_error))
1373 >              goto failure;
1374 >          
1375 >          }
1376 >          /* FCC bond order parameter as a function of radius (--rcut must be specified).  */
1377 >          else if (strcmp (long_options[option_index].name, "for") == 0)
1378 >          {
1379 >          
1380 >            if (args_info->staticProps_group_counter && override)
1381 >              reset_group_staticProps (args_info);
1382 >            args_info->staticProps_group_counter += 1;
1383 >          
1384 >            if (update_arg( 0 ,
1385 >                 0 , &(args_info->for_given),
1386 >                &(local_args_info.for_given), optarg, 0, 0, ARG_NO,
1387 >                check_ambiguity, override, 0, 0,
1388 >                "for", '-',
1389                  additional_error))
1390                goto failure;
1391            

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines