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 1992 by gezelter, Thu Apr 24 17:30:00 2014 UTC vs.
Revision 1999 by gezelter, Sat May 31 21:00:46 2014 UTC

# Line 92 | Line 92 | const char *gengetopt_args_info_help[] = {
92    "      --rnemdz                  slab-resolved RNEMD statistics (temperature, \n                                  density, velocity)",
93    "      --rnemdr                  shell-resolved RNEMD statistics (temperature, \n                                  density, angular velocity)",
94    "      --rnemdrt                 shell and angle-resolved RNEMD statistics \n                                  (temperature, density, angular velocity)",
95 +  "      --nitrile                 electrostatic potential to frequency map based \n                                  on the Cho nitrile fits",
96 +  "  -m, --multipole               average multipole moments contained within \n                                  cutoff spheres as a function of radius",
97      0
98   };
99  
# Line 174 | Line 176 | void clear_given (struct gengetopt_args_info *args_inf
176    args_info->rnemdz_given = 0 ;
177    args_info->rnemdr_given = 0 ;
178    args_info->rnemdrt_given = 0 ;
179 +  args_info->nitrile_given = 0 ;
180 +  args_info->multipole_given = 0 ;
181    args_info->staticProps_group_counter = 0 ;
182   }
183  
# Line 283 | Line 287 | void init_args_info(struct gengetopt_args_info *args_i
287    args_info->rnemdz_help = gengetopt_args_info_help[53] ;
288    args_info->rnemdr_help = gengetopt_args_info_help[54] ;
289    args_info->rnemdrt_help = gengetopt_args_info_help[55] ;
290 +  args_info->nitrile_help = gengetopt_args_info_help[56] ;
291 +  args_info->multipole_help = gengetopt_args_info_help[57] ;
292    
293   }
294  
# Line 543 | Line 549 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
549      write_into_file(outfile, "rnemdr", 0, 0 );
550    if (args_info->rnemdrt_given)
551      write_into_file(outfile, "rnemdrt", 0, 0 );
552 +  if (args_info->nitrile_given)
553 +    write_into_file(outfile, "nitrile", 0, 0 );
554 +  if (args_info->multipole_given)
555 +    write_into_file(outfile, "multipole", 0, 0 );
556    
557  
558    i = EXIT_SUCCESS;
# Line 625 | Line 635 | reset_group_staticProps(struct gengetopt_args_info *ar
635    args_info->rnemdz_given = 0 ;
636    args_info->rnemdr_given = 0 ;
637    args_info->rnemdrt_given = 0 ;
638 +  args_info->nitrile_given = 0 ;
639 +  args_info->multipole_given = 0 ;
640  
641    args_info->staticProps_group_counter = 0;
642   }
# Line 925 | Line 937 | cmdline_parser_internal (
937          { "rnemdz",     0, NULL, 0 },
938          { "rnemdr",     0, NULL, 0 },
939          { "rnemdrt",    0, NULL, 0 },
940 +        { "nitrile",    0, NULL, 0 },
941 +        { "multipole",  0, NULL, 'm' },
942          { 0,  0, 0, 0 }
943        };
944  
945 <      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index);
945 >      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQm", long_options, &option_index);
946  
947        if (c == -1) break;       /* Exit from `while (1)' loop.  */
948  
# Line 1123 | Line 1137 | cmdline_parser_internal (
1137                &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO,
1138                check_ambiguity, override, 0, 0,
1139                "tet_param", 'Q',
1140 +              additional_error))
1141 +            goto failure;
1142 +        
1143 +          break;
1144 +        case 'm':       /* average multipole moments contained within cutoff spheres as a function of radius.  */
1145 +        
1146 +          if (args_info->staticProps_group_counter && override)
1147 +            reset_group_staticProps (args_info);
1148 +          args_info->staticProps_group_counter += 1;
1149 +        
1150 +          if (update_arg( 0 ,
1151 +               0 , &(args_info->multipole_given),
1152 +              &(local_args_info.multipole_given), optarg, 0, 0, ARG_NO,
1153 +              check_ambiguity, override, 0, 0,
1154 +              "multipole", 'm',
1155                additional_error))
1156              goto failure;
1157          
# Line 1747 | Line 1776 | cmdline_parser_internal (
1776                goto failure;
1777            
1778            }
1779 +          /* electrostatic potential to frequency map based on the Cho nitrile fits.  */
1780 +          else if (strcmp (long_options[option_index].name, "nitrile") == 0)
1781 +          {
1782            
1783 +            if (args_info->staticProps_group_counter && override)
1784 +              reset_group_staticProps (args_info);
1785 +            args_info->staticProps_group_counter += 1;
1786 +          
1787 +            if (update_arg( 0 ,
1788 +                 0 , &(args_info->nitrile_given),
1789 +                &(local_args_info.nitrile_given), optarg, 0, 0, ARG_NO,
1790 +                check_ambiguity, override, 0, 0,
1791 +                "nitrile", '-',
1792 +                additional_error))
1793 +              goto failure;
1794 +          
1795 +          }
1796 +          
1797            break;
1798          case '?':       /* Invalid option.  */
1799            /* `getopt_long' already printed an error message.  */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines