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 2003 by gezelter, Sun Jun 1 19:28:44 2014 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 +  "  -f, --freqfluccorr            Frequency Fluctuation correlation function",
65      0
66   };
67  
# Line 85 | Line 95 | void clear_given (struct gengetopt_args_info *args_inf
95    args_info->sele1_given = 0 ;
96    args_info->sele2_given = 0 ;
97    args_info->order_given = 0 ;
98 +  args_info->nzbins_given = 0 ;
99    args_info->memory_given = 0 ;
100 +  args_info->selecorr_given = 0 ;
101    args_info->rcorr_given = 0 ;
102    args_info->vcorr_given = 0 ;
103    args_info->dcorr_given = 0 ;
104    args_info->lcorr_given = 0 ;
105 +  args_info->lcorrZ_given = 0 ;
106 +  args_info->cohZ_given = 0 ;
107    args_info->sdcorr_given = 0 ;
108    args_info->r_rcorr_given = 0 ;
109    args_info->thetacorr_given = 0 ;
# Line 97 | Line 111 | void clear_given (struct gengetopt_args_info *args_inf
111    args_info->helfandEcorr_given = 0 ;
112    args_info->momentum_given = 0 ;
113    args_info->stresscorr_given = 0 ;
114 +  args_info->bondcorr_given = 0 ;
115 +  args_info->freqfluccorr_given = 0 ;
116    args_info->dynamicProps_group_counter = 0 ;
117   }
118  
# Line 113 | Line 129 | void clear_args (struct gengetopt_args_info *args_info
129    args_info->sele2_arg = NULL;
130    args_info->sele2_orig = NULL;
131    args_info->order_orig = NULL;
132 +  args_info->nzbins_arg = 100;
133 +  args_info->nzbins_orig = NULL;
134    args_info->memory_arg = gengetopt_strdup ("2G");
135    args_info->memory_orig = NULL;
136    
# Line 130 | Line 148 | void init_args_info(struct gengetopt_args_info *args_i
148    args_info->sele1_help = gengetopt_args_info_help[4] ;
149    args_info->sele2_help = gengetopt_args_info_help[5] ;
150    args_info->order_help = gengetopt_args_info_help[6] ;
151 <  args_info->memory_help = gengetopt_args_info_help[7] ;
152 <  args_info->rcorr_help = gengetopt_args_info_help[9] ;
153 <  args_info->vcorr_help = gengetopt_args_info_help[10] ;
154 <  args_info->dcorr_help = gengetopt_args_info_help[11] ;
155 <  args_info->lcorr_help = gengetopt_args_info_help[12] ;
156 <  args_info->sdcorr_help = gengetopt_args_info_help[13] ;
157 <  args_info->r_rcorr_help = gengetopt_args_info_help[14] ;
158 <  args_info->thetacorr_help = gengetopt_args_info_help[15] ;
159 <  args_info->drcorr_help = gengetopt_args_info_help[16] ;
160 <  args_info->helfandEcorr_help = gengetopt_args_info_help[17] ;
161 <  args_info->momentum_help = gengetopt_args_info_help[18] ;
162 <  args_info->stresscorr_help = gengetopt_args_info_help[19] ;
151 >  args_info->nzbins_help = gengetopt_args_info_help[7] ;
152 >  args_info->memory_help = gengetopt_args_info_help[8] ;
153 >  args_info->selecorr_help = gengetopt_args_info_help[10] ;
154 >  args_info->rcorr_help = gengetopt_args_info_help[11] ;
155 >  args_info->vcorr_help = gengetopt_args_info_help[12] ;
156 >  args_info->dcorr_help = gengetopt_args_info_help[13] ;
157 >  args_info->lcorr_help = gengetopt_args_info_help[14] ;
158 >  args_info->lcorrZ_help = gengetopt_args_info_help[15] ;
159 >  args_info->cohZ_help = gengetopt_args_info_help[16] ;
160 >  args_info->sdcorr_help = gengetopt_args_info_help[17] ;
161 >  args_info->r_rcorr_help = gengetopt_args_info_help[18] ;
162 >  args_info->thetacorr_help = gengetopt_args_info_help[19] ;
163 >  args_info->drcorr_help = gengetopt_args_info_help[20] ;
164 >  args_info->helfandEcorr_help = gengetopt_args_info_help[21] ;
165 >  args_info->momentum_help = gengetopt_args_info_help[22] ;
166 >  args_info->stresscorr_help = gengetopt_args_info_help[23] ;
167 >  args_info->bondcorr_help = gengetopt_args_info_help[24] ;
168 >  args_info->freqfluccorr_help = gengetopt_args_info_help[25] ;
169    
170   }
171  
# Line 234 | Line 258 | cmdline_parser_release (struct gengetopt_args_info *ar
258    free_string_field (&(args_info->sele2_arg));
259    free_string_field (&(args_info->sele2_orig));
260    free_string_field (&(args_info->order_orig));
261 +  free_string_field (&(args_info->nzbins_orig));
262    free_string_field (&(args_info->memory_arg));
263    free_string_field (&(args_info->memory_orig));
264    
# Line 285 | Line 310 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
310      write_into_file(outfile, "sele2", args_info->sele2_orig, 0);
311    if (args_info->order_given)
312      write_into_file(outfile, "order", args_info->order_orig, 0);
313 +  if (args_info->nzbins_given)
314 +    write_into_file(outfile, "nzbins", args_info->nzbins_orig, 0);
315    if (args_info->memory_given)
316      write_into_file(outfile, "memory", args_info->memory_orig, 0);
317 +  if (args_info->selecorr_given)
318 +    write_into_file(outfile, "selecorr", 0, 0 );
319    if (args_info->rcorr_given)
320      write_into_file(outfile, "rcorr", 0, 0 );
321    if (args_info->vcorr_given)
# Line 295 | Line 324 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
324      write_into_file(outfile, "dcorr", 0, 0 );
325    if (args_info->lcorr_given)
326      write_into_file(outfile, "lcorr", 0, 0 );
327 +  if (args_info->lcorrZ_given)
328 +    write_into_file(outfile, "lcorrZ", 0, 0 );
329 +  if (args_info->cohZ_given)
330 +    write_into_file(outfile, "cohZ", 0, 0 );
331    if (args_info->sdcorr_given)
332      write_into_file(outfile, "sdcorr", 0, 0 );
333    if (args_info->r_rcorr_given)
# Line 309 | Line 342 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
342      write_into_file(outfile, "momentum", 0, 0 );
343    if (args_info->stresscorr_given)
344      write_into_file(outfile, "stresscorr", 0, 0 );
345 +  if (args_info->bondcorr_given)
346 +    write_into_file(outfile, "bondcorr", 0, 0 );
347 +  if (args_info->freqfluccorr_given)
348 +    write_into_file(outfile, "freqfluccorr", 0, 0 );
349    
350  
351    i = EXIT_SUCCESS;
# Line 362 | Line 399 | reset_group_dynamicProps(struct gengetopt_args_info *a
399    if (! args_info->dynamicProps_group_counter)
400      return;
401    
402 +  args_info->selecorr_given = 0 ;
403    args_info->rcorr_given = 0 ;
404    args_info->vcorr_given = 0 ;
405    args_info->dcorr_given = 0 ;
406    args_info->lcorr_given = 0 ;
407 +  args_info->lcorrZ_given = 0 ;
408 +  args_info->cohZ_given = 0 ;
409    args_info->sdcorr_given = 0 ;
410    args_info->r_rcorr_given = 0 ;
411    args_info->thetacorr_given = 0 ;
# Line 373 | Line 413 | reset_group_dynamicProps(struct gengetopt_args_info *a
413    args_info->helfandEcorr_given = 0 ;
414    args_info->momentum_given = 0 ;
415    args_info->stresscorr_given = 0 ;
416 +  args_info->bondcorr_given = 0 ;
417 +  args_info->freqfluccorr_given = 0 ;
418  
419    args_info->dynamicProps_group_counter = 0;
420   }
# Line 621 | Line 663 | cmdline_parser_internal (
663          { "sele1",      1, NULL, 0 },
664          { "sele2",      1, NULL, 0 },
665          { "order",      1, NULL, 0 },
666 +        { "nzbins",     1, NULL, 'z' },
667          { "memory",     1, NULL, 'm' },
668 +        { "selecorr",   0, NULL, 's' },
669          { "rcorr",      0, NULL, 'r' },
670          { "vcorr",      0, NULL, 'v' },
671          { "dcorr",      0, NULL, 'd' },
672          { "lcorr",      0, NULL, 'l' },
673 <        { "sdcorr",     0, NULL, 's' },
673 >        { "lcorrZ",     0, NULL, 0 },
674 >        { "cohZ",       0, NULL, 0 },
675 >        { "sdcorr",     0, NULL, 'M' },
676          { "r_rcorr",    0, NULL, 0 },
677          { "thetacorr",  0, NULL, 0 },
678          { "drcorr",     0, NULL, 0 },
679          { "helfandEcorr",       0, NULL, 0 },
680          { "momentum",   0, NULL, 'p' },
681          { "stresscorr", 0, NULL, 0 },
682 +        { "bondcorr",   0, NULL, 'b' },
683 +        { "freqfluccorr",       0, NULL, 'f' },
684          { 0,  0, 0, 0 }
685        };
686  
687 <      c = getopt_long (argc, argv, "hVi:o:m:rvdlsp", long_options, &option_index);
687 >      c = getopt_long (argc, argv, "hVi:o:z:m:srvdlMpbf", long_options, &option_index);
688  
689        if (c == -1) break;       /* Exit from `while (1)' loop.  */
690  
# Line 676 | Line 724 | cmdline_parser_internal (
724              goto failure;
725          
726            break;
727 +        case 'z':       /* Number of Z bins.  */
728 +        
729 +        
730 +          if (update_arg( (void *)&(args_info->nzbins_arg),
731 +               &(args_info->nzbins_orig), &(args_info->nzbins_given),
732 +              &(local_args_info.nzbins_given), optarg, 0, "100", ARG_INT,
733 +              check_ambiguity, override, 0, 0,
734 +              "nzbins", 'z',
735 +              additional_error))
736 +            goto failure;
737 +        
738 +          break;
739          case 'm':       /* Available memory (defaults to 2G).  */
740          
741          
# Line 688 | Line 748 | cmdline_parser_internal (
748              goto failure;
749          
750            break;
751 +        case 's':       /* selection correlation function.  */
752 +        
753 +          if (args_info->dynamicProps_group_counter && override)
754 +            reset_group_dynamicProps (args_info);
755 +          args_info->dynamicProps_group_counter += 1;
756 +        
757 +          if (update_arg( 0 ,
758 +               0 , &(args_info->selecorr_given),
759 +              &(local_args_info.selecorr_given), optarg, 0, 0, ARG_NO,
760 +              check_ambiguity, override, 0, 0,
761 +              "selecorr", 's',
762 +              additional_error))
763 +            goto failure;
764 +        
765 +          break;
766          case 'r':       /* rmsd.  */
767          
768            if (args_info->dynamicProps_group_counter && override)
# Line 748 | Line 823 | cmdline_parser_internal (
823              goto failure;
824          
825            break;
826 <        case 's':       /* System dipole correlation function.  */
826 >        case 'M':       /* System dipole correlation function.  */
827          
828            if (args_info->dynamicProps_group_counter && override)
829              reset_group_dynamicProps (args_info);
# Line 758 | Line 833 | cmdline_parser_internal (
833                 0 , &(args_info->sdcorr_given),
834                &(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO,
835                check_ambiguity, override, 0, 0,
836 <              "sdcorr", 's',
836 >              "sdcorr", 'M',
837                additional_error))
838              goto failure;
839          
# Line 778 | Line 853 | cmdline_parser_internal (
853              goto failure;
854          
855            break;
856 +        case 'b':       /* Bond extension correlation function.  */
857 +        
858 +          if (args_info->dynamicProps_group_counter && override)
859 +            reset_group_dynamicProps (args_info);
860 +          args_info->dynamicProps_group_counter += 1;
861 +        
862 +          if (update_arg( 0 ,
863 +               0 , &(args_info->bondcorr_given),
864 +              &(local_args_info.bondcorr_given), optarg, 0, 0, ARG_NO,
865 +              check_ambiguity, override, 0, 0,
866 +              "bondcorr", 'b',
867 +              additional_error))
868 +            goto failure;
869 +        
870 +          break;
871 +        case 'f':       /* Frequency Fluctuation correlation function.  */
872 +        
873 +          if (args_info->dynamicProps_group_counter && override)
874 +            reset_group_dynamicProps (args_info);
875 +          args_info->dynamicProps_group_counter += 1;
876 +        
877 +          if (update_arg( 0 ,
878 +               0 , &(args_info->freqfluccorr_given),
879 +              &(local_args_info.freqfluccorr_given), optarg, 0, 0, ARG_NO,
880 +              check_ambiguity, override, 0, 0,
881 +              "freqfluccorr", 'f',
882 +              additional_error))
883 +            goto failure;
884 +        
885 +          break;
886  
887          case 0: /* Long option with no short option */
888            /* select first stuntdouble set.  */
# Line 822 | Line 927 | cmdline_parser_internal (
927                goto failure;
928            
929            }
930 +          /* Lengendre correlation function binned by Z.  */
931 +          else if (strcmp (long_options[option_index].name, "lcorrZ") == 0)
932 +          {
933 +          
934 +            if (args_info->dynamicProps_group_counter && override)
935 +              reset_group_dynamicProps (args_info);
936 +            args_info->dynamicProps_group_counter += 1;
937 +          
938 +            if (update_arg( 0 ,
939 +                 0 , &(args_info->lcorrZ_given),
940 +                &(local_args_info.lcorrZ_given), optarg, 0, 0, ARG_NO,
941 +                check_ambiguity, override, 0, 0,
942 +                "lcorrZ", '-',
943 +                additional_error))
944 +              goto failure;
945 +          
946 +          }
947 +          /* Lengendre correlation function for OH bond vectors binned by Z.  */
948 +          else if (strcmp (long_options[option_index].name, "cohZ") == 0)
949 +          {
950 +          
951 +            if (args_info->dynamicProps_group_counter && override)
952 +              reset_group_dynamicProps (args_info);
953 +            args_info->dynamicProps_group_counter += 1;
954 +          
955 +            if (update_arg( 0 ,
956 +                 0 , &(args_info->cohZ_given),
957 +                &(local_args_info.cohZ_given), optarg, 0, 0, ARG_NO,
958 +                check_ambiguity, override, 0, 0,
959 +                "cohZ", '-',
960 +                additional_error))
961 +              goto failure;
962 +          
963 +          }
964            /* Radial rmsd.  */
965            else if (strcmp (long_options[option_index].name, "r_rcorr") == 0)
966            {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines