c6a45ba7e8ffd8debcc085c186c33d49613e84d9
[alexxy/gromacs.git] / include / rbin.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 #ifndef _rbin_h
31 #define _rbin_h
32
33 static char *SRCID_rbin_h = "$Id$";
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 #ifdef HAVE_IDENT
40 #ident  "@(#) rbin.h 1.8 2/2/97"
41 #endif /* HAVE_IDENT */
42 #include "sysstuff.h"
43 #include "typedefs.h"
44 #include "network.h"
45         
46 typedef struct {
47   int    nreal;
48   int    maxreal;
49   double *rbuf;
50 } t_bin;
51
52 extern t_bin *mk_bin(void);
53 /* Create a real bin */
54
55 extern void reset_bin(t_bin *b);
56 /* Reset number of entries to zero */
57
58 extern int add_binr(FILE *log,t_bin *b,int nr,real r[]);
59 extern int add_bind(FILE *log,t_bin *b,int nr,double r[]);
60 /* Add reals to the bin. Returns index */
61
62 extern void sum_bin(t_bin *b,t_commrec *cr);
63 /* Globally sum the reals in the bin */
64
65 extern void extract_binr(t_bin *b,int index,int nr,real r[]);
66 extern void extract_bind(t_bin *b,int index,int nr,double r[]);
67 /* Extract values from the bin, starting from index (see add_bin) */
68
69 #endif  /* _rbin_h */