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 1440 by gezelter, Thu Apr 29 14:41:48 2010 UTC vs.
Revision 1513 by gezelter, Tue Oct 19 18:40:54 2010 UTC

# Line 38 | Line 38 | const char *gengetopt_args_info_help[] = {
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')",
40    "  -a, --nanglebins=INT          number of bins for cos(angle)  (default=`50')",
41  "      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
41    "  -c, --rcut=DOUBLE             cutoff radius (rcut)",
42 +  "      --dz=DOUBLE               slab width (dz)",
43 +  "      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
44 +  "      --zlength=DOUBLE          maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
45    "  -z, --zoffset=DOUBLE          Where to set the zero for the slab_density \n                                  calculation  (default=`0')",
46    "      --sele1=selection script  select the first stuntdouble set",
47    "      --sele2=selection script  select the second stuntdouble set",
# Line 54 | Line 56 | const char *gengetopt_args_info_help[] = {
56    "      --bo                      bond order parameter (--rcut must be specified)",
57    "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)",
58    "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)",
59 +  "      --count                   count of molecules matching selection criteria \n                                  (and associated statistics)",
60    "  -g, --gofr                    g(r)",
61    "      --gofz                    g(z)",
62    "      --r_theta                 g(r, cos(theta))",
# Line 61 | Line 64 | const char *gengetopt_args_info_help[] = {
64    "      --r_z                     g(r, z)",
65    "      --theta_omega             g(cos(theta), cos(omega))",
66    "      --gxyz                    g(x, y, z)",
67 +  "      --twodgofr                2D g(r) (Slab width --dz must be specified)",
68    "  -p, --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)",
69    "      --rp2                     rp2 order parameter (--sele1 and --sele2 must \n                                  be specified)",
70    "  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)",
# Line 107 | Line 111 | void clear_given (struct gengetopt_args_info *args_inf
111    args_info->nbins_y_given = 0 ;
112    args_info->nbins_z_given = 0 ;
113    args_info->nanglebins_given = 0 ;
110  args_info->length_given = 0 ;
114    args_info->rcut_given = 0 ;
115 +  args_info->dz_given = 0 ;
116 +  args_info->length_given = 0 ;
117 +  args_info->zlength_given = 0 ;
118    args_info->zoffset_given = 0 ;
119    args_info->sele1_given = 0 ;
120    args_info->sele2_given = 0 ;
# Line 122 | Line 128 | void clear_given (struct gengetopt_args_info *args_inf
128    args_info->bo_given = 0 ;
129    args_info->bor_given = 0 ;
130    args_info->bad_given = 0 ;
131 +  args_info->count_given = 0 ;
132    args_info->gofr_given = 0 ;
133    args_info->gofz_given = 0 ;
134    args_info->r_theta_given = 0 ;
# Line 129 | Line 136 | void clear_given (struct gengetopt_args_info *args_inf
136    args_info->r_z_given = 0 ;
137    args_info->theta_omega_given = 0 ;
138    args_info->gxyz_given = 0 ;
139 +  args_info->twodgofr_given = 0 ;
140    args_info->p2_given = 0 ;
141    args_info->rp2_given = 0 ;
142    args_info->scd_given = 0 ;
# Line 160 | Line 168 | void clear_args (struct gengetopt_args_info *args_info
168    args_info->nbins_z_orig = NULL;
169    args_info->nanglebins_arg = 50;
170    args_info->nanglebins_orig = NULL;
163  args_info->length_orig = NULL;
171    args_info->rcut_orig = NULL;
172 +  args_info->dz_orig = NULL;
173 +  args_info->length_orig = NULL;
174 +  args_info->zlength_orig = NULL;
175    args_info->zoffset_arg = 0;
176    args_info->zoffset_orig = NULL;
177    args_info->sele1_arg = NULL;
# Line 197 | Line 207 | void init_args_info(struct gengetopt_args_info *args_i
207    args_info->nbins_y_help = gengetopt_args_info_help[7] ;
208    args_info->nbins_z_help = gengetopt_args_info_help[8] ;
209    args_info->nanglebins_help = gengetopt_args_info_help[9] ;
210 <  args_info->length_help = gengetopt_args_info_help[10] ;
211 <  args_info->rcut_help = gengetopt_args_info_help[11] ;
212 <  args_info->zoffset_help = gengetopt_args_info_help[12] ;
213 <  args_info->sele1_help = gengetopt_args_info_help[13] ;
214 <  args_info->sele2_help = gengetopt_args_info_help[14] ;
215 <  args_info->sele3_help = gengetopt_args_info_help[15] ;
216 <  args_info->refsele_help = gengetopt_args_info_help[16] ;
217 <  args_info->comsele_help = gengetopt_args_info_help[17] ;
218 <  args_info->molname_help = gengetopt_args_info_help[18] ;
219 <  args_info->begin_help = gengetopt_args_info_help[19] ;
220 <  args_info->end_help = gengetopt_args_info_help[20] ;
221 <  args_info->radius_help = gengetopt_args_info_help[21] ;
222 <  args_info->bo_help = gengetopt_args_info_help[23] ;
223 <  args_info->bor_help = gengetopt_args_info_help[24] ;
224 <  args_info->bad_help = gengetopt_args_info_help[25] ;
225 <  args_info->gofr_help = gengetopt_args_info_help[26] ;
226 <  args_info->gofz_help = gengetopt_args_info_help[27] ;
227 <  args_info->r_theta_help = gengetopt_args_info_help[28] ;
228 <  args_info->r_omega_help = gengetopt_args_info_help[29] ;
229 <  args_info->r_z_help = gengetopt_args_info_help[30] ;
230 <  args_info->theta_omega_help = gengetopt_args_info_help[31] ;
231 <  args_info->gxyz_help = gengetopt_args_info_help[32] ;
232 <  args_info->p2_help = gengetopt_args_info_help[33] ;
233 <  args_info->rp2_help = gengetopt_args_info_help[34] ;
234 <  args_info->scd_help = gengetopt_args_info_help[35] ;
235 <  args_info->density_help = gengetopt_args_info_help[36] ;
236 <  args_info->slab_density_help = gengetopt_args_info_help[37] ;
237 <  args_info->p_angle_help = gengetopt_args_info_help[38] ;
238 <  args_info->hxy_help = gengetopt_args_info_help[39] ;
239 <  args_info->rho_r_help = gengetopt_args_info_help[40] ;
240 <  args_info->hullvol_help = gengetopt_args_info_help[41] ;
210 >  args_info->rcut_help = gengetopt_args_info_help[10] ;
211 >  args_info->dz_help = gengetopt_args_info_help[11] ;
212 >  args_info->length_help = gengetopt_args_info_help[12] ;
213 >  args_info->zlength_help = gengetopt_args_info_help[13] ;
214 >  args_info->zoffset_help = gengetopt_args_info_help[14] ;
215 >  args_info->sele1_help = gengetopt_args_info_help[15] ;
216 >  args_info->sele2_help = gengetopt_args_info_help[16] ;
217 >  args_info->sele3_help = gengetopt_args_info_help[17] ;
218 >  args_info->refsele_help = gengetopt_args_info_help[18] ;
219 >  args_info->comsele_help = gengetopt_args_info_help[19] ;
220 >  args_info->molname_help = gengetopt_args_info_help[20] ;
221 >  args_info->begin_help = gengetopt_args_info_help[21] ;
222 >  args_info->end_help = gengetopt_args_info_help[22] ;
223 >  args_info->radius_help = gengetopt_args_info_help[23] ;
224 >  args_info->bo_help = gengetopt_args_info_help[25] ;
225 >  args_info->bor_help = gengetopt_args_info_help[26] ;
226 >  args_info->bad_help = gengetopt_args_info_help[27] ;
227 >  args_info->count_help = gengetopt_args_info_help[28] ;
228 >  args_info->gofr_help = gengetopt_args_info_help[29] ;
229 >  args_info->gofz_help = gengetopt_args_info_help[30] ;
230 >  args_info->r_theta_help = gengetopt_args_info_help[31] ;
231 >  args_info->r_omega_help = gengetopt_args_info_help[32] ;
232 >  args_info->r_z_help = gengetopt_args_info_help[33] ;
233 >  args_info->theta_omega_help = gengetopt_args_info_help[34] ;
234 >  args_info->gxyz_help = gengetopt_args_info_help[35] ;
235 >  args_info->twodgofr_help = gengetopt_args_info_help[36] ;
236 >  args_info->p2_help = gengetopt_args_info_help[37] ;
237 >  args_info->rp2_help = gengetopt_args_info_help[38] ;
238 >  args_info->scd_help = gengetopt_args_info_help[39] ;
239 >  args_info->density_help = gengetopt_args_info_help[40] ;
240 >  args_info->slab_density_help = gengetopt_args_info_help[41] ;
241 >  args_info->p_angle_help = gengetopt_args_info_help[42] ;
242 >  args_info->hxy_help = gengetopt_args_info_help[43] ;
243 >  args_info->rho_r_help = gengetopt_args_info_help[44] ;
244 >  args_info->hullvol_help = gengetopt_args_info_help[45] ;
245    
246   }
247  
# Line 319 | Line 333 | cmdline_parser_release (struct gengetopt_args_info *ar
333    free_string_field (&(args_info->nbins_y_orig));
334    free_string_field (&(args_info->nbins_z_orig));
335    free_string_field (&(args_info->nanglebins_orig));
322  free_string_field (&(args_info->length_orig));
336    free_string_field (&(args_info->rcut_orig));
337 +  free_string_field (&(args_info->dz_orig));
338 +  free_string_field (&(args_info->length_orig));
339 +  free_string_field (&(args_info->zlength_orig));
340    free_string_field (&(args_info->zoffset_orig));
341    free_string_field (&(args_info->sele1_arg));
342    free_string_field (&(args_info->sele1_orig));
# Line 391 | Line 407 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
407      write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0);
408    if (args_info->nanglebins_given)
409      write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0);
394  if (args_info->length_given)
395    write_into_file(outfile, "length", args_info->length_orig, 0);
410    if (args_info->rcut_given)
411      write_into_file(outfile, "rcut", args_info->rcut_orig, 0);
412 +  if (args_info->dz_given)
413 +    write_into_file(outfile, "dz", args_info->dz_orig, 0);
414 +  if (args_info->length_given)
415 +    write_into_file(outfile, "length", args_info->length_orig, 0);
416 +  if (args_info->zlength_given)
417 +    write_into_file(outfile, "zlength", args_info->zlength_orig, 0);
418    if (args_info->zoffset_given)
419      write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0);
420    if (args_info->sele1_given)
# Line 421 | Line 441 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
441      write_into_file(outfile, "bor", 0, 0 );
442    if (args_info->bad_given)
443      write_into_file(outfile, "bad", 0, 0 );
444 +  if (args_info->count_given)
445 +    write_into_file(outfile, "count", 0, 0 );
446    if (args_info->gofr_given)
447      write_into_file(outfile, "gofr", 0, 0 );
448    if (args_info->gofz_given)
# Line 435 | Line 457 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
457      write_into_file(outfile, "theta_omega", 0, 0 );
458    if (args_info->gxyz_given)
459      write_into_file(outfile, "gxyz", 0, 0 );
460 +  if (args_info->twodgofr_given)
461 +    write_into_file(outfile, "twodgofr", 0, 0 );
462    if (args_info->p2_given)
463      write_into_file(outfile, "p2", 0, 0 );
464    if (args_info->rp2_given)
# Line 509 | Line 533 | reset_group_staticProps(struct gengetopt_args_info *ar
533    args_info->bo_given = 0 ;
534    args_info->bor_given = 0 ;
535    args_info->bad_given = 0 ;
536 +  args_info->count_given = 0 ;
537    args_info->gofr_given = 0 ;
538    args_info->gofz_given = 0 ;
539    args_info->r_theta_given = 0 ;
# Line 516 | Line 541 | reset_group_staticProps(struct gengetopt_args_info *ar
541    args_info->r_z_given = 0 ;
542    args_info->theta_omega_given = 0 ;
543    args_info->gxyz_given = 0 ;
544 +  args_info->twodgofr_given = 0 ;
545    args_info->p2_given = 0 ;
546    args_info->rp2_given = 0 ;
547    args_info->scd_given = 0 ;
# Line 775 | Line 801 | cmdline_parser_internal (int argc, char * const *argv,
801          { "nbins_y",    1, NULL, 'y' },
802          { "nbins_z",    1, NULL, 0 },
803          { "nanglebins", 1, NULL, 'a' },
778        { "length",     1, NULL, 0 },
804          { "rcut",       1, NULL, 'c' },
805 +        { "dz", 1, NULL, 0 },
806 +        { "length",     1, NULL, 0 },
807 +        { "zlength",    1, NULL, 0 },
808          { "zoffset",    1, NULL, 'z' },
809          { "sele1",      1, NULL, 0 },
810          { "sele2",      1, NULL, 0 },
# Line 790 | Line 818 | cmdline_parser_internal (int argc, char * const *argv,
818          { "bo", 0, NULL, 0 },
819          { "bor",        0, NULL, 0 },
820          { "bad",        0, NULL, 0 },
821 +        { "count",      0, NULL, 0 },
822          { "gofr",       0, NULL, 'g' },
823          { "gofz",       0, NULL, 0 },
824          { "r_theta",    0, NULL, 0 },
# Line 797 | Line 826 | cmdline_parser_internal (int argc, char * const *argv,
826          { "r_z",        0, NULL, 0 },
827          { "theta_omega",        0, NULL, 0 },
828          { "gxyz",       0, NULL, 0 },
829 +        { "twodgofr",   0, NULL, 0 },
830          { "p2", 0, NULL, 'p' },
831          { "rp2",        0, NULL, 0 },
832          { "scd",        0, NULL, 's' },
# Line 1009 | Line 1039 | cmdline_parser_internal (int argc, char * const *argv,
1039                goto failure;
1040            
1041            }
1042 +          /* slab width (dz).  */
1043 +          else if (strcmp (long_options[option_index].name, "dz") == 0)
1044 +          {
1045 +          
1046 +          
1047 +            if (update_arg( (void *)&(args_info->dz_arg),
1048 +                 &(args_info->dz_orig), &(args_info->dz_given),
1049 +                &(local_args_info.dz_given), optarg, 0, 0, ARG_DOUBLE,
1050 +                check_ambiguity, override, 0, 0,
1051 +                "dz", '-',
1052 +                additional_error))
1053 +              goto failure;
1054 +          
1055 +          }
1056            /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1057            else if (strcmp (long_options[option_index].name, "length") == 0)
1058            {
# Line 1023 | Line 1067 | cmdline_parser_internal (int argc, char * const *argv,
1067                goto failure;
1068            
1069            }
1070 +          /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1071 +          else if (strcmp (long_options[option_index].name, "zlength") == 0)
1072 +          {
1073 +          
1074 +          
1075 +            if (update_arg( (void *)&(args_info->zlength_arg),
1076 +                 &(args_info->zlength_orig), &(args_info->zlength_given),
1077 +                &(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE,
1078 +                check_ambiguity, override, 0, 0,
1079 +                "zlength", '-',
1080 +                additional_error))
1081 +              goto failure;
1082 +          
1083 +          }
1084            /* select the first stuntdouble set.  */
1085            else if (strcmp (long_options[option_index].name, "sele1") == 0)
1086            {
# Line 1200 | Line 1258 | cmdline_parser_internal (int argc, char * const *argv,
1258                goto failure;
1259            
1260            }
1261 +          /* count of molecules matching selection criteria (and associated statistics).  */
1262 +          else if (strcmp (long_options[option_index].name, "count") == 0)
1263 +          {
1264 +          
1265 +            if (args_info->staticProps_group_counter && override)
1266 +              reset_group_staticProps (args_info);
1267 +            args_info->staticProps_group_counter += 1;
1268 +          
1269 +            if (update_arg( 0 ,
1270 +                 0 , &(args_info->count_given),
1271 +                &(local_args_info.count_given), optarg, 0, 0, ARG_NO,
1272 +                check_ambiguity, override, 0, 0,
1273 +                "count", '-',
1274 +                additional_error))
1275 +              goto failure;
1276 +          
1277 +          }
1278            /* g(z).  */
1279            else if (strcmp (long_options[option_index].name, "gofz") == 0)
1280            {
# Line 1298 | Line 1373 | cmdline_parser_internal (int argc, char * const *argv,
1373                  &(local_args_info.gxyz_given), optarg, 0, 0, ARG_NO,
1374                  check_ambiguity, override, 0, 0,
1375                  "gxyz", '-',
1376 +                additional_error))
1377 +              goto failure;
1378 +          
1379 +          }
1380 +          /* 2D g(r) (Slab width --dz must be specified).  */
1381 +          else if (strcmp (long_options[option_index].name, "twodgofr") == 0)
1382 +          {
1383 +          
1384 +            if (args_info->staticProps_group_counter && override)
1385 +              reset_group_staticProps (args_info);
1386 +            args_info->staticProps_group_counter += 1;
1387 +          
1388 +            if (update_arg( 0 ,
1389 +                 0 , &(args_info->twodgofr_given),
1390 +                &(local_args_info.twodgofr_given), optarg, 0, 0, ARG_NO,
1391 +                check_ambiguity, override, 0, 0,
1392 +                "twodgofr", '-',
1393                  additional_error))
1394                goto failure;
1395            

Comparing trunk/src/applications/staticProps/StaticPropsCmd.c (property svn:keywords):
Revision 1440 by gezelter, Thu Apr 29 14:41:48 2010 UTC vs.
Revision 1513 by gezelter, Tue Oct 19 18:40:54 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines