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 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC vs.
Revision 1991 by gezelter, Wed Apr 23 20:34:17 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",
# Line 79 | Line 80 | const char *gengetopt_args_info_help[] = {
80    "  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)",
81    "  -d, --density                 density plot",
82    "      --slab_density            slab density",
83 <  "      --p_angle                 p(cos(theta))",
83 >  "      --p_angle                 p(cos(theta)) (--sele1 must be specified, \n                                  --sele2 is optional)",
84    "      --hxy                     hxy",
85    "      --rho_r                   rho of R",
86    "      --angle_r                 angle of R",
# Line 89 | Line 90 | const char *gengetopt_args_info_help[] = {
90    "      --tet_param_z             spatially-resolved tetrahedrality order \n                                  parameter Qk(z)",
91    "      --rnemdz                  slab-resolved RNEMD statistics (temperature, \n                                  density, velocity)",
92    "      --rnemdr                  shell-resolved RNEMD statistics (temperature, \n                                  density, angular velocity)",
93 +  "      --rnemdrt                 shell and angle-resolved RNEMD statistics \n                                  (temperature, density, angular velocity)",
94      0
95   };
96  
# Line 137 | Line 139 | void clear_given (struct gengetopt_args_info *args_inf
139    args_info->refsele_given = 0 ;
140    args_info->comsele_given = 0 ;
141    args_info->seleoffset_given = 0 ;
142 +  args_info->seleoffset2_given = 0 ;
143    args_info->molname_given = 0 ;
144    args_info->begin_given = 0 ;
145    args_info->end_given = 0 ;
# Line 168 | Line 171 | void clear_given (struct gengetopt_args_info *args_inf
171    args_info->tet_param_z_given = 0 ;
172    args_info->rnemdz_given = 0 ;
173    args_info->rnemdr_given = 0 ;
174 +  args_info->rnemdrt_given = 0 ;
175    args_info->staticProps_group_counter = 0 ;
176   }
177  
# Line 208 | Line 212 | void clear_args (struct gengetopt_args_info *args_info
212    args_info->comsele_arg = NULL;
213    args_info->comsele_orig = NULL;
214    args_info->seleoffset_orig = NULL;
215 +  args_info->seleoffset2_orig = NULL;
216    args_info->molname_arg = NULL;
217    args_info->molname_orig = NULL;
218    args_info->begin_orig = NULL;
# Line 242 | Line 247 | void init_args_info(struct gengetopt_args_info *args_i
247    args_info->refsele_help = gengetopt_args_info_help[18] ;
248    args_info->comsele_help = gengetopt_args_info_help[19] ;
249    args_info->seleoffset_help = gengetopt_args_info_help[20] ;
250 <  args_info->molname_help = gengetopt_args_info_help[21] ;
251 <  args_info->begin_help = gengetopt_args_info_help[22] ;
252 <  args_info->end_help = gengetopt_args_info_help[23] ;
253 <  args_info->radius_help = gengetopt_args_info_help[24] ;
254 <  args_info->bo_help = gengetopt_args_info_help[26] ;
255 <  args_info->bor_help = gengetopt_args_info_help[27] ;
256 <  args_info->bad_help = gengetopt_args_info_help[28] ;
257 <  args_info->count_help = gengetopt_args_info_help[29] ;
258 <  args_info->gofr_help = gengetopt_args_info_help[30] ;
259 <  args_info->gofz_help = gengetopt_args_info_help[31] ;
260 <  args_info->r_theta_help = gengetopt_args_info_help[32] ;
261 <  args_info->r_omega_help = gengetopt_args_info_help[33] ;
262 <  args_info->r_z_help = gengetopt_args_info_help[34] ;
263 <  args_info->theta_omega_help = gengetopt_args_info_help[35] ;
264 <  args_info->gxyz_help = gengetopt_args_info_help[36] ;
265 <  args_info->twodgofr_help = gengetopt_args_info_help[37] ;
266 <  args_info->p2_help = gengetopt_args_info_help[38] ;
267 <  args_info->rp2_help = gengetopt_args_info_help[39] ;
268 <  args_info->scd_help = gengetopt_args_info_help[40] ;
269 <  args_info->density_help = gengetopt_args_info_help[41] ;
270 <  args_info->slab_density_help = gengetopt_args_info_help[42] ;
271 <  args_info->p_angle_help = gengetopt_args_info_help[43] ;
272 <  args_info->hxy_help = gengetopt_args_info_help[44] ;
273 <  args_info->rho_r_help = gengetopt_args_info_help[45] ;
274 <  args_info->angle_r_help = gengetopt_args_info_help[46] ;
275 <  args_info->hullvol_help = gengetopt_args_info_help[47] ;
276 <  args_info->rodlength_help = gengetopt_args_info_help[48] ;
277 <  args_info->tet_param_help = gengetopt_args_info_help[49] ;
278 <  args_info->tet_param_z_help = gengetopt_args_info_help[50] ;
279 <  args_info->rnemdz_help = gengetopt_args_info_help[51] ;
280 <  args_info->rnemdr_help = gengetopt_args_info_help[52] ;
250 >  args_info->seleoffset2_help = gengetopt_args_info_help[21] ;
251 >  args_info->molname_help = gengetopt_args_info_help[22] ;
252 >  args_info->begin_help = gengetopt_args_info_help[23] ;
253 >  args_info->end_help = gengetopt_args_info_help[24] ;
254 >  args_info->radius_help = gengetopt_args_info_help[25] ;
255 >  args_info->bo_help = gengetopt_args_info_help[27] ;
256 >  args_info->bor_help = gengetopt_args_info_help[28] ;
257 >  args_info->bad_help = gengetopt_args_info_help[29] ;
258 >  args_info->count_help = gengetopt_args_info_help[30] ;
259 >  args_info->gofr_help = gengetopt_args_info_help[31] ;
260 >  args_info->gofz_help = gengetopt_args_info_help[32] ;
261 >  args_info->r_theta_help = gengetopt_args_info_help[33] ;
262 >  args_info->r_omega_help = gengetopt_args_info_help[34] ;
263 >  args_info->r_z_help = gengetopt_args_info_help[35] ;
264 >  args_info->theta_omega_help = gengetopt_args_info_help[36] ;
265 >  args_info->gxyz_help = gengetopt_args_info_help[37] ;
266 >  args_info->twodgofr_help = gengetopt_args_info_help[38] ;
267 >  args_info->p2_help = gengetopt_args_info_help[39] ;
268 >  args_info->rp2_help = gengetopt_args_info_help[40] ;
269 >  args_info->scd_help = gengetopt_args_info_help[41] ;
270 >  args_info->density_help = gengetopt_args_info_help[42] ;
271 >  args_info->slab_density_help = gengetopt_args_info_help[43] ;
272 >  args_info->p_angle_help = gengetopt_args_info_help[44] ;
273 >  args_info->hxy_help = gengetopt_args_info_help[45] ;
274 >  args_info->rho_r_help = gengetopt_args_info_help[46] ;
275 >  args_info->angle_r_help = gengetopt_args_info_help[47] ;
276 >  args_info->hullvol_help = gengetopt_args_info_help[48] ;
277 >  args_info->rodlength_help = gengetopt_args_info_help[49] ;
278 >  args_info->tet_param_help = gengetopt_args_info_help[50] ;
279 >  args_info->tet_param_z_help = gengetopt_args_info_help[51] ;
280 >  args_info->rnemdz_help = gengetopt_args_info_help[52] ;
281 >  args_info->rnemdr_help = gengetopt_args_info_help[53] ;
282 >  args_info->rnemdrt_help = gengetopt_args_info_help[54] ;
283    
284   }
285  
# Line 382 | Line 389 | cmdline_parser_release (struct gengetopt_args_info *ar
389    free_string_field (&(args_info->comsele_arg));
390    free_string_field (&(args_info->comsele_orig));
391    free_string_field (&(args_info->seleoffset_orig));
392 +  free_string_field (&(args_info->seleoffset2_orig));
393    free_string_field (&(args_info->molname_arg));
394    free_string_field (&(args_info->molname_orig));
395    free_string_field (&(args_info->begin_orig));
# Line 464 | Line 472 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
472      write_into_file(outfile, "comsele", args_info->comsele_orig, 0);
473    if (args_info->seleoffset_given)
474      write_into_file(outfile, "seleoffset", args_info->seleoffset_orig, 0);
475 +  if (args_info->seleoffset2_given)
476 +    write_into_file(outfile, "seleoffset2", args_info->seleoffset2_orig, 0);
477    if (args_info->molname_given)
478      write_into_file(outfile, "molname", args_info->molname_orig, 0);
479    if (args_info->begin_given)
# Line 526 | Line 536 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
536      write_into_file(outfile, "rnemdz", 0, 0 );
537    if (args_info->rnemdr_given)
538      write_into_file(outfile, "rnemdr", 0, 0 );
539 +  if (args_info->rnemdrt_given)
540 +    write_into_file(outfile, "rnemdrt", 0, 0 );
541    
542  
543    i = EXIT_SUCCESS;
# Line 606 | Line 618 | reset_group_staticProps(struct gengetopt_args_info *ar
618    args_info->tet_param_z_given = 0 ;
619    args_info->rnemdz_given = 0 ;
620    args_info->rnemdr_given = 0 ;
621 +  args_info->rnemdrt_given = 0 ;
622  
623    args_info->staticProps_group_counter = 0;
624   }
# Line 872 | Line 885 | cmdline_parser_internal (
885          { "refsele",    1, NULL, 0 },
886          { "comsele",    1, NULL, 0 },
887          { "seleoffset", 1, NULL, 0 },
888 +        { "seleoffset2",        1, NULL, 0 },
889          { "molname",    1, NULL, 0 },
890          { "begin",      1, NULL, 0 },
891          { "end",        1, NULL, 0 },
# Line 903 | Line 917 | cmdline_parser_internal (
917          { "tet_param_z",        0, NULL, 0 },
918          { "rnemdz",     0, NULL, 0 },
919          { "rnemdr",     0, NULL, 0 },
920 +        { "rnemdrt",    0, NULL, 0 },
921          { 0,  0, 0, 0 }
922        };
923  
# Line 1247 | Line 1262 | cmdline_parser_internal (
1262                goto failure;
1263            
1264            }
1265 +          /* global index offset for a third object (used to define a vector between sites in molecule).  */
1266 +          else if (strcmp (long_options[option_index].name, "seleoffset2") == 0)
1267 +          {
1268 +          
1269 +          
1270 +            if (update_arg( (void *)&(args_info->seleoffset2_arg),
1271 +                 &(args_info->seleoffset2_orig), &(args_info->seleoffset2_given),
1272 +                &(local_args_info.seleoffset2_given), optarg, 0, 0, ARG_INT,
1273 +                check_ambiguity, override, 0, 0,
1274 +                "seleoffset2", '-',
1275 +                additional_error))
1276 +              goto failure;
1277 +          
1278 +          }
1279            /* molecule name.  */
1280            else if (strcmp (long_options[option_index].name, "molname") == 0)
1281            {
# Line 1524 | Line 1553 | cmdline_parser_internal (
1553                goto failure;
1554            
1555            }
1556 <          /* p(cos(theta)).  */
1556 >          /* p(cos(theta)) (--sele1 must be specified, --sele2 is optional).  */
1557            else if (strcmp (long_options[option_index].name, "p_angle") == 0)
1558            {
1559            
# Line 1677 | Line 1706 | cmdline_parser_internal (
1706                goto failure;
1707            
1708            }
1709 +          /* shell and angle-resolved RNEMD statistics (temperature, density, angular velocity).  */
1710 +          else if (strcmp (long_options[option_index].name, "rnemdrt") == 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->rnemdrt_given),
1719 +                &(local_args_info.rnemdrt_given), optarg, 0, 0, ARG_NO,
1720 +                check_ambiguity, override, 0, 0,
1721 +                "rnemdrt", '-',
1722 +                additional_error))
1723 +              goto failure;
1724 +          
1725 +          }
1726 +          
1727            break;
1728          case '?':       /* Invalid option.  */
1729            /* `getopt_long' already printed an error message.  */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines