4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-2001
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
34 * Giving Russians Opium May Alter Current Situation
40 static char *SRCID_statusio_h = "$Id$";
46 #ident "@(#) statusio.h 1.46 2/2/97"
47 #endif /* HAVE_IDENT */
53 * This module handles status file io. All read and write operations from
54 * and to a status file should use this functions to be independent of the
55 * actual file layout (text versus binary file).
61 extern size_t wr_status(FILE *fp,int step,real t,real lambda,
62 t_inputrec *ir,rvec *box,rvec *vir,rvec *pres,
63 int natoms,rvec *x,rvec *v,rvec *f,
64 int nre,t_energy *e,t_topology *top);
66 * Writes a complete status to the file, specified by fp. NULL pointers
67 * indicate that this field should not be written. The function returns
68 * the number of bytes written.
71 extern char *rd_hstatus(FILE *fp,t_statheader *sh,int *step,real *t,
72 real *lambda,t_inputrec *ir,rvec *box,
73 rvec *vir,rvec *pres,int *natoms,
74 rvec *x,rvec *v,rvec *f,int *nre,t_energy *e,
77 * Reads a complete status from the file, specified by fp. It uses
78 * the status header to find the items in the file, also the file
79 * should be positioned right for reading the first item. The function
80 * returns the version string from the header.
83 extern char *rd_status(FILE *fp,int *step,real *t,real *lambda,
84 t_inputrec *ir,rvec *box,rvec *vir,rvec *pres,
86 rvec *v,rvec *f,int *nre,t_energy *e,
89 * Reads a complete status from the file, specified by fp. First it
90 * reads the header and then invokes rd_hstatus() to read the rest
91 * of the status. It returns the version returned from rd_hstatus().
94 extern void write_status(char *fn,int step,real t,real lambda,t_inputrec *ir,
95 rvec *box,rvec *vir,rvec *pres,
96 int natoms,rvec *x,rvec *v,rvec *f,
97 int nre,t_energy *e,t_topology *top);
99 * Writes a complete status to the file, specified by fn. NULL pointers
100 * indicate that this field should not be written.
103 extern char *read_status(char *fn,int *step,real *t,real *lambda,
104 t_inputrec *ir,rvec *box,rvec *vir,rvec *pres,
106 rvec *v,rvec *f,int *nre,t_energy *e,
109 * Reads a complete status from the file, specified by fn. It returns
110 * the version returned from rd_hstatus().
113 extern void read_status_header(char *fn,t_statheader *header);
115 * Reads a (status) header from the file, specified by fn. If
116 * available, it returns the version string from the file, else
117 * it returns a version string from the statusio module.
124 #endif /* _statusio_h */