202cfd26d84881319e5d12a106e1820618f21117
[alexxy/gromacs.git] / include / rwtop.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 _rwtop_h
31 #define _rwtop_h
32
33 static char *SRCID_rwtop_h = "$Id$";
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 #ifdef HAVE_IDENT
40 #ident  "@(#) rwtop.h 1.5 12/16/92"
41 #endif /* HAVE_IDENT */
42
43 #include <stdio.h>
44 #include "typedefs.h"
45
46 /*
47  * This module handles topolgy manipulation, including (binary) writing
48  * to and reading from a file, freeing the allocated space and textual 
49  * representation of the complete topology structure.
50  */
51
52 extern long wr_top(FILE *fp,t_topology *top);
53 /*
54  * Writes the topology to the file, specified by fp. The function 
55  * returns the number of bytes written. The topology is not modified!
56  */
57
58 extern long rd_top(FILE *fp,t_topology *top);
59 /*
60  * Reads the topology from the file, specified by fp. This will 
61  * include allocating the needed space. The function returns the 
62  * number of bytes read.
63  */
64
65 extern void rm_top(t_topology *top);
66 /*
67  * Frees the space allocated by the topology. This is only
68  * guaranteed to work when the same allocation strategy is used as
69  * in rd_top().
70  */
71
72 extern void pr_energies(FILE *fp,int indent,char *title,t_energy *e,int n);
73 /*
74  * This routine prints out a (human) readable representation of
75  * an array of energy structs to the file fp. Ident specifies the
76  * number of spaces the text should be indented. Title is used to
77  * print a header text.
78  */
79
80 extern void pr_inputrec(FILE *fp,int indent,char *title,t_inputrec *ir);
81 /*
82  * This routine prints out a (human) readable representation of
83  * an input record to the file fp. Ident specifies the number of spaces
84  * the text should be indented. Title is used to print a header text.
85  */
86  
87 #endif  /* _rwtop_h */