2 * This file is part of the GROMACS molecular simulation package.
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.
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.
35 #ifndef GMX_TOOLS_REPORT_METHODS_H
36 #define GMX_TOOLS_REPORT_METHODS_H
40 #include "gromacs/commandline/cmdlineoptionsmodule.h"
41 #include "gromacs/utility/filestream.h"
42 #include "gromacs/utility/textwriter.h"
50 class ReportMethodsInfo
53 static const char name[];
54 static const char shortDescription[];
55 static ICommandLineOptionsModulePointer create();
58 // Helper functions of the class
61 * Write appropiate Header to output stream.
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
68 void writeHeader(TextWriter* writer, const std::string& text, const std::string& section, bool writeFormattedText);
71 * Write information about the molecules in the system.
73 * This method should write all possible information about
74 * the molecular composition of the system.
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.
81 void writeSystemInformation(TextWriter* writer, const gmx_mtop_t& top, bool writeFormattedText);
84 * Write information about system parameters.
86 * This method writes the basic information for the system parameters
87 * and simulation settings as reported in the \p ir.
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.
93 void writeParameterInformation(TextWriter* writer, const t_inputrec& ir, bool writeFormattedText);
96 * Wrapper for writing out information.
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.
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.
108 void writeInformation(TextOutputFile* outputStream,
109 const t_inputrec& ir,
110 const gmx_mtop_t& top,
111 bool writeFormattedText,