mirror of
https://github.com/arcan1s/moldyn.git
synced 2025-07-15 14:55:50 +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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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++)
|
||||
|
@ -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[])
|
||||
|
Reference in New Issue
Block a user