2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2015,2016,2017, 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 /*! \brief Declares the integrator type for mdrun
37 * \author David van der Spoel <david.vanderspoel@icm.uu.se>
38 * \ingroup module_mdlib
40 #ifndef GMX_MDLIB_INTEGRATOR_H
41 #define GMX_MDLIB_INTEGRATOR_H
45 #include "gromacs/gmxlib/nrnb.h"
46 #include "gromacs/mdlib/constr.h"
47 #include "gromacs/mdlib/vsite.h"
48 #include "gromacs/mdtypes/fcdata.h"
49 #include "gromacs/mdtypes/forcerec.h"
50 #include "gromacs/mdtypes/mdatom.h"
51 #include "gromacs/timing/wallcycle.h"
52 #include "gromacs/timing/walltime_accounting.h"
53 #include "gromacs/utility/basedefinitions.h"
54 #include "gromacs/utility/real.h"
56 class energyhistory_t
;
59 struct gmx_output_env_t
;
60 struct ObservablesHistory
;
69 class IMDOutputProvider
;
72 /*! \brief Integrator algorithm implementation.
74 * \param[in] fplog Log file for output
75 * \param[in] cr Communication record
76 * \param[in] mdlog Log writer for important output
77 * \param[in] nfile Number of files
78 * \param[in] fnm Filename structure array
79 * \param[in] oenv Output information
80 * \param[in] bVerbose Verbose output or not
81 * \param[in] nstglobalcomm How often global communication is done
82 * \param[in] vsite Virtual site information
83 * \param[in] constr Constraint information
84 * \param[in] stepout How often we writen to the console
85 * \param[in] outputProvider Additional output provider
86 * \param[in] inputrec Input record with mdp options
87 * \param[in] top_global Molecular topology for the whole system
88 * \param[in] fcd Force and constraint data
89 * \param[in] state_global The state (x, v, f, box etc.) of the whole system
90 * \param[in] observablesHistory The observables statistics history
91 * \param[in] mdatoms Structure containing atom information
92 * \param[in] nrnb Accounting for floating point operations
93 * \param[in] wcycle Wall cycle timing information
94 * \param[in] ed Essential dynamics sampling information
95 * \param[in] fr Force record with cut-off information and more
96 * \param[in] repl_ex_nst How often we do replica exchange (in steps)
97 * \param[in] repl_ex_nex How many replicas we have
98 * \param[in] repl_ex_seed The seed for Monte Carlo swaps
99 * \param[in] membed Membrane embedding data structure
100 * \param[in] cpt_period How often to checkpoint the simulation
101 * \param[in] max_hours Maximume length of the simulation (wall time)
102 * \param[in] imdport Interactive MD port (socket)
103 * \param[in] Flags Flags to control mdrun
104 * \param[in] walltime_accounting More timing information
106 typedef double integrator_t (FILE *fplog
, t_commrec
*cr
, const gmx::MDLogger
&mdlog
,
107 int nfile
, const t_filenm fnm
[],
108 const gmx_output_env_t
*oenv
, gmx_bool bVerbose
,
110 gmx_vsite_t
*vsite
, gmx_constr_t constr
,
112 gmx::IMDOutputProvider
*outputProvider
,
113 t_inputrec
*inputrec
,
114 gmx_mtop_t
*top_global
, t_fcdata
*fcd
,
115 t_state
*state_global
,
116 ObservablesHistory
*observablesHistory
,
118 t_nrnb
*nrnb
, gmx_wallcycle_t wcycle
,
121 int repl_ex_nst
, int repl_ex_nex
, int repl_ex_seed
,
122 gmx_membed_t gmx_unused
* membed
,
123 real cpt_period
, real max_hours
,
126 gmx_walltime_accounting_t walltime_accounting
);
130 #endif // GMX_MDLIB_INTEGRATOR_H