Removed include of types/ifunc.h from typedefs.h
[gromacs.git] / src / gromacs / listed-forces / listed-forces.h
blobacb13fdfe0c396075f29f12cb39403d181f7c925
1 /*
2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2014,2015, 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 /*! \defgroup module_listed-forces Interactions between lists of particles
36 * \ingroup group_mdrun
38 * \brief Handles computing energies and forces for listed
39 * interactions.
41 * Located here is the the code for
42 * - computing energies and forces for interactions between a small
43 number of particles, e.g bonds, position restraints and listed
44 non-bonded interactions (e.g. 1-4).
45 * - high-level functions used by mdrun for computing a set of such
46 quantities
47 * - managing thread-wise decomposition, thread-local buffer output,
48 and reduction of output data across threads.
50 * \author Mark Abraham <mark.j.abraham@gmail.com>
53 /*! \file
55 * \brief This file contains declarations of high-level functions used
56 * by mdrun to compute energies and forces for listed interactions.
58 * Clients of libgromacs that want to evaluate listed interactions
59 * should call functions declared here.
61 * \author Mark Abraham <mark.j.abraham@gmail.com>
63 * \inpublicapi
64 * \ingroup module_listed-forces
66 #ifndef GMX_LISTED_FORCES_LISTED_FORCES_H
67 #define GMX_LISTED_FORCES_LISTED_FORCES_H
69 #include "gromacs/legacyheaders/typedefs.h"
71 struct gmx_multisim_t;
72 struct t_fcdata;
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
78 /*! \brief Return whether this is an interaction that actually
79 * calculates a potential and works on multiple atoms (not e.g. a
80 * connection or a position restraint).
82 * \todo This function could go away when idef is not a big bucket of
83 * everything. */
84 gmx_bool
85 ftype_is_bonded_potential(int ftype);
87 /*! \brief Calculates all listed force interactions.
89 * Note that pbc_full is used only for position restraints, and is
90 * not initialized if there are none. */
91 void calc_listed(const struct gmx_multisim_t *ms,
92 struct gmx_wallcycle *wcycle,
93 const t_idef *idef,
94 const rvec x[], history_t *hist,
95 rvec f[], t_forcerec *fr,
96 const struct t_pbc *pbc, const struct t_pbc *pbc_full,
97 const struct t_graph *g,
98 gmx_enerdata_t *enerd, t_nrnb *nrnb, real *lambda,
99 const t_mdatoms *md,
100 struct t_fcdata *fcd, int *ddgatindex,
101 int force_flags);
103 /*! \brief As calc_listed(), but only determines the potential energy
104 * for the perturbed interactions.
106 * The shift forces in fr are not affected. */
107 void calc_listed_lambda(const t_idef *idef,
108 const rvec x[],
109 t_forcerec *fr,
110 const struct t_pbc *pbc, const struct t_graph *g,
111 gmx_grppairener_t *grpp, real *epot, t_nrnb *nrnb,
112 real *lambda,
113 const t_mdatoms *md,
114 struct t_fcdata *fcd, int *global_atom_index);
116 /*! \brief Do all aspects of energy and force calculations for mdrun
117 * on the set of listed interactions */
118 void
119 do_force_listed(struct gmx_wallcycle *wcycle,
120 matrix box,
121 const t_lambda *fepvals,
122 const struct gmx_multisim_t *ms,
123 const t_idef *idef,
124 const rvec x[],
125 history_t *hist,
126 rvec f[],
127 t_forcerec *fr,
128 const struct t_pbc *pbc,
129 const struct t_graph *graph,
130 gmx_enerdata_t *enerd,
131 t_nrnb *nrnb,
132 real *lambda,
133 const t_mdatoms *md,
134 struct t_fcdata *fcd,
135 int *global_atom_index,
136 int flags);
138 #ifdef __cplusplus
140 #endif
142 #endif