4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Green Red Orange Magenta Azure Cyan Skyblue
38 /* check kernel/toppush.c when you change these numbers */
40 #define MAXFORCEPARAM 6
43 typedef atom_id t_iatom;
45 /* this MUST correspond to the
46 t_interaction_function[F_NRE] in gmxlib/ifunc.c */
89 F_NRE /* This number is for the total number of energies */
94 /* Some parameters have A and B values for free energy calculations.
95 * The B values are not used for regular simulations of course.
96 * Free Energy for nonbondeds can be computed by changing the atom type.
97 * The harmonic type is used for all harmonic potentials:
98 * bonds, angles and improper dihedrals
100 struct {real a,b,c; } bham;
101 struct {real rA,krA,rB,krB; } harmonic;
102 /* No free energy support for cubic bonds */
103 struct {real b0,kb,kcub; } cubic;
104 /* No free energy supported for WPOL */
105 struct {real kx,ky,kz,rOH,rHH,rOD; } wpol;
106 struct {real c6,c12; } lj;
107 struct {real c6A,c12A,c6B,c12B; } lj14;
108 /* Proper dihedrals can not have different multiplicity when
109 * doing free energy calculations, because the potential would not
110 * be periodic anymore.
112 struct {real phiA,cpA;int mult;real phiB,cpB; } pdihs;
113 struct {real dA,dB; } shake;
114 /* Settle can not be used for Free energy calculations.
115 * Use shake (or lincs) instead.
116 * The rest of the things cannot (yet) be used in FEP studies either.
118 struct {real doh,dhh; } settle;
119 struct {real b0,cb,beta; } morse;
120 struct {real pos0[DIM],fc[DIM]; } posres;
121 struct {real rbc[NR_RBDIHS]; } rbdihs;
122 struct {real a,b,c,d,e,f; } dummy;
123 struct {real low,up1,up2,fac;int type,index; } disres;
124 struct {real buf[MAXFORCEPARAM]; } generic; /* Conversion */
127 typedef int t_functype;
132 int multinr[MAXNODES];
137 * The struct t_ilist defines a list of atoms with their interactions.
138 * General field description:
140 * the size (nr elements) of the interactions array (iatoms[]). This
141 * equals multinr[MAXNODES-1].
142 * int multinr[MAXNODES]
143 * specifies the number of type and atom id sequences in the iatoms[]
144 * array. Every element specifies the index of the first interaction
145 * for the next node. The first node starts at zero. So for
146 * n=0, the interactions run from 0 upto multinr[0]. The interactions
147 * for node n (n>0) run from multinr[n-1] to index[n] (not including
150 * specifies which atoms are involved in an interaction of a certain
151 * type. The layout of this array is as follows:
153 * +-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+...
154 * |type1|at1|at2|at3|type2|at1|at2|type1|at1|at2|at3|type3|at1|at2|
155 * +-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+...
157 * So for interaction type type1 3 atoms are needed, and for type2 and
158 * type3 only 2. The type identifier is used to select the function to
159 * calculate the interaction and its actual parameters. This type
160 * identifier is an index in a params[] and functype[] array.
161 * The multinr[] array will be initialised for MAXNODES in such a way that up
162 * to the actual number of nodes (during creation time), the array is
163 * filled with the indices, the remaining nodes get empty parts by
164 * setting the indices to the largest value. In that way it is always possible
165 * to run this system on a larger multinode ring however only the
166 * configured number of nodes will we used. Running on less nodes
167 * than configured is also possible by taking together adjacent
168 * nodes. Note that in this case the load balance might get worse.
169 * The single node version is implemented by simply using the complete
170 * configuration as one piece.
178 t_functype *functype;
185 * The struct t_idef defines all the interactions for the complete
186 * simulation. The structure is setup in such a way that the multinode
187 * version of the program can use it as easy as the single node version.
188 * General field description:
190 * defines the number of elements in functype[] and param[].
192 * the node id (if parallel machines)
194 * the number of atomtypes
195 * t_functype *functype
196 * array of length ntypes, defines for every force type what type of
197 * function to use. Every "bond" with the same function but different
198 * force parameters is a different force type. The type identifier in the
199 * forceatoms[] array is an index in this array.
201 * array of length ntypes, defines the parameters for every interaction
202 * type. The type identifier in the actual interaction list
203 * (bondeds.iatoms[] or shakes.iatoms[]) is an index in this array.
205 * The list of interactions for each type. Note that some,
206 * such as LJ and COUL will have 0 entries.