1 /* -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
2  * vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
3  *
4  * MDAnalysis --- http://www.MDAnalysis.org
5  * Copyright (c) 2006-2015 Naveen Michaud-Agrawal, Elizabeth J. Denning, Oliver
6  * Beckstein and contributors (see AUTHORS for the full list)
7  *
8  * Released under the GNU Public Licence, v2 or any higher version
9  *
10  * Please cite your use of MDAnalysis in published work:
11  *
12  * N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein.
13  * MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations.
14  * J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787
15  */
16 
17 #ifndef _xtc_seek_h
18 #define _xtc_seek_h
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include "xdrfile.h"
25 
26 /* Seek through trajectory counting and indexing frames */
27 extern int read_xtc_n_frames(char *fn, int *n_frames, int *est_nframes,
28                              int64_t **offsets);
29 
30 /* XTC header fields until coord floats: *** only for trajectories of less than
31  * 10 atoms! ***  */
32 /* magic natoms step time DIM*DIM_box_vecs natoms */
33 #define XTC_SHORTHEADER_SIZE (20 + DIM * DIM * 4)
34 /* Short XTCs store each coordinate as a 32-bit float. */
35 #define XTC_SHORT_BYTESPERATOM 12
36 /* XTC header fields until frame bytes: *** only for trajectories of more than 9
37  * atoms! ***  */
38 /* magic natoms step time DIM*DIM_box_vecs natoms prec DIM_min_xyz DIM_max_xyz
39  * smallidx */
40 #define XTC_HEADER_SIZE (DIM * DIM * 4 + DIM * 2 + 46)
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif
47