Removed refs to charmm files in share/top/Makefile.am
[gromacs/qmmm-gamess-us.git] / include / types / idef.h
blob73bfdc9403a2a4bd28face7a107d19c0f700b32e
1 /*
2 *
3 * This source code is part of
4 *
5 * G R O M A C S
6 *
7 * GROningen MAchine for Chemical Simulations
8 *
9 * VERSION 3.2.0
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
32 * And Hey:
33 * GRoups of Organic Molecules in ACtion for Science
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
39 #ifndef _idef_h
40 #define _idef_h
43 /* check kernel/toppush.c when you change these numbers */
44 #define MAXATOMLIST 6
45 #define MAXFORCEPARAM 12
46 #define NR_RBDIHS 6
47 #define NR_FOURDIHS 4
49 typedef atom_id t_iatom;
51 /* this MUST correspond to the
52 t_interaction_function[F_NRE] in gmxlib/ifunc.c */
53 enum {
54 F_BONDS,
55 F_G96BONDS,
56 F_MORSE,
57 F_CUBICBONDS,
58 F_CONNBONDS,
59 F_HARMONIC,
60 F_FENEBONDS,
61 F_TABBONDS,
62 F_TABBONDSNC,
63 F_ANGLES,
64 F_G96ANGLES,
65 F_CROSS_BOND_BONDS,
66 F_CROSS_BOND_ANGLES,
67 F_UREY_BRADLEY,
68 F_QUARTIC_ANGLES,
69 F_TABANGLES,
70 F_PDIHS,
71 F_RBDIHS,
72 F_FOURDIHS,
73 F_IDIHS,
74 F_PIDIHS,
75 F_TABDIHS,
76 F_CMAP,
77 F_GB12,
78 F_GB13,
79 F_GB14,
80 F_LJ14,
81 F_COUL14,
82 F_LJC14_Q,
83 F_LJC_PAIRS_NB,
84 F_LJ,
85 F_BHAM,
86 F_LJ_LR,
87 F_BHAM_LR,
88 F_DISPCORR,
89 F_COUL_SR,
90 F_COUL_LR,
91 F_RF_EXCL,
92 F_COUL_RECIP,
93 F_DPD,
94 F_POLARIZATION,
95 F_WATER_POL,
96 F_THOLE_POL,
97 F_POSRES,
98 F_DISRES,
99 F_DISRESVIOL,
100 F_ORIRES,
101 F_ORIRESDEV,
102 F_ANGRES,
103 F_ANGRESZ,
104 F_DIHRES,
105 F_DIHRESVIOL,
106 F_CONSTR,
107 F_CONSTRNC,
108 F_SETTLE,
109 F_VSITE2,
110 F_VSITE3,
111 F_VSITE3FD,
112 F_VSITE3FAD,
113 F_VSITE3OUT,
114 F_VSITE4FD,
115 F_VSITE4FDN,
116 F_VSITEN,
117 F_COM_PULL,
118 F_EQM,
119 F_EPOT,
120 F_EKIN,
121 F_ETOT,
122 F_ECONSERVED,
123 F_TEMP,
124 F_PDISPCORR,
125 F_PRES,
126 F_DVDL,
127 F_DKDL,
128 F_DHDL_CON,
129 F_NRE /* This number is for the total number of energies */
132 typedef union
134 /* Some parameters have A and B values for free energy calculations.
135 * The B values are not used for regular simulations of course.
136 * Free Energy for nonbondeds can be computed by changing the atom type.
137 * The harmonic type is used for all harmonic potentials:
138 * bonds, angles and improper dihedrals
140 struct {real a,b,c; } bham;
141 struct {real rA,krA,rB,krB; } harmonic;
142 /* No free energy supported for cubic bonds, FENE, WPOL or cross terms */
143 struct {real b0,kb,kcub; } cubic;
144 struct {real bm,kb; } fene;
145 struct {real r1e,r2e,krr; } cross_bb;
146 struct {real r1e,r2e,r3e,krt; } cross_ba;
147 struct {real theta,ktheta,r13,kUB; } u_b;
148 struct {real theta,c[5]; } qangle;
149 struct {real alpha; } polarize;
150 struct {real al_x,al_y,al_z,rOH,rHH,rOD; } wpol;
151 struct {real a,alpha1,alpha2,rfac; } thole;
152 struct {real c6,c12; } lj;
153 struct {real c6A,c12A,c6B,c12B; } lj14;
154 struct {real fqq,qi,qj,c6,c12; } ljc14;
155 struct {real qi,qj,c6,c12; } ljcnb;
156 /* Proper dihedrals can not have different multiplicity when
157 * doing free energy calculations, because the potential would not
158 * be periodic anymore.
160 struct {real phiA,cpA;int mult;real phiB,cpB; } pdihs;
161 struct {real dA,dB; } constr;
162 /* Settle can not be used for Free energy calculations of water bond geometry.
163 * Use shake (or lincs) instead if you have to change the water bonds.
165 struct {real doh,dhh; } settle;
166 /* No free energy supported for morse bonds */
167 struct {real b0,cb,beta; } morse;
168 struct {real pos0A[DIM],fcA[DIM],pos0B[DIM],fcB[DIM]; } posres;
169 struct {real rbcA[NR_RBDIHS], rbcB[NR_RBDIHS]; } rbdihs;
170 struct {real a,b,c,d,e,f; } vsite;
171 struct {int n; real a; } vsiten;
172 struct {real low,up1,up2,kfac;int type,label; } disres;
173 struct {real phi,dphi,kfac;int label,power; } dihres;
174 struct {int ex,power,label; real c,obs,kfac; } orires;
175 struct {int table;real kA;real kB; } tab;
176 struct {real sar,st,pi,gbr,bmlt; } gb;
177 struct {int cmapA,cmapB; } cmap;
178 struct {real buf[MAXFORCEPARAM]; } generic; /* Conversion */
179 } t_iparams;
181 typedef int t_functype;
184 * The nonperturbed/perturbed interactions are now separated (sorted) in the
185 * ilist, such that the first 0..(nr_nonperturbed-1) ones are exactly that, and
186 * the remaining ones from nr_nonperturbed..(nr-1) are perturbed bonded
187 * interactions.
189 typedef struct
191 int nr;
192 int nr_nonperturbed;
193 t_iatom *iatoms;
194 int nalloc;
195 } t_ilist;
198 * The struct t_ilist defines a list of atoms with their interactions.
199 * General field description:
200 * int nr
201 * the size (nr elements) of the interactions array (iatoms[]).
202 * t_iatom *iatoms
203 * specifies which atoms are involved in an interaction of a certain
204 * type. The layout of this array is as follows:
206 * +-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+...
207 * |type1|at1|at2|at3|type2|at1|at2|type1|at1|at2|at3|type3|at1|at2|
208 * +-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+...
210 * So for interaction type type1 3 atoms are needed, and for type2 and
211 * type3 only 2. The type identifier is used to select the function to
212 * calculate the interaction and its actual parameters. This type
213 * identifier is an index in a params[] and functype[] array.
216 typedef struct
218 real *cmap; /* Has length 4*grid_spacing*grid_spacing, */
219 /* there are 4 entries for each cmap type (V,dVdx,dVdy,d2dVdxdy) */
220 } cmapdata_t;
222 typedef struct
224 int ngrid; /* Number of allocated cmap (cmapdata_t ) grids */
225 int grid_spacing; /* Grid spacing */
226 cmapdata_t *cmapdata; /* Pointer to grid with actual, pre-interpolated data */
227 } gmx_cmap_t;
230 typedef struct
232 int ntypes;
233 int atnr;
234 t_functype *functype;
235 t_iparams *iparams;
236 double reppow; /* The repulsion power for VdW: C12*r^-reppow */
237 real fudgeQQ; /* The scaling factor for Coulomb 1-4: f*q1*q2 */
238 } gmx_ffparams_t;
240 enum {
241 ilsortUNKNOWN, ilsortNO_FE, ilsortFE_UNSORTED, ilsortFE_SORTED
244 typedef struct
246 int ntypes;
247 int atnr;
248 t_functype *functype;
249 t_iparams *iparams;
250 real fudgeQQ;
251 t_iparams *iparams_posres;
252 int iparams_posres_nalloc;
254 t_ilist il[F_NRE];
255 int ilsort;
256 } t_idef;
259 * The struct t_idef defines all the interactions for the complete
260 * simulation. The structure is setup in such a way that the multinode
261 * version of the program can use it as easy as the single node version.
262 * General field description:
263 * int ntypes
264 * defines the number of elements in functype[] and param[].
265 * int nodeid
266 * the node id (if parallel machines)
267 * int atnr
268 * the number of atomtypes
269 * t_functype *functype
270 * array of length ntypes, defines for every force type what type of
271 * function to use. Every "bond" with the same function but different
272 * force parameters is a different force type. The type identifier in the
273 * forceatoms[] array is an index in this array.
274 t_iparams *iparams;
275 * array of length ntypes, defines the parameters for every interaction
276 * type. The type identifier in the actual interaction list
277 * (bondeds.iatoms[] or shakes.iatoms[]) is an index in this array.
278 * t_ilist il[F_NRE]
279 * The list of interactions for each type. Note that some,
280 * such as LJ and COUL will have 0 entries.
283 typedef struct {
284 int n; /* n+1 is the number of points */
285 real scale; /* distance between two points */
286 real *tab; /* the actual tables, per point there are 4 numbers */
287 } bondedtable_t;
289 #endif