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_xtcio_h
= "$Id$";
42 /* All functions return 1 if succesfull, 0 otherwise
43 * bOK tells if a frame is not corrupted
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__)