Two patch fo extra functionality in python and fortran.
[gromacs/libxdrfile.git] / include / xdrfile_trr.h
blob7f36146fc3d5b1f06c82853e9e11abc0b5469299
1 /* -*- mode: c; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
3 * $Id$
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
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 #include "xdrfile.h"
23 /* All functions return exdrOK if succesfull.
24 * (error codes defined in xdrfile.h).
25 */
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);
40 #ifdef __cplusplus
42 #endif
44 #endif