ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/rings.c
(Generate patch)
# Line 3 | Line 3
3   #include "pcwin.h"
4   #include "pcmod.h"
5   #include "rings.h"
6 + #include "utility.h"
7  
8   int have_ring3(void);
9   int have_ring4(void);
# Line 32 | Line 33
33   int aromatic_5(int *array,long int *flags,int *atomnum,int **,int **);
34   int aromatic_6(int *,long int *flags,int *atomnum,int **,int **);
35   void get_rings(int natom,int **iat,long int *flags);
36 + void allocate_rings(int niatom);
37 +
38 + // ===========================
39 + void allocate_rings(int niatom)
40 + {
41 +  rings.nring3 = 0;
42 +  rings.nring4 = 0;
43 +  rings.nring5 = 0;
44 +  rings.nring6 = 0;
45 +  rings.r13 = imatrix(0,(niatom+10)/3, 0,3);
46 +  rings.r14 = imatrix(0,(niatom+10)/4, 0,4);
47 +  rings.r15 = imatrix(0,(niatom+10)/5, 0,5);
48 +  rings.r16 = imatrix(0,(niatom+10)/2, 0,6);
49 + }
50   // ======================
51   int have_ring3()
52   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines