44c9a0168a6b260f6d17a1a24f2f17228cc90de6
[alexxy/gromacs.git] / include / ebin.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  * Good ROcking Metal Altar for Chronical Sinners
28  */
29
30 #ifndef _ebin_h
31 #define _ebin_h
32
33 static char *SRCID_ebin_h = "$Id$";
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 #ifdef HAVE_IDENT
40 #ident  "@(#) ebin.h 1.10 5/2/97"
41 #endif /* HAVE_IDENT */
42 #include "sysstuff.h"
43 #include "typedefs.h"
44         
45 typedef struct {
46   int      nener;
47   char     **enm;
48   t_energy *e;
49 } t_ebin;
50
51 enum { eprNORMAL, eprAVER, eprRMS, eprNR };
52
53 extern t_ebin *mk_ebin(void);
54 /* Create an energy bin */
55
56 extern int get_ebin_space(t_ebin *eb,int nener,char *enm[]);
57 /* Create space in the energy bin and register names.
58  * The enm array must be static, because the contents are not copied,
59  * but only the pointers.
60  * Function returns an index number that must be used in subsequent
61  * calls to add_ebin.
62  */
63
64 extern void add_ebin(t_ebin *eb,int index,int nener,real ener[],int step);
65 /* Add nener reals (eg. energies, box-lengths, pressures) to the
66  * energy bin at position index. 
67  */
68  
69 extern void pr_ebin(FILE *fp,t_ebin *eb,int index,int nener,int nperline,
70                     int prmode,int tsteps,bool bPrHead);
71 /* Print the contents of the energy bin. If nener = -1 ALL energies from
72  * index to the end will be printed. We will print nperline entries on a text
73  * line (advisory <= 5). prmode may be any of the above listed enum values.
74  * tsteps is used only when eprAVER or eprRMS is set.
75  * If bPrHead than the header is printed.
76  */
77
78
79
80 #endif  /* _ebin_h */