4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
11 * Copyright (c) 1991-2001, University of Groningen, The Netherlands
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * If you want to redistribute modifications, please consider that
18 * scientific software is very special. Version control is crucial -
19 * bugs must be traceable. We will be happy to consider code for
20 * inclusion in the official distribution, but derived work must not
21 * be called official GROMACS. Details are found in the README & COPYING
22 * files - if they are missing, get the official version at www.gromacs.org.
24 * To help us fund GROMACS development, we humbly ask that you cite
25 * the papers on the package - you can find them in the top README file.
27 * For more info, check our website at http://www.gromacs.org
30 * Getting the Right Output Means no Artefacts in Calculating Stuff
36 static char *SRCID_statusio_h
= "$Id$";
42 #ident "@(#) statusio.h 1.46 2/2/97"
43 #endif /* HAVE_IDENT */
49 * This module handles status file io. All read and write operations from
50 * and to a status file should use this functions to be independent of the
51 * actual file layout (text versus binary file).
57 extern size_t wr_status(FILE *fp
,int step
,real t
,real lambda
,
58 t_inputrec
*ir
,rvec
*box
,rvec
*vir
,rvec
*pres
,
59 int natoms
,rvec
*x
,rvec
*v
,rvec
*f
,
60 int nre
,t_energy
*e
,t_topology
*top
);
62 * Writes a complete status to the file, specified by fp. NULL pointers
63 * indicate that this field should not be written. The function returns
64 * the number of bytes written.
67 extern char *rd_hstatus(FILE *fp
,t_statheader
*sh
,int *step
,real
*t
,
68 real
*lambda
,t_inputrec
*ir
,rvec
*box
,
69 rvec
*vir
,rvec
*pres
,int *natoms
,
70 rvec
*x
,rvec
*v
,rvec
*f
,int *nre
,t_energy
*e
,
73 * Reads a complete status from the file, specified by fp. It uses
74 * the status header to find the items in the file, also the file
75 * should be positioned right for reading the first item. The function
76 * returns the version string from the header.
79 extern char *rd_status(FILE *fp
,int *step
,real
*t
,real
*lambda
,
80 t_inputrec
*ir
,rvec
*box
,rvec
*vir
,rvec
*pres
,
82 rvec
*v
,rvec
*f
,int *nre
,t_energy
*e
,
85 * Reads a complete status from the file, specified by fp. First it
86 * reads the header and then invokes rd_hstatus() to read the rest
87 * of the status. It returns the version returned from rd_hstatus().
90 extern void write_status(char *fn
,int step
,real t
,real lambda
,t_inputrec
*ir
,
91 rvec
*box
,rvec
*vir
,rvec
*pres
,
92 int natoms
,rvec
*x
,rvec
*v
,rvec
*f
,
93 int nre
,t_energy
*e
,t_topology
*top
);
95 * Writes a complete status to the file, specified by fn. NULL pointers
96 * indicate that this field should not be written.
99 extern char *read_status(char *fn
,int *step
,real
*t
,real
*lambda
,
100 t_inputrec
*ir
,rvec
*box
,rvec
*vir
,rvec
*pres
,
102 rvec
*v
,rvec
*f
,int *nre
,t_energy
*e
,
105 * Reads a complete status from the file, specified by fn. It returns
106 * the version returned from rd_hstatus().
109 extern void read_status_header(char *fn
,t_statheader
*header
);
111 * Reads a (status) header from the file, specified by fn. If
112 * available, it returns the version string from the file, else
113 * it returns a version string from the statusio module.
120 #endif /* _statusio_h */