2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team.
6 * Copyright (c) 2013,2014, by the GROMACS development team, led by
7 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8 * and including many others, as listed in the AUTHORS file in the
9 * top-level source directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
45 #include "../fileio/enxio.h"
46 #include "../fileio/mdoutf.h"
47 #include "../timing/wallcycle.h"
48 #include "../timing/walltime_accounting.h"
56 typedef struct gmx_global_stat
*gmx_global_stat_t
;
58 void do_pbc_first(FILE *log
, matrix box
, t_forcerec
*fr
,
59 struct t_graph
*graph
, rvec x
[]);
61 void do_pbc_first_mtop(FILE *fplog
, int ePBC
, matrix box
,
62 gmx_mtop_t
*mtop
, rvec x
[]);
64 void do_pbc_mtop(FILE *fplog
, int ePBC
, matrix box
,
65 gmx_mtop_t
*mtop
, rvec x
[]);
69 /* ROUTINES from stat.c */
70 gmx_global_stat_t
global_stat_init(t_inputrec
*ir
);
72 void global_stat_destroy(gmx_global_stat_t gs
);
74 void global_stat(FILE *log
, gmx_global_stat_t gs
,
75 t_commrec
*cr
, gmx_enerdata_t
*enerd
,
76 tensor fvir
, tensor svir
, rvec mu_tot
,
78 gmx_ekindata_t
*ekind
,
79 gmx_constr_t constr
, t_vcm
*vcm
,
81 gmx_mtop_t
*top_global
, t_state
*state_local
,
82 gmx_bool bSumEkinhOld
, int flags
);
83 /* Communicate statistics over cr->mpi_comm_mysim */
85 int do_per_step(gmx_int64_t step
, gmx_int64_t nstep
);
86 /* Return TRUE if io should be done */
88 /* ROUTINES from sim_util.c */
90 void print_time(FILE *out
, gmx_walltime_accounting_t walltime_accounting
,
91 gmx_int64_t step
, t_inputrec
*ir
, t_commrec
*cr
);
93 /*! \brief Print date, time, MPI rank and a description of this point
96 * \param[in] log logfile, or NULL to suppress output
97 * \param[in] rank MPI rank to include in the output
98 * \param[in] title Description to include in the output
99 * \param[in] the_time Seconds since the epoch, e.g. as reported by gmx_gettime
101 void print_date_and_time(FILE *log
, int rank
, const char *title
,
104 void print_start(FILE *fplog
, t_commrec
*cr
,
105 gmx_walltime_accounting_t walltime_accounting
,
108 void finish_run(FILE *log
, t_commrec
*cr
,
109 t_inputrec
*inputrec
,
110 t_nrnb nrnb
[], gmx_wallcycle_t wcycle
,
111 gmx_walltime_accounting_t walltime_accounting
,
112 struct nonbonded_verlet_t
*nbv
,
113 gmx_bool bWriteStat
);
115 void calc_enervirdiff(FILE *fplog
, int eDispCorr
, t_forcerec
*fr
);
117 void calc_dispcorr(t_inputrec
*ir
, t_forcerec
*fr
,
119 matrix box
, real lambda
, tensor pres
, tensor virial
,
120 real
*prescorr
, real
*enercorr
, real
*dvdlcorr
);
122 void initialize_lambdas(FILE *fplog
, t_inputrec
*ir
, int *fep_state
, real
*lambda
, double *lam0
);
124 void do_constrain_first(FILE *log
, gmx_constr_t constr
,
125 t_inputrec
*inputrec
, t_mdatoms
*md
,
126 t_state
*state
, t_commrec
*cr
, t_nrnb
*nrnb
,
127 t_forcerec
*fr
, gmx_localtop_t
*top
);
129 void init_md(FILE *fplog
,
130 t_commrec
*cr
, t_inputrec
*ir
, const output_env_t oenv
,
131 double *t
, double *t0
,
132 real
*lambda
, int *fep_state
, double *lam0
,
133 t_nrnb
*nrnb
, gmx_mtop_t
*mtop
,
135 int nfile
, const t_filenm fnm
[],
136 gmx_mdoutf_t
*outf
, t_mdebin
**mdebin
,
137 tensor force_vir
, tensor shake_vir
,
139 gmx_bool
*bSimAnn
, t_vcm
**vcm
, unsigned long Flags
);
140 /* Routine in sim_util.c */
142 gmx_bool
use_GPU(const struct nonbonded_verlet_t
*nbv
);
148 #endif /* _sim_util_h */