Fixing copyright issues and code contributors
[alexxy/gromacs.git] / include / types / fcdata.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 #ifndef _fcdata_h
39 #define _fcdata_h
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 typedef real rvec5[5];
46
47 /* Distance restraining stuff */
48 typedef struct {
49   int  dr_weighting;  /* Weighting of pairs in one restraint              */
50   gmx_bool dr_bMixed;     /* Use sqrt of the instantaneous times              *
51                        * the time averaged violation                      */
52   real dr_fc;         /* Force constant for disres,                       *
53                        * which is multiplied by a (possibly)              *
54                        * different factor for each restraint              */
55   real dr_tau;        /* Time constant for disres                         */
56   real ETerm;         /* multiplication factor for time averaging         */
57   real ETerm1;        /* 1 - ETerm1                                       */
58   real exp_min_t_tau; /* Factor for slowly switching on the force         */
59   int  nres;          /* The number of distance restraints                */
60   int  npair;         /* The number of distance restraint pairs           */
61   real sumviol;       /* The sum of violations                            */
62   real *rt;           /* The calculated instantaneous distance (npr)      */
63   real *rm3tav;       /* The calculated time averaged distance (npr)      */
64   real *Rtl_6;        /* The calculated instantaneous r^-6 (nr)           */
65   real *Rt_6;         /* The calculated inst. ens. averaged r^-6 (nr)     */
66   real *Rtav_6;       /* The calculated time and ens. averaged r^-6 (nr)  */
67   int  nsystems;      /* The number of systems for ensemble averaging     */
68 } t_disresdata;
69
70
71 /* Orientation restraining stuff */
72 typedef struct {
73   real   fc;          /* Force constant for the restraints                  */
74   real   edt;         /* Multiplication factor for time averaging           */
75   real   edt_1;        /* 1 - edt                                            */
76   real   exp_min_t_tau; /* Factor for slowly switching on the force         */
77   int    nr;          /* The number of orientation restraints               */
78   int    nex;         /* The number of experiments                          */
79   int  nref;          /* The number of atoms for the fit                    */
80   real *mref;         /* The masses of the reference atoms                  */
81   rvec *xref;         /* The reference coordinates for the fit (nref)       */
82   rvec *xtmp;         /* Temporary array for fitting (nref)                 */
83   matrix R;           /* Rotation matrix to rotate to the reference coor.   */
84   tensor *S;          /* Array of order tensors for each experiment (nexp)  */
85   rvec5  *Dinsl;      /* The order matrix D for all restraints (nr x 5)     */
86   rvec5  *Dins;       /* The ensemble averaged D (nr x 5)                   */
87   rvec5  *Dtav;       /* The time and ensemble averaged D (nr x 5)          */
88   real   *oinsl;      /* The calculated instantaneous orientations          */
89   real   *oins;       /* The calculated emsemble averaged orientations      */
90   real   *otav;       /* The calculated time and ensemble averaged orient.  */
91   real   rmsdev;      /* The weighted (using kfac) RMS deviation            */
92   rvec5  *tmp;        /* An array of temporary 5-vectors (nex);             */ 
93   real   ***TMP;      /* An array of temporary 5x5 matrices (nex);          */
94   real   *eig;        /* Eigenvalues/vectors, for output only (nex x 12)    */
95
96   /* variables for diagonalization with diagonalize_orires_tensors()*/
97   double **M;
98   double *eig_diag;
99   double **v;
100 } t_oriresdata;
101
102 /* 
103  * Data struct used in the force calculation routines
104  * for storing the tables for bonded interactions and
105  * for storing information which is needed in following steps
106  * (for instance for time averaging in distance retraints)
107  * or for storing output, since force routines only return the potential.
108  */
109 typedef struct {
110   bondedtable_t *bondtab;
111   bondedtable_t *angletab;
112   bondedtable_t *dihtab;
113
114   t_disresdata disres;
115   t_oriresdata orires;
116 } t_fcdata;
117
118 #ifdef __cplusplus
119 }
120 #endif
121
122 #endif /* _fcdata_h */