Merge branch 'release-4-5-patches' into release-4-6
[alexxy/gromacs.git] / include / disre.h
1
2 /*
3  * This file is part of the GROMACS molecular simulation package.
4  *
5  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
6  * Copyright (c) 2001-2004, The GROMACS development team,
7  * check out http://www.gromacs.org for more information.
8  * Copyright (c) 2012, by the GROMACS development team, led by
9  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
10  * others, as listed in the AUTHORS file in the top-level source
11  * directory and at http://www.gromacs.org.
12  *
13  * GROMACS is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public License
15  * as published by the Free Software Foundation; either version 2.1
16  * of the License, or (at your option) any later version.
17  *
18  * GROMACS is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with GROMACS; if not, see
25  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
26  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
27  *
28  * If you want to redistribute modifications to GROMACS, please
29  * consider that scientific software is very special. Version
30  * control is crucial - bugs must be traceable. We will be happy to
31  * consider code for inclusion in the official distribution, but
32  * derived work must not be called official GROMACS. Details are found
33  * in the README & COPYING files - if they are missing, get the
34  * official version at http://www.gromacs.org.
35  *
36  * To help us fund GROMACS development, we humbly ask that you cite
37  * the research papers on the package. Check out http://www.gromacs.org.
38  */
39
40 #ifndef _disre_h
41 #define _disre_h
42 #include "visibility.h"
43 #include "sysstuff.h"
44 #include "typedefs.h"
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 GMX_LIBGMX_EXPORT
51 void init_disres(FILE *fplog,const gmx_mtop_t *mtop,
52                  t_inputrec *ir,const t_commrec *cr,gmx_bool bPartDecomp,
53                  t_fcdata *fcd,t_state *state, gmx_bool bIsREMD);
54 /* Initiate *fcd data, must be called once, nbonds is the number 
55  * of iatoms in the ilist of the idef struct.
56  * When time averaging is used, the history is initialized in state,
57  * unless it was read before from a checkpoint file.
58  * The implementation of distance restraints with -multi
59  * must differ according to whether REMD is active.
60  */
61
62 GMX_LIBGMX_EXPORT
63 void calc_disres_R_6(const gmx_multisim_t *ms,
64                             int nfa,const t_iatom *fa,const t_iparams ip[],
65                             const rvec *x,const t_pbc *pbc,
66                             t_fcdata *fcd,history_t *hist);
67 /* Calculates r and r^-3 (inst. and time averaged) for all pairs
68  * and the ensemble averaged r^-6 (inst. and time averaged) for all restraints
69  */
70
71 t_ifunc ta_disres;
72 /* Calculate the distance restraint forces, return the potential */
73
74 GMX_LIBGMX_EXPORT
75 void update_disres_history(t_fcdata *fcd,history_t *hist);
76 /* Copy the new time averages that have been calculated in calc_disres_R_6 */
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif  /* _disre_h */