mirror of
https://github.com/arcan1s/moldyn.git
synced 2025-07-15 06:45:50 +00:00
Edited documentation
This commit is contained in:
@ -119,6 +119,7 @@ int printing_head (const char *output, const int log, const int quiet,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn print_message
|
||||
*/
|
||||
@ -139,7 +140,7 @@ int print_message (const int quiet, FILE *std_output, const int log, FILE *f_log
|
||||
*
|
||||
* @return 0 - exit without errors
|
||||
*/
|
||||
{
|
||||
{
|
||||
if ((quiet != 1) && (std_output != stderr))
|
||||
message (0, mode, str, std_output);
|
||||
if (log == 1)
|
||||
|
@ -15,9 +15,8 @@ int reading_coords (const int mode, const char *filename, const int type_inter,
|
||||
/**
|
||||
* @brief function that reads coordinates from special file format
|
||||
* @code
|
||||
* reading_coords (0, filename, type_inter, label_atom, cell, &num_mol,
|
||||
* &num_atoms, true_label_mol, label_mol, type_atoms,
|
||||
* coords, ch_type_atoms);
|
||||
* reading_coords (0, filename, type_inter, label_atom, cell, &num_mol, &num_atoms,
|
||||
* true_label_mol, label_mol, type_atoms, coords, ch_type_atoms);
|
||||
* @endcode
|
||||
*
|
||||
* @param mode mode of reading; '1' is statgen, '2' is envir or
|
||||
|
@ -23,6 +23,7 @@ int check_cycle (const int N, const int *pn)
|
||||
*/
|
||||
{
|
||||
int cycle, i;
|
||||
|
||||
/* cycle number of cycle
|
||||
*/
|
||||
|
||||
@ -58,6 +59,7 @@ int check_cycle_size (const int N, const int *matrix, const int depth, int *n_cy
|
||||
*/
|
||||
{
|
||||
int cur_N, cycle, i, j, k, n, p, *vertex;
|
||||
|
||||
/* cur_N current number of elements in submatrix
|
||||
* cycle if (cycle == 1) that cycle exist
|
||||
* n number of samples
|
||||
@ -147,6 +149,7 @@ int graph_analyze (const int N, const int *matrix, const int max_depth, int *iso
|
||||
*/
|
||||
{
|
||||
int depth, i, j, *n_cycle, p, *pn;
|
||||
|
||||
/* depth depth of search for check_cycle_size
|
||||
* n_cycle number of cycle
|
||||
* p current weight
|
||||
|
@ -18,7 +18,16 @@
|
||||
#include "summary_stat.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 0 - exit without errors
|
||||
*/
|
||||
{
|
||||
char filename[256], tmp_str[2048];
|
||||
int error, i, index, j, k, label[2];
|
||||
@ -30,6 +39,7 @@ int main (int argc, char *argv[])
|
||||
int *agl, *connect, from, *label_atom, *label_mol, log, max_depth, num_atoms,
|
||||
num_mol, *num_mol_agl, num_of_inter, *stat, *stat_all, step, to,
|
||||
*true_label_mol, *type_agl, *type_atoms, type_inter, quiet;
|
||||
|
||||
/* input mask of trajectory files
|
||||
* logfile log file name
|
||||
* output output file name
|
||||
@ -232,7 +242,7 @@ int main (int argc, char *argv[])
|
||||
if (f_inp == NULL)
|
||||
{
|
||||
print_message (quiet, stderr, log, f_log, 18, filename);
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
fscanf (f_inp, "%i", &num_atoms);
|
||||
fclose (f_inp);
|
||||
@ -260,7 +270,7 @@ int main (int argc, char *argv[])
|
||||
(stat_all == NULL))
|
||||
{
|
||||
print_message (quiet, stderr, log, f_log, 19, argv[0]);
|
||||
return 17;
|
||||
return 3;
|
||||
}
|
||||
// set type_agl to zero
|
||||
for (i=0; i<max_depth+2; i++)
|
||||
@ -327,7 +337,7 @@ int main (int argc, char *argv[])
|
||||
(stat_all == NULL))
|
||||
{
|
||||
print_message (quiet, stderr, log, f_log, 19, argv[0]);
|
||||
return 18;
|
||||
return 3;
|
||||
}
|
||||
print_message (quiet, stdout, log, f_log, 9, argv[0]);
|
||||
|
||||
|
@ -17,9 +17,9 @@ int printing_agl (const char *input, const char *output, const int *connect,
|
||||
/**
|
||||
* @brief function that prints aglomerates to output file
|
||||
* @code
|
||||
* printing_agl (input_file, output_file, number_of_molecules,
|
||||
* true_label_molecules, num_of_molecules_in_aglomerates, aglomerates,
|
||||
* statistic, max_depth, type_of_aglomerate);
|
||||
* printing_agl (input_file, output_file, number_of_molecules, true_label_molecules,
|
||||
* num_of_molecules_in_aglomerates, aglomerates, statistic, max_depth,
|
||||
* type_of_aglomerate);
|
||||
* @endcode
|
||||
*
|
||||
* @param input input file name
|
||||
@ -39,6 +39,7 @@ int printing_agl (const char *input, const char *output, const int *connect,
|
||||
{
|
||||
int error, i, *iso, j, k, *label_matrix, *matrix;
|
||||
FILE *f_out;
|
||||
|
||||
/* iso isomorphic graph in database
|
||||
* label_matrix massive of indexes of molecule
|
||||
* matrix connectivity graph
|
||||
|
@ -15,8 +15,8 @@ int create_matrix (const int num_mol, const int num_atoms, const int *label_mol,
|
||||
/**
|
||||
* @brief function that creates connectivity matrix
|
||||
* @code
|
||||
* create_matrix (number_of_molecules, number_of_atoms, label_molecule,
|
||||
* type_atoms, coords, number_of_interactions, criteria, connect_matrix);
|
||||
* create_matrix (number_of_molecules, number_of_atoms, label_molecule, type_atoms,
|
||||
* coords, number_of_interactions, criteria, connect_matrix);
|
||||
* @endcode
|
||||
*
|
||||
* @param num_mol number of molecules
|
||||
@ -34,6 +34,7 @@ int create_matrix (const int num_mol, const int num_atoms, const int *label_mol,
|
||||
{
|
||||
float r;
|
||||
int cur_num_inter, i, j, k, l, num_inter, ***label_inter;
|
||||
|
||||
/* r radius
|
||||
* cur_num_inter current number of true interactions
|
||||
* num_inter needed number of true interactions
|
||||
|
@ -13,8 +13,8 @@ int proc_matrix (const int num_mol, const int *connect, int *num_mol_agl, int *a
|
||||
/**
|
||||
* @brief function that processes connectivity matrix
|
||||
* @code
|
||||
* proc_matrix (number_of_molecules, connect_matrix,
|
||||
* num_of_molecules_in_aglomerates, aglomerates, statistic, summary_statistic);
|
||||
* proc_matrix (number_of_molecules, connect_matrix, num_of_molecules_in_aglomerates,
|
||||
* aglomerates, statistic, summary_statistic);
|
||||
* @endcode
|
||||
*
|
||||
* @param num_mol number of molecules
|
||||
@ -29,6 +29,7 @@ int proc_matrix (const int num_mol, const int *connect, int *num_mol_agl, int *a
|
||||
*/
|
||||
{
|
||||
int i, j, k, p, *bin;
|
||||
|
||||
/* p weight / graph index
|
||||
* bin binary massive of labels
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@ int summary_statistic (const char *filename, const int step, const int num_mol,
|
||||
* @brief function that prints summary statistic
|
||||
* @code
|
||||
* summary_statistic (filename, number_of_step, number_of_molecules, max_depth,
|
||||
* type_of_aglomerate, summary_statistic);
|
||||
* type_of_aglomerate, summary_statistic);
|
||||
* @endcode
|
||||
*
|
||||
* @param filename output file name
|
||||
@ -30,6 +30,7 @@ int summary_statistic (const char *filename, const int step, const int num_mol,
|
||||
float conc, p, pn, type[2], x, y;
|
||||
int i, index;
|
||||
FILE *f_out;
|
||||
|
||||
/* conc concentrate of aglomerates
|
||||
* p probability of aglomerates
|
||||
* pn weight probability of aglomerates
|
||||
|
Reference in New Issue
Block a user