ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/sequentialProps/SequentialPropsCmd.cpp
(Generate patch)

Comparing trunk/src/applications/sequentialProps/SequentialPropsCmd.cpp (file contents):
Revision 2035 by gezelter, Tue Nov 4 15:31:51 2014 UTC vs.
Revision 2081 by gezelter, Tue Mar 17 18:22:18 2015 UTC

# Line 44 | Line 44 | const char *gengetopt_args_info_help[] = {
44    "      --sele2=selection script  select second stuntdouble set (if sele2 is not \n                                  set, use script from sele1)",
45    "  -b, --nbins=INT               number of bins (general purpose)  \n                                  (default=`100')",
46    "      --nbins_z=INT             number of bins in z axis  (default=`100')",
47 +  "  -x, --centroidX=DOUBLE        Location of droplet centroid in x",
48 +  "  -y, --centroidY=DOUBLE        Location of droplet centroid in y",
49    "  -z, --referenceZ=DOUBLE       Reference z-height of solid surface",
50    "  -r, --dropletR=DOUBLE         Droplet radius in angstroms",
51    "      --threshDens=DOUBLE       Threshold Density in g/cm^3",
52 +  "      --bufferLength=DOUBLE     Buffer length in angstroms",
53    "\n Group: sequentialProps\n   an option of this group is required",
54    "  -c, --com                     selection center of mass",
55    "      --ca1                     contact angle of selection (using center of \n                                  mass)",
# Line 86 | Line 89 | void clear_given (struct gengetopt_args_info *args_inf
89    args_info->sele2_given = 0 ;
90    args_info->nbins_given = 0 ;
91    args_info->nbins_z_given = 0 ;
92 +  args_info->centroidX_given = 0 ;
93 +  args_info->centroidY_given = 0 ;
94    args_info->referenceZ_given = 0 ;
95    args_info->dropletR_given = 0 ;
96    args_info->threshDens_given = 0 ;
97 +  args_info->bufferLength_given = 0 ;
98    args_info->com_given = 0 ;
99    args_info->ca1_given = 0 ;
100    args_info->ca2_given = 0 ;
# Line 111 | Line 117 | void clear_args (struct gengetopt_args_info *args_info
117    args_info->nbins_orig = NULL;
118    args_info->nbins_z_arg = 100;
119    args_info->nbins_z_orig = NULL;
120 +  args_info->centroidX_orig = NULL;
121 +  args_info->centroidY_orig = NULL;
122    args_info->referenceZ_orig = NULL;
123    args_info->dropletR_orig = NULL;
124    args_info->threshDens_orig = NULL;
125 +  args_info->bufferLength_orig = NULL;
126    
127   }
128  
# Line 130 | Line 139 | void init_args_info(struct gengetopt_args_info *args_i
139    args_info->sele2_help = gengetopt_args_info_help[5] ;
140    args_info->nbins_help = gengetopt_args_info_help[6] ;
141    args_info->nbins_z_help = gengetopt_args_info_help[7] ;
142 <  args_info->referenceZ_help = gengetopt_args_info_help[8] ;
143 <  args_info->dropletR_help = gengetopt_args_info_help[9] ;
144 <  args_info->threshDens_help = gengetopt_args_info_help[10] ;
145 <  args_info->com_help = gengetopt_args_info_help[12] ;
146 <  args_info->ca1_help = gengetopt_args_info_help[13] ;
147 <  args_info->ca2_help = gengetopt_args_info_help[14] ;
142 >  args_info->centroidX_help = gengetopt_args_info_help[8] ;
143 >  args_info->centroidY_help = gengetopt_args_info_help[9] ;
144 >  args_info->referenceZ_help = gengetopt_args_info_help[10] ;
145 >  args_info->dropletR_help = gengetopt_args_info_help[11] ;
146 >  args_info->threshDens_help = gengetopt_args_info_help[12] ;
147 >  args_info->bufferLength_help = gengetopt_args_info_help[13] ;
148 >  args_info->com_help = gengetopt_args_info_help[15] ;
149 >  args_info->ca1_help = gengetopt_args_info_help[16] ;
150 >  args_info->ca2_help = gengetopt_args_info_help[17] ;
151    
152   }
153  
# Line 229 | Line 241 | cmdline_parser_release (struct gengetopt_args_info *ar
241    free_string_field (&(args_info->sele2_orig));
242    free_string_field (&(args_info->nbins_orig));
243    free_string_field (&(args_info->nbins_z_orig));
244 +  free_string_field (&(args_info->centroidX_orig));
245 +  free_string_field (&(args_info->centroidY_orig));
246    free_string_field (&(args_info->referenceZ_orig));
247    free_string_field (&(args_info->dropletR_orig));
248    free_string_field (&(args_info->threshDens_orig));
249 +  free_string_field (&(args_info->bufferLength_orig));
250    
251    
252    for (i = 0; i < args_info->inputs_num; ++i)
# Line 283 | Line 298 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
298      write_into_file(outfile, "nbins", args_info->nbins_orig, 0);
299    if (args_info->nbins_z_given)
300      write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0);
301 +  if (args_info->centroidX_given)
302 +    write_into_file(outfile, "centroidX", args_info->centroidX_orig, 0);
303 +  if (args_info->centroidY_given)
304 +    write_into_file(outfile, "centroidY", args_info->centroidY_orig, 0);
305    if (args_info->referenceZ_given)
306      write_into_file(outfile, "referenceZ", args_info->referenceZ_orig, 0);
307    if (args_info->dropletR_given)
308      write_into_file(outfile, "dropletR", args_info->dropletR_orig, 0);
309    if (args_info->threshDens_given)
310      write_into_file(outfile, "threshDens", args_info->threshDens_orig, 0);
311 +  if (args_info->bufferLength_given)
312 +    write_into_file(outfile, "bufferLength", args_info->bufferLength_orig, 0);
313    if (args_info->com_given)
314      write_into_file(outfile, "com", 0, 0 );
315    if (args_info->ca1_given)
# Line 604 | Line 625 | cmdline_parser_internal (
625          { "sele2",      1, NULL, 0 },
626          { "nbins",      1, NULL, 'b' },
627          { "nbins_z",    1, NULL, 0 },
628 +        { "centroidX",  1, NULL, 'x' },
629 +        { "centroidY",  1, NULL, 'y' },
630          { "referenceZ", 1, NULL, 'z' },
631          { "dropletR",   1, NULL, 'r' },
632          { "threshDens", 1, NULL, 0 },
633 +        { "bufferLength",       1, NULL, 0 },
634          { "com",        0, NULL, 'c' },
635          { "ca1",        0, NULL, 0 },
636          { "ca2",        0, NULL, 0 },
637          { 0,  0, 0, 0 }
638        };
639  
640 <      c = getopt_long (argc, argv, "hVi:o:b:z:r:c", long_options, &option_index);
640 >      c = getopt_long (argc, argv, "hVi:o:b:x:y:z:r:c", long_options, &option_index);
641  
642        if (c == -1) break;       /* Exit from `while (1)' loop.  */
643  
# Line 665 | Line 689 | cmdline_parser_internal (
689              goto failure;
690          
691            break;
692 +        case 'x':       /* Location of droplet centroid in x.  */
693 +        
694 +        
695 +          if (update_arg( (void *)&(args_info->centroidX_arg),
696 +               &(args_info->centroidX_orig), &(args_info->centroidX_given),
697 +              &(local_args_info.centroidX_given), optarg, 0, 0, ARG_DOUBLE,
698 +              check_ambiguity, override, 0, 0,
699 +              "centroidX", 'x',
700 +              additional_error))
701 +            goto failure;
702 +        
703 +          break;
704 +        case 'y':       /* Location of droplet centroid in y.  */
705 +        
706 +        
707 +          if (update_arg( (void *)&(args_info->centroidY_arg),
708 +               &(args_info->centroidY_orig), &(args_info->centroidY_given),
709 +              &(local_args_info.centroidY_given), optarg, 0, 0, ARG_DOUBLE,
710 +              check_ambiguity, override, 0, 0,
711 +              "centroidY", 'y',
712 +              additional_error))
713 +            goto failure;
714 +        
715 +          break;
716          case 'z':       /* Reference z-height of solid surface.  */
717          
718          
# Line 762 | Line 810 | cmdline_parser_internal (
810                goto failure;
811            
812            }
813 +          /* Buffer length in angstroms.  */
814 +          else if (strcmp (long_options[option_index].name, "bufferLength") == 0)
815 +          {
816 +          
817 +          
818 +            if (update_arg( (void *)&(args_info->bufferLength_arg),
819 +                 &(args_info->bufferLength_orig), &(args_info->bufferLength_given),
820 +                &(local_args_info.bufferLength_given), optarg, 0, 0, ARG_DOUBLE,
821 +                check_ambiguity, override, 0, 0,
822 +                "bufferLength", '-',
823 +                additional_error))
824 +              goto failure;
825 +          
826 +          }
827            /* contact angle of selection (using center of mass).  */
828            else if (strcmp (long_options[option_index].name, "ca1") == 0)
829            {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines