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

Comparing:
branches/development/src/applications/dynamicProps/DynamicPropsCmd.c (file contents), Revision 1629 by gezelter, Wed Sep 14 21:15:17 2011 UTC vs.
trunk/src/applications/dynamicProps/DynamicPropsCmd.cpp (file contents), Revision 1953 by gezelter, Thu Dec 5 18:19:26 2013 UTC

# Line 1 | Line 1
1   /*
2    File autogenerated by gengetopt version 2.22.4
3    generated with the following command:
4 <  gengetopt -F DynamicPropsCmd -u
4 >  gengetopt --file-name=DynamicPropsCmd --unamed-opts
5  
6    The developers of gengetopt consider the fixed text that goes in all
7    gengetopt output files to be in the public domain:
# Line 21 | Line 21
21   #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */
22   #endif
23  
24 + #ifdef WIN32
25 + #include "utils/wingetopt.h"
26 + #else
27   #include <getopt.h>
28 + #endif
29  
30   #include "DynamicPropsCmd.h"
31  
# Line 39 | Line 43 | const char *gengetopt_args_info_help[] = {
43    "      --sele1=selection script  select first stuntdouble set",
44    "      --sele2=selection script  select second stuntdouble set (if sele2 is not \n                                  set, use script from sele1)",
45    "      --order=INT               Lengendre Polynomial Order",
46 +  "  -z, --nzbins=INT              Number of Z bins  (default=`100')",
47    "  -m, --memory=memory specification\n                                Available memory (defaults to 2G)  \n                                  (default=`2G')",
48    "\n Group: dynamicProps\n   an option of this group is required",
49 +  "  -s, --selecorr                selection correlation function",
50    "  -r, --rcorr                   rmsd",
51    "  -v, --vcorr                   velocity correlation function",
52    "  -d, --dcorr                   dipole correlation function",
53    "  -l, --lcorr                   Lengendre correlation function",
54 <  "  -s, --sdcorr                  System dipole correlation function",
54 >  "      --lcorrZ                  Lengendre correlation function binned by Z",
55 >  "      --cohZ                    Lengendre correlation function for OH bond \n                                  vectors binned by Z",
56 >  "  -M, --sdcorr                  System dipole correlation function",
57    "      --r_rcorr                 Radial rmsd",
58    "      --thetacorr               Angular rmsd",
59    "      --drcorr                  Directional rmsd for particles with unit \n                                  vectors",
60    "      --helfandEcorr            Helfand moment for thermal conductvity",
61    "  -p, --momentum                Helfand momentum for viscosity",
62    "      --stresscorr              Stress tensor correlation function",
63 +  "  -b, --bondcorr                Bond extension correlation function",
64      0
65   };
66  
# Line 85 | Line 94 | void clear_given (struct gengetopt_args_info *args_inf
94    args_info->sele1_given = 0 ;
95    args_info->sele2_given = 0 ;
96    args_info->order_given = 0 ;
97 +  args_info->nzbins_given = 0 ;
98    args_info->memory_given = 0 ;
99 +  args_info->selecorr_given = 0 ;
100    args_info->rcorr_given = 0 ;
101    args_info->vcorr_given = 0 ;
102    args_info->dcorr_given = 0 ;
103    args_info->lcorr_given = 0 ;
104 +  args_info->lcorrZ_given = 0 ;
105 +  args_info->cohZ_given = 0 ;
106    args_info->sdcorr_given = 0 ;
107    args_info->r_rcorr_given = 0 ;
108    args_info->thetacorr_given = 0 ;
# Line 97 | Line 110 | void clear_given (struct gengetopt_args_info *args_inf
110    args_info->helfandEcorr_given = 0 ;
111    args_info->momentum_given = 0 ;
112    args_info->stresscorr_given = 0 ;
113 +  args_info->bondcorr_given = 0 ;
114    args_info->dynamicProps_group_counter = 0 ;
115   }
116  
# Line 113 | Line 127 | void clear_args (struct gengetopt_args_info *args_info
127    args_info->sele2_arg = NULL;
128    args_info->sele2_orig = NULL;
129    args_info->order_orig = NULL;
130 +  args_info->nzbins_arg = 100;
131 +  args_info->nzbins_orig = NULL;
132    args_info->memory_arg = gengetopt_strdup ("2G");
133    args_info->memory_orig = NULL;
134    
# Line 130 | Line 146 | void init_args_info(struct gengetopt_args_info *args_i
146    args_info->sele1_help = gengetopt_args_info_help[4] ;
147    args_info->sele2_help = gengetopt_args_info_help[5] ;
148    args_info->order_help = gengetopt_args_info_help[6] ;
149 <  args_info->memory_help = gengetopt_args_info_help[7] ;
150 <  args_info->rcorr_help = gengetopt_args_info_help[9] ;
151 <  args_info->vcorr_help = gengetopt_args_info_help[10] ;
152 <  args_info->dcorr_help = gengetopt_args_info_help[11] ;
153 <  args_info->lcorr_help = gengetopt_args_info_help[12] ;
154 <  args_info->sdcorr_help = gengetopt_args_info_help[13] ;
155 <  args_info->r_rcorr_help = gengetopt_args_info_help[14] ;
156 <  args_info->thetacorr_help = gengetopt_args_info_help[15] ;
157 <  args_info->drcorr_help = gengetopt_args_info_help[16] ;
158 <  args_info->helfandEcorr_help = gengetopt_args_info_help[17] ;
159 <  args_info->momentum_help = gengetopt_args_info_help[18] ;
160 <  args_info->stresscorr_help = gengetopt_args_info_help[19] ;
149 >  args_info->nzbins_help = gengetopt_args_info_help[7] ;
150 >  args_info->memory_help = gengetopt_args_info_help[8] ;
151 >  args_info->selecorr_help = gengetopt_args_info_help[10] ;
152 >  args_info->rcorr_help = gengetopt_args_info_help[11] ;
153 >  args_info->vcorr_help = gengetopt_args_info_help[12] ;
154 >  args_info->dcorr_help = gengetopt_args_info_help[13] ;
155 >  args_info->lcorr_help = gengetopt_args_info_help[14] ;
156 >  args_info->lcorrZ_help = gengetopt_args_info_help[15] ;
157 >  args_info->cohZ_help = gengetopt_args_info_help[16] ;
158 >  args_info->sdcorr_help = gengetopt_args_info_help[17] ;
159 >  args_info->r_rcorr_help = gengetopt_args_info_help[18] ;
160 >  args_info->thetacorr_help = gengetopt_args_info_help[19] ;
161 >  args_info->drcorr_help = gengetopt_args_info_help[20] ;
162 >  args_info->helfandEcorr_help = gengetopt_args_info_help[21] ;
163 >  args_info->momentum_help = gengetopt_args_info_help[22] ;
164 >  args_info->stresscorr_help = gengetopt_args_info_help[23] ;
165 >  args_info->bondcorr_help = gengetopt_args_info_help[24] ;
166    
167   }
168  
# Line 234 | Line 255 | cmdline_parser_release (struct gengetopt_args_info *ar
255    free_string_field (&(args_info->sele2_arg));
256    free_string_field (&(args_info->sele2_orig));
257    free_string_field (&(args_info->order_orig));
258 +  free_string_field (&(args_info->nzbins_orig));
259    free_string_field (&(args_info->memory_arg));
260    free_string_field (&(args_info->memory_orig));
261    
# Line 285 | Line 307 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
307      write_into_file(outfile, "sele2", args_info->sele2_orig, 0);
308    if (args_info->order_given)
309      write_into_file(outfile, "order", args_info->order_orig, 0);
310 +  if (args_info->nzbins_given)
311 +    write_into_file(outfile, "nzbins", args_info->nzbins_orig, 0);
312    if (args_info->memory_given)
313      write_into_file(outfile, "memory", args_info->memory_orig, 0);
314 +  if (args_info->selecorr_given)
315 +    write_into_file(outfile, "selecorr", 0, 0 );
316    if (args_info->rcorr_given)
317      write_into_file(outfile, "rcorr", 0, 0 );
318    if (args_info->vcorr_given)
# Line 295 | Line 321 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
321      write_into_file(outfile, "dcorr", 0, 0 );
322    if (args_info->lcorr_given)
323      write_into_file(outfile, "lcorr", 0, 0 );
324 +  if (args_info->lcorrZ_given)
325 +    write_into_file(outfile, "lcorrZ", 0, 0 );
326 +  if (args_info->cohZ_given)
327 +    write_into_file(outfile, "cohZ", 0, 0 );
328    if (args_info->sdcorr_given)
329      write_into_file(outfile, "sdcorr", 0, 0 );
330    if (args_info->r_rcorr_given)
# Line 309 | Line 339 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
339      write_into_file(outfile, "momentum", 0, 0 );
340    if (args_info->stresscorr_given)
341      write_into_file(outfile, "stresscorr", 0, 0 );
342 +  if (args_info->bondcorr_given)
343 +    write_into_file(outfile, "bondcorr", 0, 0 );
344    
345  
346    i = EXIT_SUCCESS;
# Line 362 | Line 394 | reset_group_dynamicProps(struct gengetopt_args_info *a
394    if (! args_info->dynamicProps_group_counter)
395      return;
396    
397 +  args_info->selecorr_given = 0 ;
398    args_info->rcorr_given = 0 ;
399    args_info->vcorr_given = 0 ;
400    args_info->dcorr_given = 0 ;
401    args_info->lcorr_given = 0 ;
402 +  args_info->lcorrZ_given = 0 ;
403 +  args_info->cohZ_given = 0 ;
404    args_info->sdcorr_given = 0 ;
405    args_info->r_rcorr_given = 0 ;
406    args_info->thetacorr_given = 0 ;
# Line 373 | Line 408 | reset_group_dynamicProps(struct gengetopt_args_info *a
408    args_info->helfandEcorr_given = 0 ;
409    args_info->momentum_given = 0 ;
410    args_info->stresscorr_given = 0 ;
411 +  args_info->bondcorr_given = 0 ;
412  
413    args_info->dynamicProps_group_counter = 0;
414   }
# Line 621 | Line 657 | cmdline_parser_internal (
657          { "sele1",      1, NULL, 0 },
658          { "sele2",      1, NULL, 0 },
659          { "order",      1, NULL, 0 },
660 +        { "nzbins",     1, NULL, 'z' },
661          { "memory",     1, NULL, 'm' },
662 +        { "selecorr",   0, NULL, 's' },
663          { "rcorr",      0, NULL, 'r' },
664          { "vcorr",      0, NULL, 'v' },
665          { "dcorr",      0, NULL, 'd' },
666          { "lcorr",      0, NULL, 'l' },
667 <        { "sdcorr",     0, NULL, 's' },
667 >        { "lcorrZ",     0, NULL, 0 },
668 >        { "cohZ",       0, NULL, 0 },
669 >        { "sdcorr",     0, NULL, 'M' },
670          { "r_rcorr",    0, NULL, 0 },
671          { "thetacorr",  0, NULL, 0 },
672          { "drcorr",     0, NULL, 0 },
673          { "helfandEcorr",       0, NULL, 0 },
674          { "momentum",   0, NULL, 'p' },
675          { "stresscorr", 0, NULL, 0 },
676 +        { "bondcorr",   0, NULL, 'b' },
677          { 0,  0, 0, 0 }
678        };
679  
680 <      c = getopt_long (argc, argv, "hVi:o:m:rvdlsp", long_options, &option_index);
680 >      c = getopt_long (argc, argv, "hVi:o:z:m:srvdlMpb", long_options, &option_index);
681  
682        if (c == -1) break;       /* Exit from `while (1)' loop.  */
683  
# Line 676 | Line 717 | cmdline_parser_internal (
717              goto failure;
718          
719            break;
720 +        case 'z':       /* Number of Z bins.  */
721 +        
722 +        
723 +          if (update_arg( (void *)&(args_info->nzbins_arg),
724 +               &(args_info->nzbins_orig), &(args_info->nzbins_given),
725 +              &(local_args_info.nzbins_given), optarg, 0, "100", ARG_INT,
726 +              check_ambiguity, override, 0, 0,
727 +              "nzbins", 'z',
728 +              additional_error))
729 +            goto failure;
730 +        
731 +          break;
732          case 'm':       /* Available memory (defaults to 2G).  */
733          
734          
# Line 688 | Line 741 | cmdline_parser_internal (
741              goto failure;
742          
743            break;
744 +        case 's':       /* selection correlation function.  */
745 +        
746 +          if (args_info->dynamicProps_group_counter && override)
747 +            reset_group_dynamicProps (args_info);
748 +          args_info->dynamicProps_group_counter += 1;
749 +        
750 +          if (update_arg( 0 ,
751 +               0 , &(args_info->selecorr_given),
752 +              &(local_args_info.selecorr_given), optarg, 0, 0, ARG_NO,
753 +              check_ambiguity, override, 0, 0,
754 +              "selecorr", 's',
755 +              additional_error))
756 +            goto failure;
757 +        
758 +          break;
759          case 'r':       /* rmsd.  */
760          
761            if (args_info->dynamicProps_group_counter && override)
# Line 748 | Line 816 | cmdline_parser_internal (
816              goto failure;
817          
818            break;
819 <        case 's':       /* System dipole correlation function.  */
819 >        case 'M':       /* System dipole correlation function.  */
820          
821            if (args_info->dynamicProps_group_counter && override)
822              reset_group_dynamicProps (args_info);
# Line 758 | Line 826 | cmdline_parser_internal (
826                 0 , &(args_info->sdcorr_given),
827                &(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO,
828                check_ambiguity, override, 0, 0,
829 <              "sdcorr", 's',
829 >              "sdcorr", 'M',
830                additional_error))
831              goto failure;
832          
# Line 774 | Line 842 | cmdline_parser_internal (
842                &(local_args_info.momentum_given), optarg, 0, 0, ARG_NO,
843                check_ambiguity, override, 0, 0,
844                "momentum", 'p',
845 +              additional_error))
846 +            goto failure;
847 +        
848 +          break;
849 +        case 'b':       /* Bond extension correlation function.  */
850 +        
851 +          if (args_info->dynamicProps_group_counter && override)
852 +            reset_group_dynamicProps (args_info);
853 +          args_info->dynamicProps_group_counter += 1;
854 +        
855 +          if (update_arg( 0 ,
856 +               0 , &(args_info->bondcorr_given),
857 +              &(local_args_info.bondcorr_given), optarg, 0, 0, ARG_NO,
858 +              check_ambiguity, override, 0, 0,
859 +              "bondcorr", 'b',
860                additional_error))
861              goto failure;
862          
# Line 822 | Line 905 | cmdline_parser_internal (
905                goto failure;
906            
907            }
908 +          /* Lengendre correlation function binned by Z.  */
909 +          else if (strcmp (long_options[option_index].name, "lcorrZ") == 0)
910 +          {
911 +          
912 +            if (args_info->dynamicProps_group_counter && override)
913 +              reset_group_dynamicProps (args_info);
914 +            args_info->dynamicProps_group_counter += 1;
915 +          
916 +            if (update_arg( 0 ,
917 +                 0 , &(args_info->lcorrZ_given),
918 +                &(local_args_info.lcorrZ_given), optarg, 0, 0, ARG_NO,
919 +                check_ambiguity, override, 0, 0,
920 +                "lcorrZ", '-',
921 +                additional_error))
922 +              goto failure;
923 +          
924 +          }
925 +          /* Lengendre correlation function for OH bond vectors binned by Z.  */
926 +          else if (strcmp (long_options[option_index].name, "cohZ") == 0)
927 +          {
928 +          
929 +            if (args_info->dynamicProps_group_counter && override)
930 +              reset_group_dynamicProps (args_info);
931 +            args_info->dynamicProps_group_counter += 1;
932 +          
933 +            if (update_arg( 0 ,
934 +                 0 , &(args_info->cohZ_given),
935 +                &(local_args_info.cohZ_given), optarg, 0, 0, ARG_NO,
936 +                check_ambiguity, override, 0, 0,
937 +                "cohZ", '-',
938 +                additional_error))
939 +              goto failure;
940 +          
941 +          }
942            /* Radial rmsd.  */
943            else if (strcmp (long_options[option_index].name, "r_rcorr") == 0)
944            {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines