dd7a77d3ea4657f0330b0b495e54af3f8e950092
[alexxy/gromacs.git] / include / types / graph.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
30 #ifdef HAVE_CONFIG_H
31 #include <config.h>
32 #endif
33
34 #include "fatal.h"
35
36 typedef struct {
37   int      maxbond;     /* Max number of bonds per atom                 */
38   int      nnodes;      /* The number of nodes                          */
39   int      nbound;      /* The number of nodes with edges               */
40   int      start;       /* The first atom in this graph                 */
41   int      end;         /* The last atom in this graph                  */
42   int      *nedge;      /* For each node the number of edges            */
43   atom_id  **edge;      /* For each node, the actual edges (bidirect.)  */
44   ivec     *ishift;     /* Shift for each particle                      */
45 } t_graph;
46
47
48
49 #define SHIFT_IVEC(g,i) ((g)->ishift[(i)-(g)->start])
50