Fixed shift and switch modifiers, particularly for free-energy
[alexxy/gromacs.git] / include / nonbonded.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5  * Copyright (c) 2001-2004, The GROMACS development team,
6  * check out http://www.gromacs.org for more information.
7  * Copyright (c) 2012,2013, by the GROMACS development team, led by
8  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9  * others, as listed in the AUTHORS file in the top-level source
10  * directory and at http://www.gromacs.org.
11  *
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.
16  *
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.
21  *
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.
26  *
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.
34  *
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.
37  */
38
39 #ifndef _nonbonded_h
40 #define _nonbonded_h
41 #include "visibility.h"
42 #include "typedefs.h"
43 #include "pbc.h"
44 #include "network.h"
45 #include "tgroup.h"
46 #include "genborn.h"
47
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 #if 0
52 } /* fixes auto-indentation problems */
53 #endif
54
55
56
57 GMX_LIBGMX_EXPORT
58 void
59 gmx_nonbonded_setup(FILE *         fplog,
60                     t_forcerec *   fr,
61                     gmx_bool       bGenericKernelOnly);
62
63
64
65
66
67 GMX_LIBGMX_EXPORT
68 void
69 gmx_nonbonded_set_kernel_pointers(FILE *       fplog,
70                                   t_nblist *   nl,
71                                   gmx_bool     bElecAndVdwSwitchDiffers);
72
73
74
75 #define GMX_NONBONDED_DO_LR             (1<<0)
76 #define GMX_NONBONDED_DO_FORCE          (1<<1)
77 #define GMX_NONBONDED_DO_FOREIGNLAMBDA  (1<<2)
78 #define GMX_NONBONDED_DO_POTENTIAL      (1<<3)
79 #define GMX_NONBONDED_DO_SR             (1<<4)
80
81 GMX_LIBGMX_EXPORT
82 void
83 do_nonbonded(t_commrec *cr, t_forcerec *fr,
84              rvec x[], rvec f_shortrange[], rvec f_longrange[], t_mdatoms *md, t_blocka *excl,
85              gmx_grppairener_t *grppener, rvec box_size,
86              t_nrnb *nrnb, real *lambda, real dvdlambda[],
87              int nls, int eNL, int flags);
88
89 /* Calculate VdW/charge listed pair interactions (usually 1-4 interactions).
90  * global_atom_index is only passed for printing error messages.
91  */
92 real
93 do_nonbonded_listed(int ftype, int nbonds, const t_iatom iatoms[], const t_iparams iparams[],
94                     const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g,
95                     real *lambda, real *dvdl, const t_mdatoms *md, const t_forcerec *fr,
96                     gmx_grppairener_t *grppener, int *global_atom_index);
97
98 #ifdef __cplusplus
99 }
100 #endif
101
102 #endif