/**
* @file
*/
/**
* @mainpage mm_trj
* @image latex ./logo.png
*
* @section intro_sec Introduction
*
* About this program:
*
* - Program that generates trajectory files
*
*
* Developer:
*
* - Evgeniy Alekseev aka arcanis
*
* License:
*
*
* @section How-To-Use How to use
* Usage:
*
* mm_trj -i INPUT_TRJ -t INPUT_TYPE -s NUMBER -a INPUT_ATOMS -o OUTPUT [ -tt TOTAL_TYPES ]
* [ -l LOGFILE ] [ -q ] [ -h ]
* Parametrs:
* -i - input file name
* -t - type of trajectory. Supported formats: gmx, puma
* -s - number of trajectory steps (integer)
* -a - input file with atom types. See file format in manual
* -o - mask of output files
* -tt - number of different atom types. Default is 1024
* -l - log enable
* -q - quiet enable
* -h - show this help and exit
*
*
* @page Install
*
* @section Requirements Requirements
* The application mm_trj requires the following external stuff:
* - cmake >= 2.8
* - gcc >= 4.8
*
* @section How-To How to install
*
* @subsection Linux Linux
* @code
* mkdir build && cd build
* cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ../
* make
* make install
* @endcode
*
* @subsection Windows Windows
* @code
* create project file using 'cmake'
* compile project
* @endcode
* You may also download compiled executable file for Win_x86.
*
* @page Changelog
* V.1.0.2 (2013-07-27)
* * initial release
*/
#include
#include
#include
#include
#include "add_main.h"
#include "atom_types.h"
#include "messages.h"
#include "print_trj.h"
#include "read_gmx.h"
#include "read_puma.h"
/**
* @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