/* envir * Version: 1.0 * License: GPL * Author: Evgeniy Alexeev aka arcanis * Email: esalexeev@gmail.com * * 'envir' is a program for search environment for chosen molecule by geometric * criterion * * Usage: * envir -i FILENAME -o FILEMANE [ -n NUM_OF_MOLECULE ] [ -r RADIUS ] [ -h ] * * Compile: * gcc envir.c -o envir -lm * Dependence: * * gcc * * libs: stdio.h, stdlib.h, string.h, math.h */ #include #include #include #include char atom_type[5000][30][2]; double centr_coord[5000][3], coord[5000][30][3], rad; int at_in_mol[5000], mol, needed_mol[50], num_of_mol; /* at_in_mol - number of atoms in molecules * atom_type - massive of atom names * centr_coord - coordinates of molecule mass center * coord - coordinates of atoms * mol - number of molecule in system * needed_mol - massive of mulecules found * num_of_mol - number of molecule for search * rad - geometric criterion */ void printing(char output_file[]) { int cur_mol=0, i, j=1; FILE *out; out = fopen (output_file, "w+"); while (needed_mol[cur_mol] != 10000) { for (i=0; i