changed reading hint
[gromacs/adressmacs.git] / include / xtcio.h
blob1c9e36c290e30fd90cc3f7d4ceaf99afe1cf046a
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
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
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)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Green Red Orange Magenta Azure Cyan Skyblue
30 #ifndef _xtcio_h
31 #define _xtcio_h
33 static char *SRCID_xtcio_h = "$Id$";
35 #ifdef CPLUSPLUS
36 extern "C" {
37 #endif
39 #include "typedefs.h"
40 #include "xdrf.h"
42 /* All functions return 1 if succesfull, 0 otherwise
43 * bOK tells if a frame is not corrupted
44 */
46 extern int open_xtc(char *filename,char *mode);
47 /* Open a file for xdr I/O */
49 extern void close_xtc(int fp);
50 /* Close the file for xdr I/O */
52 extern int read_first_xtc(int fp,
53 int *natoms,int *step,real *time,
54 matrix box,rvec **x,real *prec,bool *bOK);
55 /* Open xtc file, read xtc file first time, allocate memory for x */
57 extern int read_next_xtc(int fp,
58 int *natoms,int *step,real *time,
59 matrix box,rvec *x,real *prec,bool *bOK);
60 /* Read subsequent frames */
62 extern int write_xtc(int fp,
63 int natoms,int step,real time,
64 matrix box,rvec *x,real prec);
65 /* Write a frame to xtc file */
67 extern int xtc_check(char *str,bool bResult,char *file,int line);
68 #define XTC_CHECK(s,b) xtc_check(s,b,__FILE__,__LINE__)
70 extern void xtc_check_fat_err(char *str,bool bResult,char *file,int line);
71 #define XTC_CHECK_FAT_ERR(s,b) xtc_check_fat_err(s,b,__FILE__,__LINE__)
73 #ifdef CPLUSPLUS
75 #endif
77 #endif