1 /* -*- mode: c; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
5 * Copyright (c) Erik Lindahl, David van der Spoel 2003,2004.
6 * Coordinate compression (c) by Frans van Hoesel.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
14 #ifndef _xdrfile_trr_h
15 #define _xdrfile_trr_h
23 /* All functions return exdrOK if succesfull.
24 * (error codes defined in xdrfile.h).
27 /* This function returns the number of atoms in the xtc file in *natoms */
28 extern int read_trr_natoms(char *fn
,int *natoms
);
30 /* Read one frame of an open xtc file. If either of x,v,f,box are
31 NULL the arrays will be read from the file but not used. */
32 extern int read_trr(XDRFILE
*xd
,int natoms
,int *step
,float *t
,float *lambda
,
33 matrix box
,rvec
*x
,rvec
*v
,rvec
*f
);
35 /* Write a frame to xtc file */
36 extern int write_trr(XDRFILE
*xd
,int natoms
,int step
,float t
,float lambda
,
37 matrix box
,rvec
*x
,rvec
*v
,rvec
*f
);