Fixed the config.h inclusion
[gromacs.git] / include / confio.h
blob2a36d57b1528603dcee6a55cc9b87ee025925122
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 3.2.0
11 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
12 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
13 * Copyright (c) 2001-2004, The GROMACS development team,
14 * check out http://www.gromacs.org for more information.
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * For more info, check our website at http://www.gromacs.org
33 * And Hey:
34 * Gromacs Runs On Most of All Computer Systems
37 #ifndef _confio_h
38 #define _confio_h
40 #ifdef HAVE_CONFIG_H
41 #include <config.h>
42 #endif
44 #include "typedefs.h"
46 /* For reading coordinate files it is assumed that enough memory
47 * has been allocated beforehand.
49 #ifdef CPLUSPLUS
50 extern "C" {
51 #endif
53 extern void init_t_atoms(t_atoms *atoms, int natoms, bool bPdbinfo);
54 /* allocate memory for the arrays, set nr to natoms and nres to 0
55 * set pdbinfo to NULL or allocate memory for it */
57 extern void free_t_atoms(t_atoms *atoms);
58 /* free all the arrays and set the nr and nres to 0 */
60 int read_g96_conf(FILE *fp,char *infile,t_trxframe *fr);
61 /* read a Gromos96 coordinate or trajectory file, *
62 * returns the number of atoms *
63 * sets what's in the frame in info *
64 * read from fp, infile is only needed for error messages *
65 * nwanted is the number of wanted coordinates, *
66 * set this to -1 if you want to know the number of atoms in the file *
67 * title, atoms, x, v can all be NULL, in which case they won't be read */
69 void write_g96_conf(FILE *out,t_trxframe *fr,int nindex,atom_id *index);
70 /* write a Gromos96 coordinate file or trajectory frame *
71 * index can be NULL */
73 extern bool gro_next_x_or_v(FILE *status,t_trxframe *fr);
74 extern int gro_first_x_or_v(FILE *status,t_trxframe *fr);
75 /* read first/next x and/or v frame from gro file */
77 extern void write_hconf_indexed_p(FILE *out,char *title,t_atoms *atoms,
78 int nx,atom_id index[],int ndec,
79 rvec *x,rvec *v,matrix box);
81 extern void write_hconf_p(FILE *out,char *title,t_atoms *atoms, int ndec,
82 rvec *x,rvec *v,matrix box);
83 /* Write a Gromos file with precision ndec: number of decimal places in x,
84 * v has one place more. */
86 void write_sto_conf_indexed(char *outfile,char *title,t_atoms *atoms,
87 rvec x[],rvec *v,matrix box,
88 atom_id nindex,atom_id index[]);
89 /* like write_sto_conf, but indexed */
91 extern void write_sto_conf(char *outfile, char *title,t_atoms *atoms,
92 rvec x[],rvec *v, matrix box);
93 /* write atoms, x, v (if .gro and not NULL) and box (if not NULL)
94 * to an STO (.gro or .pdb) file */
96 extern void get_stx_coordnum (char *infile,int *natoms);
97 /* read the number of atoms from an STX file */
99 extern void read_stx_conf(char *infile, char *title,t_atoms *atoms,
100 rvec x[],rvec *v, matrix box);
101 /* read atoms, x, v and box from an STX file */
103 #ifdef CPLUSPLUS
105 #endif
107 #endif /* _confio_h */