Tagged files with gromacs 3.0 header and added some license info
[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 3.0
11  * 
12  * Copyright (c) 1991-2001
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  * 
21  * If you want to redistribute modifications, please consider that
22  * scientific software is very special. Version control is crucial -
23  * bugs must be traceable. We will be happy to consider code for
24  * inclusion in the official distribution, but derived work must not
25  * be called official GROMACS. Details are found in the README & COPYING
26  * files - if they are missing, get the official version at www.gromacs.org.
27  * 
28  * To help us fund GROMACS development, we humbly ask that you cite
29  * the papers on the package - you can find them in the top README file.
30  * 
31  * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
32  * 
33  * And Hey:
34  * Good ROcking Metal Altar for Chronical Sinners
35  */
36
37 #ifndef _simple_h
38 #define _simple_h
39
40 #ifdef HAVE_CONFIG_H
41 #include <config.h>
42 #endif
43
44 #ifdef CPLUSPLUS
45 extern "C" {
46 #endif
47
48 #ifndef FALSE
49 #define FALSE   0
50 #endif
51 #ifndef TRUE
52 #define TRUE    1
53 #endif
54 #define BOOL_NR 2
55
56 #define XX      0                       /* Defines for indexing in      */
57 #define YY      1                       /* vectors                      */
58 #define ZZ      2
59 #define DIM     3                       /* Dimension of vectors         */
60 #define XXXX    0                       /* defines to index matrices */
61 #define XXYY    1
62 #define XXZZ    2
63 #define YYXX    3
64 #define YYYY    4
65 #define YYZZ    5
66 #define ZZXX    6
67 #define ZZYY    7
68 #define ZZZZ    8
69 /* Max number of nodes  */  
70 #define MAXNODES        256     
71 #ifndef HAVE_BOOL
72 #define bool int
73   /* typedef int                bool; */
74 #endif
75
76
77 typedef int             atom_id;        /* To indicate an atoms id         */
78 #define NO_ATID         (atom_id)(~0)   /* Use this to indicate invalid atid */
79
80 #ifdef DOUBLE
81 typedef double          real;
82 #define GMX_MPI_REAL    MPI_DOUBLE
83 #define GMX_REAL_EPS    2.2e-16
84 #else
85 typedef float           real;
86 #define GMX_MPI_REAL    MPI_FLOAT
87 #define GMX_REAL_EPS    1.2e-07
88 #endif
89
90 #ifndef VECTORIZATION_BUFLENGTH
91 #define VECTORIZATION_BUFLENGTH 1000
92   /* The total memory size of the vectorization buffers will
93    * be 5*sizeof(real)*VECTORIZATION_BUFLENGTH
94    */
95 #endif  
96 typedef real            rvec[DIM];
97
98 typedef real            matrix[DIM][DIM];
99
100 typedef real            tensor[DIM][DIM];
101
102 typedef int             ivec[DIM];
103
104 typedef int             imatrix[DIM][DIM];
105
106 #ifdef CPLUSPLUS
107 }
108 #endif
109
110 #endif
111