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 1990 by gezelter, Sat Apr 5 20:56:01 2014 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 138 | 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 210 | 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 244 | 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] ;
281 <  args_info->rnemdrt_help = gengetopt_args_info_help[53] ;
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 385 | 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 467 | 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 878 | 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 1250 | Line 1258 | cmdline_parser_internal (
1258                  &(local_args_info.seleoffset_given), optarg, 0, 0, ARG_INT,
1259                  check_ambiguity, override, 0, 0,
1260                  "seleoffset", '-',
1261 +                additional_error))
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            

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines