/* Library for printing aglomerates * * Usage: * printing_agl (input_file, output_file, number_of_molecules, * true_label_molecules, num_of_molecules_in_aglomerates, aglomerates, statistic) */ #include #include int printing_agl (char *input, char *output, const int *connect, int num_mol, const int *true_label_mol, const int *num_mol_agl, const int *agl, const int *stat) /* input - name of file with coordinates * output - name of output file * connect - connectivity graph for all molecules * num_mol - number of molecules * true_label_mol - massive of true numbers of molecule for atoms * num_mol_agl - massive of numbers of molecule in aglomerates * agl - massive of aglomerates * stat - massive of statistics */ { int i, iso, j, k, p, type, *label_matrix, **matrix; FILE *f_out; /* iso - isomorphic graph in database * type - number of cycle in aglomerates * label_matrix - massive of indexes of molecule * matrix - connectivity graph */ f_out = fopen (output, "a"); // head fprintf (f_out, "FILE=%s\nSTATISTIC:\n| n | N |\n-----------------", input); for (i=0; i 0) { // creating connectivity graph matrix = (int **) malloc (num_mol_agl[i] * sizeof (int *)); for (j=0; j