2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2013,2014, 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.
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.
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.
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.
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.
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.
36 #ifndef GMX_FILEIO_TNGIO_FOR_TOOLS_H
37 #define GMX_FILEIO_TNGIO_FOR_TOOLS_H
39 #include "gromacs/legacyheaders/typedefs.h"
40 #include "tng/tng_io_fwd.h"
49 /*! \brief Prepare to write TNG output from trajectory conversion tools */
50 void gmx_prepare_tng_writing(const char *filename,
53 tng_trajectory_t *out,
55 const gmx_mtop_t *mtop,
57 const char *indexGroupName);
59 /*! \brief Write a trxframe to a TNG file
61 * \param output Trajectory to write to
62 * \param frame Frame data to write
63 * \param natoms Number of atoms to actually write
65 * The natoms field in frame is the number of atoms in the system. The
66 * parameter natoms supports writing an index-group subset of the
69 void gmx_write_tng_from_trxframe(tng_trajectory_t output,
73 /*! \brief Creates a molecule containing only the indexed atoms and sets
74 * the number of all other molecules to 0. Works similar to a
76 void gmx_tng_setup_atom_subgroup(tng_trajectory_t tng,
81 /*! \brief Read the first/next TNG frame. */
82 gmx_bool gmx_read_next_tng_frame(tng_trajectory_t input,
84 gmx_int64_t *requestedIds,
87 /*! \brief Print the molecule system to stream */
88 void gmx_print_tng_molecule_system(tng_trajectory_t input,
91 /*! \brief Get a list of block IDs present in the next frame with data. */
92 gmx_bool gmx_get_tng_data_block_types_of_next_frame(tng_trajectory_t input,
95 gmx_int64_t *requestedIds,
96 gmx_int64_t *nextFrame,
98 gmx_int64_t **blockIds);
100 /*! \brief Get data of the next frame with data from the data block
101 * with the specified block ID. */
102 gmx_bool gmx_get_tng_data_next_frame_of_block_type(tng_trajectory_t input,
105 gmx_int64_t *frameNumber,
107 gmx_int64_t *nValuesPerFrame,