2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team,
6 * check out http://www.gromacs.org for more information.
7 * Copyright (c) 2012, by the GROMACS development team, led by
8 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9 * others, as listed in the AUTHORS file in the top-level source
10 * directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
42 #include "visibility.h"
45 /* For reading coordinate files it is assumed that enough memory
46 * has been allocated beforehand.
52 int read_g96_conf(FILE *fp,const char *infile,t_trxframe *fr, char *line);
53 /* read a Gromos96 coordinate or trajectory file, *
54 * returns the number of atoms *
55 * sets what's in the frame in info *
56 * read from fp, infile is only needed for error messages *
57 * nwanted is the number of wanted coordinates, *
58 * set this to -1 if you want to know the number of atoms in the file *
59 * title, atoms, x, v can all be NULL, in which case they won't be read *
60 * line holds the previous line for trajectory reading */
63 void write_g96_conf(FILE *out,t_trxframe *fr,int nindex,atom_id *index);
64 /* write a Gromos96 coordinate file or trajectory frame *
65 * index can be NULL */
67 gmx_bool gro_next_x_or_v(FILE *status,t_trxframe *fr);
68 int gro_first_x_or_v(FILE *status,t_trxframe *fr);
69 /* read first/next x and/or v frame from gro file */
71 void write_hconf_indexed_p(FILE *out,const char *title,t_atoms *atoms,
72 int nx,atom_id index[],int ndec,
73 rvec *x,rvec *v,matrix box);
76 void write_hconf_p(FILE *out,const char *title,t_atoms *atoms, int ndec,
77 rvec *x,rvec *v,matrix box);
78 /* Write a Gromos file with precision ndec: number of decimal places in x,
79 * v has one place more. */
82 void write_sto_conf_indexed(const char *outfile,const char *title,
84 rvec x[],rvec *v,int ePBC,matrix box,
85 atom_id nindex,atom_id index[]);
86 /* like write_sto_conf, but indexed */
89 void write_sto_conf(const char *outfile,const char *title,
91 rvec x[],rvec *v,int ePBC,matrix box);
92 /* write atoms, x, v (if .gro and not NULL) and box (if not NULL)
93 * to an STO (.gro or .pdb) file */
96 void write_sto_conf_mtop(const char *outfile,const char *title,
98 rvec x[],rvec *v,int ePBC,matrix box);
99 /* As write_sto_conf, but uses a gmx_mtop_t struct */
102 void get_stx_coordnum (const char *infile,int *natoms);
103 /* read the number of atoms from an STX file */
106 void read_stx_conf(const char *infile,char *title,
108 rvec x[],rvec *v,int *ePBC,matrix box);
109 /* Read atoms, x, v and box from an STX file.
110 * If ePBC!=NULL return the type of pbc in *ePBC or -1 if unknown.
117 #endif /* _confio_h */