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,2015,2017,2018 by the GROMACS development team.
7 * Copyright (c) 2019,2020, by the GROMACS development team, led by
8 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
9 * and including many others, as listed in the AUTHORS file in the
10 * top-level source directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
39 #ifndef GMX_GMXLIB_NRNB_H
40 #define GMX_GMXLIB_NRNB_H
44 #include "gromacs/utility/basedefinitions.h"
46 #define eNR_NBKERNEL_NONE (-1)
54 eNR_NBKERNEL_ELEC_W3_VF
,
55 eNR_NBKERNEL_ELEC_W3_F
,
56 eNR_NBKERNEL_ELEC_W3W3_VF
,
57 eNR_NBKERNEL_ELEC_W3W3_F
,
58 eNR_NBKERNEL_ELEC_W4_VF
,
59 eNR_NBKERNEL_ELEC_W4_F
,
60 eNR_NBKERNEL_ELEC_W4W4_VF
,
61 eNR_NBKERNEL_ELEC_W4W4_F
,
62 eNR_NBKERNEL_ELEC_VDW_VF
,
63 eNR_NBKERNEL_ELEC_VDW_F
,
64 eNR_NBKERNEL_ELEC_VDW_W3_VF
,
65 eNR_NBKERNEL_ELEC_VDW_W3_F
,
66 eNR_NBKERNEL_ELEC_VDW_W3W3_VF
,
67 eNR_NBKERNEL_ELEC_VDW_W3W3_F
,
68 eNR_NBKERNEL_ELEC_VDW_W4_VF
,
69 eNR_NBKERNEL_ELEC_VDW_W4_F
,
70 eNR_NBKERNEL_ELEC_VDW_W4W4_VF
,
71 eNR_NBKERNEL_ELEC_VDW_W4W4_F
,
73 eNR_NBKERNEL_NR
, /* Total number of interaction-specific kernel entries */
75 eNR_NBKERNEL_GENERIC
= eNR_NBKERNEL_NR
, /* Reuse number; KERNEL_NR is not an entry itself */
76 eNR_NBKERNEL_GENERIC_CG
,
77 eNR_NBKERNEL_FREE_ENERGY
, /* Add other generic kernels _before_ the free energy one */
79 eNR_NBKERNEL_TOTAL_NR
,
81 eNR_NBNXN_DIST2
= eNR_NBKERNEL_TOTAL_NR
, // Reuse the symbolic constant that indicates the last kernel
97 eNR_NBNXN_ADD_LJ_FSW_E
,
99 eNR_NBNXN_ADD_LJ_PSW_E
,
100 eNR_NBNXN_ADD_LJ_EWALD
,
101 eNR_NBNXN_ADD_LJ_EWALD_E
,
171 eNR_CROSS_BOND_ANGLE
,
178 double n
[eNRNB
] = { 0 };
183 void clear_nrnb(t_nrnb
* nrnb
);
185 void add_nrnb(t_nrnb
* dest
, t_nrnb
* s1
, t_nrnb
* s2
);
187 void print_nrnb(FILE* out
, t_nrnb
* nrnb
);
189 void _inc_nrnb(t_nrnb
* nrnb
, int enr
, int inc
, char* file
, int line
);
192 # define inc_nrnb(nrnb, enr, inc) _inc_nrnb(nrnb, enr, inc, __FILE__, __LINE__)
194 # define inc_nrnb(nrnb, enr, inc) (nrnb)->n[enr] += inc
198 void print_flop(FILE* out
, t_nrnb
* nrnb
, double* nbfs
, double* mflop
);
199 /* Calculates the non-bonded forces and flop count.
200 * When out!=NULL also prints the full count table.
203 void print_perf(FILE* out
, double nodetime
, double realtime
, int64_t nsteps
, double delta_t
, double nbfs
, double mflop
);
204 /* Prints the performance, nbfs and mflop come from print_flop */
206 void pr_load(FILE* log
, struct t_commrec
* cr
, t_nrnb nrnb
[]);
207 /* Print detailed load balancing info */
209 int cost_nrnb(int enr
);
210 /* Cost in i860 cycles of this component of MD */
212 const char* nrnb_str(int enr
);
213 /* Name of this component */
215 #endif /* GMX_GMXLIB_NRNB_H */