1f9f0b2427fa92c2b2162dce6ecdb16a0eadba20
[alexxy/gromacs.git] / include / types / simple.h
1 /*
2  * $Id$
3  * 
4  *       This source code is part of
5  * 
6  *        G   R   O   M   A   C   S
7  * 
8  * GROningen MAchine for Chemical Simulations
9  * 
10  *               VERSION 2.0
11  * 
12  * Copyright (c) 1991-1999
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * Please refer to:
17  * GROMACS: A message-passing parallel molecular dynamics implementation
18  * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19  * Comp. Phys. Comm. 91, 43-56 (1995)
20  * 
21  * Also check out our WWW page:
22  * http://md.chem.rug.nl/~gmx
23  * or e-mail to:
24  * gromacs@chem.rug.nl
25  * 
26  * And Hey:
27  * Green Red Orange Magenta Azure Cyan Skyblue
28  */
29 #ifndef _simple_h
30 #define _simple_h
31
32 #ifdef HAVE_CONFIG_H
33 #include <config.h>
34 #endif
35
36 #ifdef CPLUSPLUS
37 extern "C" {
38 #endif
39
40 #ifndef FALSE
41 #define FALSE   0
42 #endif
43 #ifndef TRUE
44 #define TRUE    1
45 #endif
46 #define BOOL_NR 2
47
48 #define XX      0                       /* Defines for indexing in      */
49 #define YY      1                       /* vectors                      */
50 #define ZZ      2
51 #define DIM     3                       /* Dimension of vectors         */
52 #define XXXX    0                       /* defines to index matrices */
53 #define XXYY    1
54 #define XXZZ    2
55 #define YYXX    3
56 #define YYYY    4
57 #define YYZZ    5
58 #define ZZXX    6
59 #define ZZYY    7
60 #define ZZZZ    8
61 /* Max number of nodes  */  
62 #define MAXNODES        256     
63 #ifndef HAVE_BOOL
64 #define bool int
65   /* typedef int                bool; */
66 #endif
67
68
69 typedef int             atom_id;        /* To indicate an atoms id         */
70 #define NO_ATID         (atom_id)(~0)   /* Use this to indicate invalid atid */
71
72 #ifdef DOUBLE
73 typedef double          real;
74 #define GMX_MPI_REAL    MPI_DOUBLE
75 #define GMX_REAL_EPS    2.2e-16
76 #else
77 typedef float           real;
78 #define GMX_MPI_REAL    MPI_FLOAT
79 #define GMX_REAL_EPS    1.2e-07
80 #endif
81
82 #ifndef VECTORIZATION_BUFLENGTH
83 #define VECTORIZATION_BUFLENGTH 1000
84   /* The total memory size of the vectorization buffers will
85    * be 5*sizeof(real)*VECTORIZATION_BUFLENGTH
86    */
87 #endif  
88 typedef real            rvec[DIM];
89
90 typedef real            matrix[DIM][DIM];
91
92 typedef real            tensor[DIM][DIM];
93
94 typedef int             ivec[DIM];
95
96 typedef int             imatrix[DIM][DIM];
97
98 #ifdef CPLUSPLUS
99 }
100 #endif
101
102 #endif
103