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$";
36 #ident "@(#) statusio.h 1.46 2/2/97"
37 #endif /* HAVE_IDENT */
43 * This module handles status file io. All read and write operations from
44 * and to a status file should use this functions to be independent of the
45 * actual file layout (text versus binary file).
51 extern size_t wr_status(FILE *fp
,int step
,real t
,real lambda
,
52 t_inputrec
*ir
,rvec
*box
,rvec
*vir
,rvec
*pres
,
53 int natoms
,rvec
*x
,rvec
*v
,rvec
*f
,
54 int nre
,t_energy
*e
,t_topology
*top
);
56 * Writes a complete status to the file, specified by fp. NULL pointers
57 * indicate that this field should not be written. The function returns
58 * the number of bytes written.
61 extern char *rd_hstatus(FILE *fp
,t_statheader
*sh
,int *step
,real
*t
,
62 real
*lambda
,t_inputrec
*ir
,rvec
*box
,
63 rvec
*vir
,rvec
*pres
,int *natoms
,
64 rvec
*x
,rvec
*v
,rvec
*f
,int *nre
,t_energy
*e
,
67 * Reads a complete status from the file, specified by fp. It uses
68 * the status header to find the items in the file, also the file
69 * should be positioned right for reading the first item. The function
70 * returns the version string from the header.
73 extern char *rd_status(FILE *fp
,int *step
,real
*t
,real
*lambda
,
74 t_inputrec
*ir
,rvec
*box
,rvec
*vir
,rvec
*pres
,
76 rvec
*v
,rvec
*f
,int *nre
,t_energy
*e
,
79 * Reads a complete status from the file, specified by fp. First it
80 * reads the header and then invokes rd_hstatus() to read the rest
81 * of the status. It returns the version returned from rd_hstatus().
84 extern void write_status(char *fn
,int step
,real t
,real lambda
,t_inputrec
*ir
,
85 rvec
*box
,rvec
*vir
,rvec
*pres
,
86 int natoms
,rvec
*x
,rvec
*v
,rvec
*f
,
87 int nre
,t_energy
*e
,t_topology
*top
);
89 * Writes a complete status to the file, specified by fn. NULL pointers
90 * indicate that this field should not be written.
93 extern char *read_status(char *fn
,int *step
,real
*t
,real
*lambda
,
94 t_inputrec
*ir
,rvec
*box
,rvec
*vir
,rvec
*pres
,
96 rvec
*v
,rvec
*f
,int *nre
,t_energy
*e
,
99 * Reads a complete status from the file, specified by fn. It returns
100 * the version returned from rd_hstatus().
103 extern void read_status_header(char *fn
,t_statheader
*header
);
105 * Reads a (status) header from the file, specified by fn. If
106 * available, it returns the version string from the file, else
107 * it returns a version string from the statusio module.
114 #endif /* _statusio_h */