Add TNG to trjconv doc and more details about TNG selections.
[alexxy/gromacs.git] / src / gromacs / tools / report_methods.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2018,2019,2020, 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 #ifndef GMX_TOOLS_REPORT_METHODS_H
36 #define GMX_TOOLS_REPORT_METHODS_H
37
38 #include <string>
39
40 #include "gromacs/commandline/cmdlineoptionsmodule.h"
41 #include "gromacs/utility/filestream.h"
42 #include "gromacs/utility/textwriter.h"
43
44 struct gmx_mtop_t;
45 struct t_inputrec;
46
47 namespace gmx
48 {
49
50 class ReportMethodsInfo
51 {
52 public:
53     static const char                       name[];
54     static const char                       shortDescription[];
55     static ICommandLineOptionsModulePointer create();
56 };
57
58 // Helper functions of the class
59
60 /*! \brief
61  * Write appropiate Header to output stream.
62  *
63  * \param[in] writer TextWriter object for writing information.
64  * \param[in] text String with the header before writing.
65  * \param[in] section String with section text for header.
66  * \param[in] writeFormattedText If we need to format the text for LaTeX output or not
67  */
68 void writeHeader(TextWriter* writer, const std::string& text, const std::string& section, bool writeFormattedText);
69
70 /*! \brief
71  * Write information about the molecules in the system.
72  *
73  * This method should write all possible information about
74  * the molecular composition of the system.
75  *
76  * \param[in] writer TextWriter object for writing information.
77  * \param[in] top Local topology used to derive the information to write out.
78  * \param[in] writeFormattedText Decide if we want formatted text output or not.
79  *
80  */
81 void writeSystemInformation(TextWriter* writer, const gmx_mtop_t& top, bool writeFormattedText);
82
83 /*! \brief
84  * Write information about system parameters.
85  *
86  * This method writes the basic information for the system parameters
87  * and simulation settings as reported in the \p ir.
88  *
89  * \param[in] writer TextWriter object for writing information.
90  * \param[in] ir Reference to inputrec of the run input.
91  * \param[in] writeFormattedText Decide if we want formatted text output or not.
92  */
93 void writeParameterInformation(TextWriter* writer, const t_inputrec& ir, bool writeFormattedText);
94
95 /*! \brief
96  * Wrapper for writing out information.
97  *
98  * This function is actual called from within the run method
99  * to write the information to the terminal or to file.
100  * New write out methods should be added to it instead of adding them in run.
101  *
102  * \param[in] outputStream The filestream used to write the information to.
103  * \param[in] ir Reference to inputrec of the run input.
104  * \param[in] top Local topology used to derive the information to write out.
105  * \param[in] writeFormattedText Decide if we want formatted text output or not.
106  * \param[in] notStdout Bool to see if we can close the file after writing or not in case of stdout.
107  */
108 void writeInformation(TextOutputFile*   outputStream,
109                       const t_inputrec& ir,
110                       const gmx_mtop_t& top,
111                       bool              writeFormattedText,
112                       bool              notStdout);
113
114 } // namespace gmx
115
116 #endif