/* * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * Evgeniy Alekseev wrote this file. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think * this stuff is worth it, you can buy me a beer in return * ---------------------------------------------------------------------------- */ /** * @file main.c * Source code of trj * @author Evgeniy Alekseev (arcanis) * @copyright Beerware * @bug No known bugs */ #include #include #include #include #include "add_main.h" #include #include #include #include #include #include /** * @fn main */ int main(int argc, char *argv[]) /** * @return 1 - error in error_checking * @return 2 - input file does not exist * @return 3 - memory error * @return 4 - unknown flag * @return 0 - exit without errors */ { char tmp_str[2048]; int error, i; FILE *f_inp, *f_log; char *ch_atom_types, input[256], input_at[256], logfile[256], output[256]; float *coords; int *atom_types, log, *num_atoms, *num_mol, num_types, quiet, step, total_types, type; /* ch_atom_types massive of char atom types * input input file name * input_at input file name with atom types * logfile log file name * output mask of output files * * coords massive of coordinates * * atom_types massive of atom types * log status of log-mode * num_atoms massive of number of atoms of selected molecule * num_mol massive of number of molecule of selected type * num_types number of molecule types * quiet status of quiet-mode * step number of trajectory steps * total_types number of different atom types * type type of trajectory */ set_defaults (input, input_at, &log, output, &step, &total_types, &type, &quiet); for (i=1; i