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

Comparing trunk/src/applications/dynamicProps/DynamicPropsCmd.cpp (file contents):
Revision 1915 by gezelter, Mon Jul 29 17:55:17 2013 UTC vs.
Revision 1939 by gezelter, Thu Oct 31 18:18:57 2013 UTC

# 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 48 | Line 52 | const char *gengetopt_args_info_help[] = {
52    "  -d, --dcorr                   dipole correlation function",
53    "  -l, --lcorr                   Lengendre 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",
# Line 96 | Line 101 | void clear_given (struct gengetopt_args_info *args_inf
101    args_info->dcorr_given = 0 ;
102    args_info->lcorr_given = 0 ;
103    args_info->lcorrZ_given = 0 ;
104 +  args_info->cohZ_given = 0 ;
105    args_info->sdcorr_given = 0 ;
106    args_info->r_rcorr_given = 0 ;
107    args_info->thetacorr_given = 0 ;
# Line 146 | Line 152 | void init_args_info(struct gengetopt_args_info *args_i
152    args_info->dcorr_help = gengetopt_args_info_help[13] ;
153    args_info->lcorr_help = gengetopt_args_info_help[14] ;
154    args_info->lcorrZ_help = gengetopt_args_info_help[15] ;
155 <  args_info->sdcorr_help = gengetopt_args_info_help[16] ;
156 <  args_info->r_rcorr_help = gengetopt_args_info_help[17] ;
157 <  args_info->thetacorr_help = gengetopt_args_info_help[18] ;
158 <  args_info->drcorr_help = gengetopt_args_info_help[19] ;
159 <  args_info->helfandEcorr_help = gengetopt_args_info_help[20] ;
160 <  args_info->momentum_help = gengetopt_args_info_help[21] ;
161 <  args_info->stresscorr_help = gengetopt_args_info_help[22] ;
155 >  args_info->cohZ_help = gengetopt_args_info_help[16] ;
156 >  args_info->sdcorr_help = gengetopt_args_info_help[17] ;
157 >  args_info->r_rcorr_help = gengetopt_args_info_help[18] ;
158 >  args_info->thetacorr_help = gengetopt_args_info_help[19] ;
159 >  args_info->drcorr_help = gengetopt_args_info_help[20] ;
160 >  args_info->helfandEcorr_help = gengetopt_args_info_help[21] ;
161 >  args_info->momentum_help = gengetopt_args_info_help[22] ;
162 >  args_info->stresscorr_help = gengetopt_args_info_help[23] ;
163    
164   }
165  
# Line 313 | Line 320 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
320      write_into_file(outfile, "lcorr", 0, 0 );
321    if (args_info->lcorrZ_given)
322      write_into_file(outfile, "lcorrZ", 0, 0 );
323 +  if (args_info->cohZ_given)
324 +    write_into_file(outfile, "cohZ", 0, 0 );
325    if (args_info->sdcorr_given)
326      write_into_file(outfile, "sdcorr", 0, 0 );
327    if (args_info->r_rcorr_given)
# Line 386 | Line 395 | reset_group_dynamicProps(struct gengetopt_args_info *a
395    args_info->dcorr_given = 0 ;
396    args_info->lcorr_given = 0 ;
397    args_info->lcorrZ_given = 0 ;
398 +  args_info->cohZ_given = 0 ;
399    args_info->sdcorr_given = 0 ;
400    args_info->r_rcorr_given = 0 ;
401    args_info->thetacorr_given = 0 ;
# Line 649 | Line 659 | cmdline_parser_internal (
659          { "dcorr",      0, NULL, 'd' },
660          { "lcorr",      0, NULL, 'l' },
661          { "lcorrZ",     0, NULL, 0 },
662 +        { "cohZ",       0, NULL, 0 },
663          { "sdcorr",     0, NULL, 'M' },
664          { "r_rcorr",    0, NULL, 0 },
665          { "thetacorr",  0, NULL, 0 },
# Line 889 | Line 900 | cmdline_parser_internal (
900                goto failure;
901            
902            }
903 +          /* Lengendre correlation function for OH bond vectors binned by Z.  */
904 +          else if (strcmp (long_options[option_index].name, "cohZ") == 0)
905 +          {
906 +          
907 +            if (args_info->dynamicProps_group_counter && override)
908 +              reset_group_dynamicProps (args_info);
909 +            args_info->dynamicProps_group_counter += 1;
910 +          
911 +            if (update_arg( 0 ,
912 +                 0 , &(args_info->cohZ_given),
913 +                &(local_args_info.cohZ_given), optarg, 0, 0, ARG_NO,
914 +                check_ambiguity, override, 0, 0,
915 +                "cohZ", '-',
916 +                additional_error))
917 +              goto failure;
918 +          
919 +          }
920            /* Radial rmsd.  */
921            else if (strcmp (long_options[option_index].name, "r_rcorr") == 0)
922            {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines