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.c (file contents):
Revision 1212 by chuckv, Mon Sep 17 20:05:51 2007 UTC vs.
Revision 1213 by xsun, Wed Jan 23 21:21:50 2008 UTC

# Line 53 | Line 53 | const char *gengetopt_args_info_help[] = {
53    "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)",
54    "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)",
55    "  -g, --gofr                    g(r)",
56 +  "      --gofz                    g(z)",
57    "      --r_theta                 g(r, cos(theta))",
58    "      --r_omega                 g(r, cos(omega))",
59    "      --theta_omega             g(cos(theta), cos(omega))",
# Line 109 | Line 110 | void clear_given (struct gengetopt_args_info *args_inf
110    args_info->bor_given = 0 ;
111    args_info->bad_given = 0 ;
112    args_info->gofr_given = 0 ;
113 +  args_info->gofz_given = 0 ;
114    args_info->r_theta_given = 0 ;
115    args_info->r_omega_given = 0 ;
116    args_info->theta_omega_given = 0 ;
# Line 188 | Line 190 | void init_args_info(struct gengetopt_args_info *args_i
190    args_info->bor_help = gengetopt_args_info_help[21] ;
191    args_info->bad_help = gengetopt_args_info_help[22] ;
192    args_info->gofr_help = gengetopt_args_info_help[23] ;
193 <  args_info->r_theta_help = gengetopt_args_info_help[24] ;
194 <  args_info->r_omega_help = gengetopt_args_info_help[25] ;
195 <  args_info->theta_omega_help = gengetopt_args_info_help[26] ;
196 <  args_info->gxyz_help = gengetopt_args_info_help[27] ;
197 <  args_info->p2_help = gengetopt_args_info_help[28] ;
198 <  args_info->rp2_help = gengetopt_args_info_help[29] ;
199 <  args_info->scd_help = gengetopt_args_info_help[30] ;
200 <  args_info->density_help = gengetopt_args_info_help[31] ;
201 <  args_info->slab_density_help = gengetopt_args_info_help[32] ;
202 <  args_info->hxy_help = gengetopt_args_info_help[33] ;
203 <  args_info->rho_r_help = gengetopt_args_info_help[34] ;
204 <  args_info->hullvol_help = gengetopt_args_info_help[35] ;
193 >  args_info->gofz_help = gengetopt_args_info_help[24] ;
194 >  args_info->r_theta_help = gengetopt_args_info_help[25] ;
195 >  args_info->r_omega_help = gengetopt_args_info_help[26] ;
196 >  args_info->theta_omega_help = gengetopt_args_info_help[27] ;
197 >  args_info->gxyz_help = gengetopt_args_info_help[28] ;
198 >  args_info->p2_help = gengetopt_args_info_help[29] ;
199 >  args_info->rp2_help = gengetopt_args_info_help[30] ;
200 >  args_info->scd_help = gengetopt_args_info_help[31] ;
201 >  args_info->density_help = gengetopt_args_info_help[32] ;
202 >  args_info->slab_density_help = gengetopt_args_info_help[33] ;
203 >  args_info->hxy_help = gengetopt_args_info_help[34] ;
204 >  args_info->rho_r_help = gengetopt_args_info_help[35] ;
205 >  args_info->hullvol_help = gengetopt_args_info_help[36] ;
206    
207   }
208  
# Line 535 | Line 538 | cmdline_parser_file_save(const char *filename, struct
538    }
539    if (args_info->gofr_given) {
540      fprintf(outfile, "%s\n", "gofr");
541 +  }
542 +  if (args_info->gofz_given) {
543 +    fprintf(outfile, "%s\n", "gofz");
544    }
545    if (args_info->r_theta_given) {
546      fprintf(outfile, "%s\n", "r_theta");
# Line 615 | Line 621 | reset_group_staticProps(struct gengetopt_args_info *ar
621    args_info->bor_given = 0 ;
622    args_info->bad_given = 0 ;
623    args_info->gofr_given = 0 ;
624 +  args_info->gofz_given = 0 ;
625    args_info->r_theta_given = 0 ;
626    args_info->r_omega_given = 0 ;
627    args_info->theta_omega_given = 0 ;
# Line 742 | Line 749 | cmdline_parser_internal (int argc, char * const *argv,
749          { "bor",        0, NULL, 0 },
750          { "bad",        0, NULL, 0 },
751          { "gofr",       0, NULL, 'g' },
752 +        { "gofz",       0, NULL, 0 },
753          { "r_theta",    0, NULL, 0 },
754          { "r_omega",    0, NULL, 0 },
755          { "theta_omega",        0, NULL, 0 },
# Line 1237 | Line 1245 | cmdline_parser_internal (int argc, char * const *argv,
1245                continue;
1246              local_args_info.bad_given = 1;
1247              args_info->bad_given = 1;
1248 +            if (args_info->staticProps_group_counter && override)
1249 +              reset_group_staticProps (args_info);
1250 +            args_info->staticProps_group_counter += 1;
1251 +            break;
1252 +          }
1253 +          /* g(z).  */
1254 +          else if (strcmp (long_options[option_index].name, "gofz") == 0)
1255 +          {
1256 +            if (local_args_info.gofz_given)
1257 +              {
1258 +                fprintf (stderr, "%s: `--gofz' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1259 +                goto failure;
1260 +              }
1261 +            if (args_info->gofz_given && ! override)
1262 +              continue;
1263 +            local_args_info.gofz_given = 1;
1264 +            args_info->gofz_given = 1;
1265              if (args_info->staticProps_group_counter && override)
1266                reset_group_staticProps (args_info);
1267              args_info->staticProps_group_counter += 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines