Remove hidden option to gmx dump
[alexxy/gromacs.git] / src / gromacs / fileio / tngio_for_tools.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2013, by the GROMACS development team, led by
5  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6  * and including many others, as listed in the AUTHORS file in the
7  * top-level source directory and at http://www.gromacs.org.
8  *
9  * GROMACS is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1
12  * of the License, or (at your option) any later version.
13  *
14  * GROMACS is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with GROMACS; if not, see
21  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23  *
24  * If you want to redistribute modifications to GROMACS, please
25  * consider that scientific software is very special. Version
26  * control is crucial - bugs must be traceable. We will be happy to
27  * consider code for inclusion in the official distribution, but
28  * derived work must not be called official GROMACS. Details are found
29  * in the README & COPYING files - if they are missing, get the
30  * official version at http://www.gromacs.org.
31  *
32  * To help us fund GROMACS development, we humbly ask that you cite
33  * the research papers on the package. Check out http://www.gromacs.org.
34  */
35
36 #ifndef GMX_FILEIO_TNGIO_FOR_TOOLS_H
37 #define GMX_FILEIO_TNGIO_FOR_TOOLS_H
38
39 #include "gromacs/legacyheaders/typedefs.h"
40 #include "../../external/tng_io/include/tng_io_fwd.h"
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 #if 0
46 }
47 #endif
48
49 /*! \brief Prepare to write TNG output from trajectory conversion tools */
50 void gmx_prepare_tng_writing(const char              *filename,
51                              char                     mode,
52                              tng_trajectory_t        *in,
53                              tng_trajectory_t        *out,
54                              int                      nAtoms,
55                              const gmx_mtop_t        *mtop,
56                              const atom_id           *index,
57                              const char              *indexGroupName);
58
59 /*! \brief Write a trxframe to a TNG file
60  *
61  * \param natoms Number of atoms to actually write
62  *
63  * The natoms field in frame is the number of atoms in the system. The
64  * parameter natoms supports writing an index-group subset of the
65  * atoms.
66  */
67 void gmx_write_tng_from_trxframe(tng_trajectory_t        output,
68                                  t_trxframe             *frame,
69                                  int                     natoms);
70
71 /*! \brief Creates a molecule containing only the indexed atoms and sets
72  * the number of all other molecules to 0. Works similar to a
73  * selection group. */
74 void gmx_tng_setup_atom_subgroup(tng_trajectory_t tng,
75                                  const int        nind,
76                                  const atom_id   *ind,
77                                  const char      *name);
78
79 /*! \brief Read the first/next TNG frame. */
80 gmx_bool gmx_read_next_tng_frame(tng_trajectory_t            input,
81                                  t_trxframe                 *fr,
82                                  gmx_int64_t                *requestedIds,
83                                  int                         numRequestedIds);
84
85 /*! \brief Print the molecule system to stream */
86 void gmx_print_tng_molecule_system(tng_trajectory_t input,
87                                    FILE            *stream);
88
89 /*! \brief Get a list of block IDs present in the next frame with data. */
90 gmx_bool gmx_get_tng_data_block_types_of_next_frame(tng_trajectory_t     input,
91                                                     int                  frame,
92                                                     int                  nRequestedIds,
93                                                     gmx_int64_t         *requestedIds,
94                                                     gmx_int64_t         *nextFrame,
95                                                     gmx_int64_t         *nBlocks,
96                                                     gmx_int64_t        **blockIds);
97
98 /*! \brief Get data of the next frame with data from the data block
99  * with the specified block ID. */
100 gmx_bool gmx_get_tng_data_next_frame_of_block_type(tng_trajectory_t     input,
101                                                    gmx_int64_t          blockId,
102                                                    real               **values,
103                                                    gmx_int64_t         *frameNumber,
104                                                    double              *frameTime,
105                                                    gmx_int64_t         *nValuesPerFrame,
106                                                    gmx_int64_t         *nAtoms,
107                                                    real                *prec,
108                                                    char                *name,
109                                                    int                  maxLen,
110                                                    gmx_bool            *bOK);
111
112 /*! \brief Implements TNG file reading for gmxdump. */
113 void list_tng_for_gmx_dump(const char *fn);
114
115 #ifdef __cplusplus
116 }
117 #endif
118
119 #endif