Tagged files with gromacs 3.0 header and added some license info
[alexxy/gromacs.git] / include / types / forcerec.h
1 /*
2  * $Id$
3  * 
4  *                This source code is part of
5  * 
6  *                 G   R   O   M   A   C   S
7  * 
8  *          GROningen MAchine for Chemical Simulations
9  * 
10  *                        VERSION 3.0
11  * 
12  * Copyright (c) 1991-2001
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  * 
21  * If you want to redistribute modifications, please consider that
22  * scientific software is very special. Version control is crucial -
23  * bugs must be traceable. We will be happy to consider code for
24  * inclusion in the official distribution, but derived work must not
25  * be called official GROMACS. Details are found in the README & COPYING
26  * files - if they are missing, get the official version at www.gromacs.org.
27  * 
28  * To help us fund GROMACS development, we humbly ask that you cite
29  * the papers on the package - you can find them in the top README file.
30  * 
31  * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
32  * 
33  * And Hey:
34  * Good ROcking Metal Altar for Chronical Sinners
35  */
36 #ifdef HAVE_CONFIG_H
37 #include <config.h>
38 #endif
39
40 enum { eNL_VDWQQ, eNL_VDW, eNL_QQ, 
41        eNL_VDWQQ_FREE, eNL_VDW_FREE, eNL_QQ_FREE, 
42        eNL_VDWQQ_SOLMNO, eNL_VDW_SOLMNO, eNL_QQ_SOLMNO, 
43        eNL_VDWQQ_WATER, eNL_QQ_WATER, 
44        eNL_VDWQQ_WATERWATER, eNL_QQ_WATERWATER, 
45        eNL_NR };
46  
47 typedef struct {
48   /* Cut-Off stuff */
49   int  ePBC;
50   real rlist,rlistlong;
51   
52   /* Dielectric constant resp. multiplication factor for charges */
53   real zsquare,temp;
54   real epsilon_r,epsfac;  
55   
56   /* Constants for reaction fields */
57   bool bRF;
58   real kappa,k_rf,c_rf;
59   
60   /* Constant for long range dispersion correction (average dispersion) */
61   real avcsix;
62       
63   /* Fudge factors */
64   real fudgeQQ;
65
66   /* Table stuff */
67   bool bcoultab;
68   bool bvdwtab;
69   real rtab;
70   int  ntab;
71   real tabscale;
72   /* We duplicate tables for cache optimization purposes */
73   real *coultab;      /* Coul only */
74   real *vdwtab;       /* Vdw only   */
75   real *coulvdwtab;   /* Both      */
76   real *coulvdw14tab; /* 1,4 table with both */
77
78   /* PPPM & Shifting stuff */
79   real rcoulomb_switch,rcoulomb;
80   real *phi;
81
82   /* VdW stuff */
83   real rvdw_switch,rvdw;
84   real bham_b_max;
85   real tabscale_exp;
86
87   /* Free energy ? */
88   int  efep;
89   real sc_alpha;
90   real sc_sigma6;
91
92   /* NS Stuff */
93   int  eeltype;
94   int  vdwtype;
95   int  cg0,hcg;
96   int  ndelta;
97   bool bSolvOpt;
98   int  nMNOMol;
99   real nMNOav[3];
100   int  nWatMol;
101   int  Dimension;
102   bool bGrid,bDomDecomp;
103   int  *solvent_type;
104   int  *mno_index;
105   rvec *cg_cm;
106   rvec *shift_vec;
107   
108   /* The actual neighbor lists, short and long range, see enum above
109    * for definition of neighborlist indices.
110    */
111   t_nblist nlist_sr[eNL_NR];
112   t_nblist nlist_lr[eNL_NR];
113   
114   /* This mask array of length nn determines whether or not this bit of the
115    * neighbourlists should be computed. Usually all these are true of course,
116    * but not when shells are used. During minimisation all the forces that 
117    * include shells are done, then after minimsation is converged the remaining
118    * forces are computed.
119    */
120   /* bool *bMask; */
121     
122   /* Twin Range stuff. */
123   bool bTwinRange;
124   int  nlr;
125   rvec *f_twin;
126   rvec *fshift_twin;
127   
128   /* PME/Ewald stuff */
129   rvec *f_pme;
130   bool bEwald;
131   real ewaldcoeff;
132
133   /* Virial Stuff */
134   rvec *fshift;
135   
136   /* Free energy stuff */
137   int     nmol;
138   atom_id *mol_nr;
139   real    *mol_epot;
140   int     nstcalc;
141   
142   /* Non bonded Parameter lists */
143   int  ntype; /* Number of atom types */
144   bool bBHAM;
145   real *nbfp;
146
147   /* Energy group exclusions */
148   bool *eg_excl;
149
150   /* xmdrun directional minimization */
151   real k_dirmin;
152 } t_forcerec;
153
154 #define C6(nbfp,ntp,ai,aj)     (nbfp)[2*((ntp)*(ai)+(aj))]
155 #define C12(nbfp,ntp,ai,aj)    (nbfp)[2*((ntp)*(ai)+(aj))+1]
156 #define BHAMC(nbfp,ntp,ai,aj)  (nbfp)[3*((ntp)*(ai)+(aj))]
157 #define BHAMA(nbfp,ntp,ai,aj)  (nbfp)[3*((ntp)*(ai)+(aj))+1]
158 #define BHAMB(nbfp,ntp,ai,aj)  (nbfp)[3*((ntp)*(ai)+(aj))+2]