| 38 |
|
printf(" -h, --help Print help and exit\n"); |
| 39 |
|
printf(" -V, --version Print version and exit\n"); |
| 40 |
|
printf(" -i, --input=filename input dump file\n"); |
| 41 |
< |
printf(" -o, --output=STRING output file name\n"); |
| 41 |
> |
printf(" -o, --output=filename output file name\n"); |
| 42 |
|
printf(" -n, --frame=INT print every n frame (default=`1')\n"); |
| 43 |
|
printf(" -d, --dipole print the dipole moments (default=off)\n"); |
| 44 |
|
printf(" -w, --water skip the the waters (default=off)\n"); |
| 45 |
|
printf(" -m, --periodicBox map to the periodic box (default=off)\n"); |
| 46 |
< |
printf(" -r, --replace replace the atom types of zconstraint molecules \n (default=off)\n"); |
| 46 |
> |
printf(" -z, --zconstraint replace the atom types of zconstraint molecules \n (default=off)\n"); |
| 47 |
> |
printf(" -r, --rigidbody add a pseudo COM atom to rigidbody (default=off)\n"); |
| 48 |
> |
printf(" -t, --watertype replace the atom type of water model (default=on)\n"); |
| 49 |
|
printf(" -s, --ignore=atomtype ignore the atom types\n"); |
| 50 |
|
printf(" --repeatX=INT The number of images to repeat in the x direction \n (default=`0')\n"); |
| 51 |
|
printf(" --repeatY=INT The number of images to repeat in the y direction \n (default=`0')\n"); |
| 89 |
|
args_info->dipole_given = 0 ; |
| 90 |
|
args_info->water_given = 0 ; |
| 91 |
|
args_info->periodicBox_given = 0 ; |
| 92 |
< |
args_info->replace_given = 0 ; |
| 92 |
> |
args_info->zconstraint_given = 0 ; |
| 93 |
> |
args_info->rigidbody_given = 0 ; |
| 94 |
> |
args_info->watertype_given = 0 ; |
| 95 |
|
args_info->ignore_given = 0 ; |
| 96 |
|
args_info->repeatX_given = 0 ; |
| 97 |
|
args_info->repeatY_given = 0 ; |
| 103 |
|
args_info->dipole_flag = 0;\ |
| 104 |
|
args_info->water_flag = 0;\ |
| 105 |
|
args_info->periodicBox_flag = 0;\ |
| 106 |
< |
args_info->replace_flag = 0;\ |
| 106 |
> |
args_info->zconstraint_flag = 0;\ |
| 107 |
> |
args_info->rigidbody_flag = 0;\ |
| 108 |
> |
args_info->watertype_flag = 1;\ |
| 109 |
|
args_info->ignore_arg = NULL; \ |
| 110 |
|
args_info->repeatX_arg = 0 ;\ |
| 111 |
|
args_info->repeatY_arg = 0 ;\ |
| 133 |
|
{ "dipole", 0, NULL, 'd' }, |
| 134 |
|
{ "water", 0, NULL, 'w' }, |
| 135 |
|
{ "periodicBox", 0, NULL, 'm' }, |
| 136 |
< |
{ "replace", 0, NULL, 'r' }, |
| 136 |
> |
{ "zconstraint", 0, NULL, 'z' }, |
| 137 |
> |
{ "rigidbody", 0, NULL, 'r' }, |
| 138 |
> |
{ "watertype", 0, NULL, 't' }, |
| 139 |
|
{ "ignore", 1, NULL, 's' }, |
| 140 |
|
{ "repeatX", 1, NULL, 0 }, |
| 141 |
|
{ "repeatY", 1, NULL, 0 }, |
| 144 |
|
}; |
| 145 |
|
|
| 146 |
|
stop_char = 0; |
| 147 |
< |
c = getopt_long (argc, argv, "hVi:o:n:dwmrs:", long_options, &option_index); |
| 147 |
> |
c = getopt_long (argc, argv, "hVi:o:n:dwmzrts:", long_options, &option_index); |
| 148 |
|
|
| 149 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
| 150 |
|
|
| 226 |
|
args_info->periodicBox_flag = !(args_info->periodicBox_flag); |
| 227 |
|
break; |
| 228 |
|
|
| 229 |
< |
case 'r': /* replace the atom types of zconstraint molecules. */ |
| 230 |
< |
if (args_info->replace_given) |
| 229 |
> |
case 'z': /* replace the atom types of zconstraint molecules. */ |
| 230 |
> |
if (args_info->zconstraint_given) |
| 231 |
|
{ |
| 232 |
< |
fprintf (stderr, "%s: `--replace' (`-r') option given more than once\n", CMDLINE_PARSER_PACKAGE); |
| 232 |
> |
fprintf (stderr, "%s: `--zconstraint' (`-z') option given more than once\n", CMDLINE_PARSER_PACKAGE); |
| 233 |
> |
clear_args (); |
| 234 |
> |
exit (EXIT_FAILURE); |
| 235 |
> |
} |
| 236 |
> |
args_info->zconstraint_given = 1; |
| 237 |
> |
args_info->zconstraint_flag = !(args_info->zconstraint_flag); |
| 238 |
> |
break; |
| 239 |
> |
|
| 240 |
> |
case 'r': /* add a pseudo COM atom to rigidbody. */ |
| 241 |
> |
if (args_info->rigidbody_given) |
| 242 |
> |
{ |
| 243 |
> |
fprintf (stderr, "%s: `--rigidbody' (`-r') option given more than once\n", CMDLINE_PARSER_PACKAGE); |
| 244 |
|
clear_args (); |
| 245 |
|
exit (EXIT_FAILURE); |
| 246 |
|
} |
| 247 |
< |
args_info->replace_given = 1; |
| 248 |
< |
args_info->replace_flag = !(args_info->replace_flag); |
| 247 |
> |
args_info->rigidbody_given = 1; |
| 248 |
> |
args_info->rigidbody_flag = !(args_info->rigidbody_flag); |
| 249 |
|
break; |
| 250 |
|
|
| 251 |
+ |
case 't': /* replace the atom type of water model. */ |
| 252 |
+ |
if (args_info->watertype_given) |
| 253 |
+ |
{ |
| 254 |
+ |
fprintf (stderr, "%s: `--watertype' (`-t') option given more than once\n", CMDLINE_PARSER_PACKAGE); |
| 255 |
+ |
clear_args (); |
| 256 |
+ |
exit (EXIT_FAILURE); |
| 257 |
+ |
} |
| 258 |
+ |
args_info->watertype_given = 1; |
| 259 |
+ |
args_info->watertype_flag = !(args_info->watertype_flag); |
| 260 |
+ |
break; |
| 261 |
+ |
|
| 262 |
|
case 's': /* ignore the atom types. */ |
| 263 |
|
args_info->ignore_given++; |
| 264 |
|
ignore_new = (struct ignore_list *) malloc (sizeof (struct ignore_list)); |