Remove use of graph in do_force()
[alexxy/gromacs.git] / src / gromacs / domdec / mdsetup.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2016,2017,2018,2019,2020, 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.
8  *
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.
13  *
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.
18  *
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.
23  *
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.
31  *
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.
34  */
35
36 /*! \libinternal \file
37  * \brief Contains functions relevant to simulation setup in MD drivers
38  *
39  * \inlibraryapi
40  * \ingroup module_domdec
41  */
42
43 #ifndef GMX_DOMDEC_MDSETUP_H
44 #define GMX_DOMDEC_MDSETUP_H
45
46 struct bonded_threading_t;
47 struct gmx_localtop_t;
48 struct gmx_mtop_t;
49 struct gmx_shellfc_t;
50 struct gmx_vsite_t;
51 struct t_commrec;
52 struct t_forcerec;
53 struct t_inputrec;
54 struct t_mdatoms;
55
56 namespace gmx
57 {
58 class Constraints;
59 class MDAtoms;
60 } // namespace gmx
61
62 /*! \brief Gets the local shell with domain decomposition
63  *
64  * \param[in]     cr        Communication record
65  * \param[in]     md        The MD atom data
66  * \param[in,out] shfc      The shell/flexible-constraint data
67  */
68 void make_local_shells(const t_commrec* cr, const t_mdatoms* md, gmx_shellfc_t* shfc);
69
70 /*! \brief Sets atom data for several MD algorithms
71  *
72  * Most MD algorithms require two different setup calls:
73  * one for initialization and parameter setting and one for atom data setup.
74  * This routine sets the atom data for the (locally available) atoms.
75  * This is called at the start of serial runs and during domain decomposition.
76  *
77  * \param[in]     cr         Communication record
78  * \param[in]     ir         Input parameter record
79  * \param[in]     top_global The global topology
80  * \param[in,out] top        The local topology
81  * \param[in,out] fr         The force calculation parameter/data record
82  * \param[out]    mdAtoms    The MD atom data
83  * \param[in,out] constr     The constraints handler, can be NULL
84  * \param[in,out] vsite      The virtual site data, can be NULL
85  * \param[in,out] shellfc    The shell/flexible-constraint data, can be NULL
86  */
87 void mdAlgorithmsSetupAtomData(const t_commrec*  cr,
88                                const t_inputrec* ir,
89                                const gmx_mtop_t& top_global,
90                                gmx_localtop_t*   top,
91                                t_forcerec*       fr,
92                                gmx::MDAtoms*     mdAtoms,
93                                gmx::Constraints* constr,
94                                gmx_vsite_t*      vsite,
95                                gmx_shellfc_t*    shellfc);
96
97 #endif