diff --git a/stat_new/coords b/stat_new/coords index f11c815..82e3cb9 100755 Binary files a/stat_new/coords and b/stat_new/coords differ diff --git a/stat_new/coords.c b/stat_new/coords.c index 555d4bf..df4dbfd 100644 --- a/stat_new/coords.c +++ b/stat_new/coords.c @@ -1,8 +1,10 @@ -/* Usage: - * reading_coords(filename, label, coords) +/* Library for reading coordinates from input file + * + * Usage: + * reading_coords (filename, type_interaction, labels, cell, + * &number_of_molecules, &number_of_atoms, label_molecule, type_atoms, coords) */ -#include #include #include #include @@ -24,29 +26,42 @@ char conv (int fnumb, int dig_pos) } -int reading_coords (char *filename, int type_inter, int *label_atom, float *cell, int *label_mol, int *num_atoms, float *coords, int *type_atoms) +int reading_coords (char *filename, int type_inter, const int *label_atom, + const float *cell, int *num_mol, int *num_atoms, + int *label_mol, int *type_atoms, float *coords) /* filename - name of file with coordinates * type_inter - type interaction (number of molecules for interaction) * label_atom - types of atom for interaction - * cell - cell dimention - * label_mol - massive of numbers of molecule for atoms + * cell - cell dimension + * num_mol - number of molecules for writing coordinates * num_atoms - number of atoms for writing coordinates - * coords - massive of coordinates + * label_mol - massive of numbers of molecule for atoms * type_atoms - massive of atom types for atoms + * coords - massive of coordinates */ { char file_string[256]; int atoms, i, j, tr_num_atoms, ref_mol, x, y, z; float not_tr_coords[750000], ref[3]; FILE *inp; +/* file_string - temp string variable + * atoms - total number of atoms in system + * tr_num_atoms - number of translated atoms for writing coordinates (m.b. 8*num_atoms) + * ref_mol - number of molecule for reference + * not_tr_coords - not translated coordinates + * ref - coordinates of reference molecule + * inp - file with input data + */ *num_atoms = 0; + *num_mol = 0; // Reading file inp = fopen (filename, "r+"); if (inp == NULL) return 1; + ref_mol = -1; fscanf (inp, "%i", &atoms); for (i=0; i +#include +#include + + +float radii (const float *a, const float *b) +{ + return sqrt (pow((a[0]-b[0]), 2) + pow((a[1]-b[1]), 2) + pow((a[2]-b[2]), 2)); +} + + +int create_matrix (int num_mol, int num_atoms, const int *label_mol, + const int *type_atoms, const float *coords, int num_of_inter, + const float *crit, int *connect, int *num_bonds) +{ + float x[2][3]; + int cur_num_inter, i, j, k, l, num_inter, ***label_inter; + + label_inter = (int ***) malloc (num_mol * sizeof (int **)); + for (i=0; i +#include + + +int proc_matrix (int num_mol, const int *connect, const int *num_bond, int *num_mol_agl, int *agl, int *stat) +{ + int i, j, p, *bin; + +// definition and zeroing + bin = (int *) malloc (num_mol * sizeof (int)); + for (i=0; i 0) + { + + } + + free (bin); + + return 0; +} + + +int main (int argc, char *argv[]) +{ + return 0; +} \ No newline at end of file