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

Comparing trunk/src/applications/staticProps/StaticPropsCmd.c (file contents):
Revision 1521 by gezelter, Tue Oct 19 18:40:54 2010 UTC vs.
Revision 1522 by kstocke1, Fri Nov 19 20:26:36 2010 UTC

# Line 36 | Line 36 | const char *gengetopt_args_info_help[] = {
36    "  -b, --nbins=INT               number of bins (general purpose)  \n                                  (default=`100')",
37    "  -x, --nbins_x=INT             number of bins in x axis  (default=`100')",
38    "  -y, --nbins_y=INT             number of bins in y axis  (default=`100')",
39  "      --nbins_z=INT             number of bins in z axis  (default=`100')",
39    "  -a, --nanglebins=INT          number of bins for cos(angle)  (default=`50')",
40    "  -c, --rcut=DOUBLE             cutoff radius (rcut)",
41    "      --dz=DOUBLE               slab width (dz)",
# Line 61 | Line 60 | const char *gengetopt_args_info_help[] = {
60    "      --gofz                    g(z)",
61    "      --r_theta                 g(r, cos(theta))",
62    "      --r_omega                 g(r, cos(omega))",
64  "      --r_z                     g(r, z)",
63    "      --theta_omega             g(cos(theta), cos(omega))",
64    "      --gxyz                    g(x, y, z)",
65    "      --twodgofr                2D g(r) (Slab width --dz must be specified)",
# Line 73 | Line 71 | const char *gengetopt_args_info_help[] = {
71    "      --p_angle                 p(cos(theta))",
72    "      --hxy                     hxy",
73    "      --rho_r                   rho of R",
74 +  "      --angle_r                 angle of R",
75    "      --hullvol                 hull volume of nanoparticle",
76      0
77   };
# Line 109 | Line 108 | void clear_given (struct gengetopt_args_info *args_inf
108    args_info->nbins_given = 0 ;
109    args_info->nbins_x_given = 0 ;
110    args_info->nbins_y_given = 0 ;
112  args_info->nbins_z_given = 0 ;
111    args_info->nanglebins_given = 0 ;
112    args_info->rcut_given = 0 ;
113    args_info->dz_given = 0 ;
# Line 133 | Line 131 | void clear_given (struct gengetopt_args_info *args_inf
131    args_info->gofz_given = 0 ;
132    args_info->r_theta_given = 0 ;
133    args_info->r_omega_given = 0 ;
136  args_info->r_z_given = 0 ;
134    args_info->theta_omega_given = 0 ;
135    args_info->gxyz_given = 0 ;
136    args_info->twodgofr_given = 0 ;
# Line 145 | Line 142 | void clear_given (struct gengetopt_args_info *args_inf
142    args_info->p_angle_given = 0 ;
143    args_info->hxy_given = 0 ;
144    args_info->rho_r_given = 0 ;
145 +  args_info->angle_r_given = 0 ;
146    args_info->hullvol_given = 0 ;
147    args_info->staticProps_group_counter = 0 ;
148   }
# Line 164 | Line 162 | void clear_args (struct gengetopt_args_info *args_info
162    args_info->nbins_x_orig = NULL;
163    args_info->nbins_y_arg = 100;
164    args_info->nbins_y_orig = NULL;
167  args_info->nbins_z_arg = 100;
168  args_info->nbins_z_orig = NULL;
165    args_info->nanglebins_arg = 50;
166    args_info->nanglebins_orig = NULL;
167    args_info->rcut_orig = NULL;
# Line 331 | Line 327 | cmdline_parser_release (struct gengetopt_args_info *ar
327    free_string_field (&(args_info->nbins_orig));
328    free_string_field (&(args_info->nbins_x_orig));
329    free_string_field (&(args_info->nbins_y_orig));
334  free_string_field (&(args_info->nbins_z_orig));
330    free_string_field (&(args_info->nanglebins_orig));
331    free_string_field (&(args_info->rcut_orig));
332    free_string_field (&(args_info->dz_orig));
# Line 403 | Line 398 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
398      write_into_file(outfile, "nbins_x", args_info->nbins_x_orig, 0);
399    if (args_info->nbins_y_given)
400      write_into_file(outfile, "nbins_y", args_info->nbins_y_orig, 0);
406  if (args_info->nbins_z_given)
407    write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0);
401    if (args_info->nanglebins_given)
402      write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0);
403    if (args_info->rcut_given)
# Line 451 | Line 444 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
444      write_into_file(outfile, "r_theta", 0, 0 );
445    if (args_info->r_omega_given)
446      write_into_file(outfile, "r_omega", 0, 0 );
454  if (args_info->r_z_given)
455    write_into_file(outfile, "r_z", 0, 0 );
447    if (args_info->theta_omega_given)
448      write_into_file(outfile, "theta_omega", 0, 0 );
449    if (args_info->gxyz_given)
# Line 475 | Line 466 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
466      write_into_file(outfile, "hxy", 0, 0 );
467    if (args_info->rho_r_given)
468      write_into_file(outfile, "rho_r", 0, 0 );
469 +  if (args_info->angle_r_given)
470 +    write_into_file(outfile, "angle_r", 0, 0 );
471    if (args_info->hullvol_given)
472      write_into_file(outfile, "hullvol", 0, 0 );
473    
# Line 538 | Line 531 | reset_group_staticProps(struct gengetopt_args_info *ar
531    args_info->gofz_given = 0 ;
532    args_info->r_theta_given = 0 ;
533    args_info->r_omega_given = 0 ;
541  args_info->r_z_given = 0 ;
534    args_info->theta_omega_given = 0 ;
535    args_info->gxyz_given = 0 ;
536    args_info->twodgofr_given = 0 ;
# Line 550 | Line 542 | reset_group_staticProps(struct gengetopt_args_info *ar
542    args_info->p_angle_given = 0 ;
543    args_info->hxy_given = 0 ;
544    args_info->rho_r_given = 0 ;
545 +  args_info->angle_r_given = 0 ;
546    args_info->hullvol_given = 0 ;
547  
548    args_info->staticProps_group_counter = 0;
# Line 799 | Line 792 | cmdline_parser_internal (int argc, char * const *argv,
792          { "nbins",      1, NULL, 'b' },
793          { "nbins_x",    1, NULL, 'x' },
794          { "nbins_y",    1, NULL, 'y' },
802        { "nbins_z",    1, NULL, 0 },
795          { "nanglebins", 1, NULL, 'a' },
796          { "rcut",       1, NULL, 'c' },
797          { "dz", 1, NULL, 0 },
# Line 823 | Line 815 | cmdline_parser_internal (int argc, char * const *argv,
815          { "gofz",       0, NULL, 0 },
816          { "r_theta",    0, NULL, 0 },
817          { "r_omega",    0, NULL, 0 },
826        { "r_z",        0, NULL, 0 },
818          { "theta_omega",        0, NULL, 0 },
819          { "gxyz",       0, NULL, 0 },
820          { "twodgofr",   0, NULL, 0 },
# Line 835 | Line 826 | cmdline_parser_internal (int argc, char * const *argv,
826          { "p_angle",    0, NULL, 0 },
827          { "hxy",        0, NULL, 0 },
828          { "rho_r",      0, NULL, 0 },
829 +        { "angle_r",    0, NULL, 0 },
830          { "hullvol",    0, NULL, 0 },
831          { NULL, 0, NULL, 0 }
832        };
# Line 1025 | Line 1017 | cmdline_parser_internal (int argc, char * const *argv,
1017            break;
1018  
1019          case 0: /* Long option with no short option */
1028          /* number of bins in z axis.  */
1029          if (strcmp (long_options[option_index].name, "nbins_z") == 0)
1030          {
1031          
1032          
1033            if (update_arg( (void *)&(args_info->nbins_z_arg),
1034                 &(args_info->nbins_z_orig), &(args_info->nbins_z_given),
1035                &(local_args_info.nbins_z_given), optarg, 0, "100", ARG_INT,
1036                check_ambiguity, override, 0, 0,
1037                "nbins_z", '-',
1038                additional_error))
1039              goto failure;
1040          
1041          }
1020            /* slab width (dz).  */
1021            else if (strcmp (long_options[option_index].name, "dz") == 0)
1022            {
# Line 1054 | Line 1032 | cmdline_parser_internal (int argc, char * const *argv,
1032            
1033            }
1034            /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1035 <          else if (strcmp (long_options[option_index].name, "length") == 0)
1035 >          if (strcmp (long_options[option_index].name, "length") == 0)
1036            {
1037            
1038            
# Line 1322 | Line 1300 | cmdline_parser_internal (int argc, char * const *argv,
1300                  &(local_args_info.r_omega_given), optarg, 0, 0, ARG_NO,
1301                  check_ambiguity, override, 0, 0,
1302                  "r_omega", '-',
1325                additional_error))
1326              goto failure;
1327          
1328          }
1329          /* g(r, z).  */
1330          else if (strcmp (long_options[option_index].name, "r_z") == 0)
1331          {
1332          
1333            if (args_info->staticProps_group_counter && override)
1334              reset_group_staticProps (args_info);
1335            args_info->staticProps_group_counter += 1;
1336          
1337            if (update_arg( 0 ,
1338                 0 , &(args_info->r_z_given),
1339                &(local_args_info.r_z_given), optarg, 0, 0, ARG_NO,
1340                check_ambiguity, override, 0, 0,
1341                "r_z", '-',
1303                  additional_error))
1304                goto failure;
1305            
# Line 1479 | Line 1440 | cmdline_parser_internal (int argc, char * const *argv,
1440                goto failure;
1441            
1442            }
1443 +          /* angle of R.  */
1444 +          else if (strcmp (long_options[option_index].name, "angle_r") == 0)
1445 +          {
1446 +          
1447 +            if (args_info->staticProps_group_counter && override)
1448 +              reset_group_staticProps (args_info);
1449 +            args_info->staticProps_group_counter += 1;
1450 +          
1451 +            if (update_arg( 0 ,
1452 +                 0 , &(args_info->angle_r_given),
1453 +                &(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO,
1454 +                check_ambiguity, override, 0, 0,
1455 +                "angle_r", '-',
1456 +                additional_error))
1457 +              goto failure;
1458 +          
1459 +          }
1460            /* hull volume of nanoparticle.  */
1461            else if (strcmp (long_options[option_index].name, "hullvol") == 0)
1462            {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines