4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
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)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Green Red Orange Magenta Azure Cyan Skyblue
33 static char *SRCID_statusio_h = "$Id$";
40 #ident "@(#) statusio.h 1.46 2/2/97"
41 #endif /* HAVE_IDENT */
47 * This module handles status file io. All read and write operations from
48 * and to a status file should use this functions to be independent of the
49 * actual file layout (text versus binary file).
55 extern size_t wr_status(FILE *fp,int step,real t,real lambda,
56 t_inputrec *ir,rvec *box,rvec *vir,rvec *pres,
57 int natoms,rvec *x,rvec *v,rvec *f,
58 int nre,t_energy *e,t_topology *top);
60 * Writes a complete status to the file, specified by fp. NULL pointers
61 * indicate that this field should not be written. The function returns
62 * the number of bytes written.
65 extern char *rd_hstatus(FILE *fp,t_statheader *sh,int *step,real *t,
66 real *lambda,t_inputrec *ir,rvec *box,
67 rvec *vir,rvec *pres,int *natoms,
68 rvec *x,rvec *v,rvec *f,int *nre,t_energy *e,
71 * Reads a complete status from the file, specified by fp. It uses
72 * the status header to find the items in the file, also the file
73 * should be positioned right for reading the first item. The function
74 * returns the version string from the header.
77 extern char *rd_status(FILE *fp,int *step,real *t,real *lambda,
78 t_inputrec *ir,rvec *box,rvec *vir,rvec *pres,
80 rvec *v,rvec *f,int *nre,t_energy *e,
83 * Reads a complete status from the file, specified by fp. First it
84 * reads the header and then invokes rd_hstatus() to read the rest
85 * of the status. It returns the version returned from rd_hstatus().
88 extern void write_status(char *fn,int step,real t,real lambda,t_inputrec *ir,
89 rvec *box,rvec *vir,rvec *pres,
90 int natoms,rvec *x,rvec *v,rvec *f,
91 int nre,t_energy *e,t_topology *top);
93 * Writes a complete status to the file, specified by fn. NULL pointers
94 * indicate that this field should not be written.
97 extern char *read_status(char *fn,int *step,real *t,real *lambda,
98 t_inputrec *ir,rvec *box,rvec *vir,rvec *pres,
100 rvec *v,rvec *f,int *nre,t_energy *e,
103 * Reads a complete status from the file, specified by fn. It returns
104 * the version returned from rd_hstatus().
107 extern void read_status_header(char *fn,t_statheader *header);
109 * Reads a (status) header from the file, specified by fn. If
110 * available, it returns the version string from the file, else
111 * it returns a version string from the statusio module.
118 #endif /* _statusio_h */