mirror of
https://github.com/arcan1s/moldyn.git
synced 2025-07-27 12:39:59 +00:00
Added documentation for statgen
This commit is contained in:
@ -9,16 +9,16 @@ message (STATUS ${${PROJECT}_VERSION})
|
||||
# main files
|
||||
set (MAIN_SOURCES main)
|
||||
# not public srcs
|
||||
set (PRIVATE_CLASSES)
|
||||
set (PRIVATE_CLASSES add_main
|
||||
coords
|
||||
envir_search
|
||||
messages
|
||||
print_struct
|
||||
set_center)
|
||||
# headers only files
|
||||
SET (HEADERS_ONLY)
|
||||
# public srcs
|
||||
set (PUBLIC_CLASSES add_main
|
||||
coords
|
||||
envir_search
|
||||
messages
|
||||
print_struct
|
||||
set_center)
|
||||
set (PUBLIC_CLASSES)
|
||||
# public headers
|
||||
set (PUBLIC_HEADERS)
|
||||
# shared libraries
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// #include "messages.h"
|
||||
#include "messages.h"
|
||||
|
||||
|
||||
int error_checking (const float *cell, const char *input, const char *output)
|
||||
|
8
envir/src/add_main.h
Normal file
8
envir/src/add_main.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef ADD_MAIN_H
|
||||
#define ADD_MAIN_H
|
||||
|
||||
int error_checking (const float *, const char *, const char *);
|
||||
int print_message (const int, FILE *, const int, FILE *, const int, const char *);
|
||||
int set_defaults (float *, char *, int *, int *, char *, int *, float *);
|
||||
|
||||
#endif /* ADD_MAIN_H */
|
@ -15,8 +15,10 @@ int reading_coords (const int mode, const char *filename, const int type_inter,
|
||||
int *num_atoms, int *true_label_mol, int *label_mol,
|
||||
int *type_atoms, float *coords, char *ch_type_atoms)
|
||||
/* filename - name of file with coordinates
|
||||
* type_inter - type interaction (number of molecules for interaction)
|
||||
* label_atom - types of atom for interaction
|
||||
* type_inter - type interaction (number of molecules for interaction)
|
||||
* (number of molecules in aglomerate for agl)
|
||||
* label_atom - types of atom for interaction
|
||||
* (molecules in aglomerate for agl)
|
||||
* cell - cell dimension
|
||||
* num_mol - number of molecules for writing coordinates
|
||||
* num_atoms - number of atoms for writing coordinates
|
||||
@ -83,7 +85,7 @@ int reading_coords (const int mode, const char *filename, const int type_inter,
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// for envir
|
||||
// for envir and frad
|
||||
not_tr_coords[3**num_atoms+0] = cur_coords[0];
|
||||
not_tr_coords[3**num_atoms+1] = cur_coords[1];
|
||||
not_tr_coords[3**num_atoms+2] = cur_coords[2];
|
||||
@ -101,6 +103,29 @@ int reading_coords (const int mode, const char *filename, const int type_inter,
|
||||
|
||||
*num_atoms = *num_atoms + 1;
|
||||
break;
|
||||
case 2:
|
||||
// for agl
|
||||
for (j=0; j<type_inter; j++)
|
||||
if (cur_mol == label_atom[j])
|
||||
{
|
||||
not_tr_coords[3**num_atoms+0] = cur_coords[0];
|
||||
not_tr_coords[3**num_atoms+1] = cur_coords[1];
|
||||
not_tr_coords[3**num_atoms+2] = cur_coords[2];
|
||||
ch_type_atoms[2**num_atoms+0] = at_symb[0];
|
||||
ch_type_atoms[2**num_atoms+1] = at_symb[1];
|
||||
|
||||
if (ref_mol != cur_mol)
|
||||
{
|
||||
ref_mol = cur_mol;
|
||||
true_label_mol[*num_mol] = ref_mol;
|
||||
*num_mol = *num_mol + 1;
|
||||
}
|
||||
label_mol[*num_atoms] = *num_mol - 1;
|
||||
type_atoms[*num_atoms] = j;
|
||||
|
||||
*num_atoms = *num_atoms + 1;
|
||||
}
|
||||
break;
|
||||
default: return 1;
|
||||
}
|
||||
}
|
||||
|
8
envir/src/coords.h
Normal file
8
envir/src/coords.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef COORDS_H
|
||||
#define COORDS_H
|
||||
|
||||
int reading_coords (const int, const char *, const int, const int *,
|
||||
const float *, int *, int *, int *, int *, int *, float *,
|
||||
char *);
|
||||
|
||||
#endif /* COORDS_H */
|
@ -22,6 +22,7 @@ int search_envir (const int num_of_mol, const int num_mol, const float *centr_co
|
||||
int i;
|
||||
/* r - radius
|
||||
*/
|
||||
|
||||
*num_needed_mol = 0;
|
||||
|
||||
for (i=0; i<8*num_mol; i++)
|
||||
|
6
envir/src/envir_search.h
Normal file
6
envir/src/envir_search.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef ENVIR_SEARCH_H
|
||||
#define ENVIR_SEARCH_H
|
||||
|
||||
int search_envir (const int, const int, const float *, const double, int *, int *);
|
||||
|
||||
#endif /* ENVIR_SEARCH_H */
|
@ -3,12 +3,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// #include "add_main.h"
|
||||
// #include "coords.h"
|
||||
// #include "envir_search.h"
|
||||
// #include "messages.h"
|
||||
// #include "print_struct.h"
|
||||
// #include "set_center.h"
|
||||
#include "add_main.h"
|
||||
#include "coords.h"
|
||||
#include "envir_search.h"
|
||||
#include "messages.h"
|
||||
#include "print_struct.h"
|
||||
#include "set_center.h"
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
6
envir/src/messages.h
Normal file
6
envir/src/messages.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef MESSAGES_H
|
||||
#define MESSAGES_H
|
||||
|
||||
int message (const int, const int, const char *, FILE *);
|
||||
|
||||
#endif /* MESSAGES_H */
|
7
envir/src/print_struct.h
Normal file
7
envir/src/print_struct.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef PRINT_STRUCTURE_H
|
||||
#define PRINT_STRUCTURE_H
|
||||
|
||||
int print_structure (const char *, const int, const int *, const int, const int *,
|
||||
const char *, const float *);
|
||||
|
||||
#endif /* PRINT_STRUCTURE_H */
|
6
envir/src/set_center.h
Normal file
6
envir/src/set_center.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef SET_CENTER_H
|
||||
#define SET_CENTER_H
|
||||
|
||||
int set_center (const int, const int, const int *, const float *, float *);
|
||||
|
||||
#endif /* SET_CENTER_H */
|
Reference in New Issue
Block a user