4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-2001
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
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.
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.
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.
31 * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
34 * Good ROcking Metal Altar for Chronical Sinners
44 /* check kernel/toppush.c when you change these numbers */
46 #define MAXFORCEPARAM 6
49 typedef atom_id t_iatom;
51 /* this MUST correspond to the
52 t_interaction_function[F_NRE] in gmxlib/ifunc.c */
95 F_NRE /* This number is for the total number of energies */
100 /* Some parameters have A and B values for free energy calculations.
101 * The B values are not used for regular simulations of course.
102 * Free Energy for nonbondeds can be computed by changing the atom type.
103 * The harmonic type is used for all harmonic potentials:
104 * bonds, angles and improper dihedrals
106 struct {real a,b,c; } bham;
107 struct {real rA,krA,rB,krB; } harmonic;
108 /* No free energy support for cubic bonds */
109 struct {real b0,kb,kcub; } cubic;
110 /* No free energy supported for WPOL */
111 struct {real kx,ky,kz,rOH,rHH,rOD; } wpol;
112 struct {real c6,c12; } lj;
113 struct {real c6A,c12A,c6B,c12B; } lj14;
114 /* Proper dihedrals can not have different multiplicity when
115 * doing free energy calculations, because the potential would not
116 * be periodic anymore.
118 struct {real phiA,cpA;int mult;real phiB,cpB; } pdihs;
119 struct {real dA,dB; } shake;
120 /* Settle can not be used for Free energy calculations.
121 * Use shake (or lincs) instead.
122 * The rest of the things cannot (yet) be used in FEP studies either.
124 struct {real doh,dhh; } settle;
125 struct {real b0,cb,beta; } morse;
126 struct {real pos0[DIM],fc[DIM]; } posres;
127 struct {real rbc[NR_RBDIHS]; } rbdihs;
128 struct {real a,b,c,d,e,f; } dummy;
129 struct {real low,up1,up2,fac;int type,index; } disres;
130 struct {real buf[MAXFORCEPARAM]; } generic; /* Conversion */
133 typedef int t_functype;
138 int multinr[MAXNODES];
143 * The struct t_ilist defines a list of atoms with their interactions.
144 * General field description:
146 * the size (nr elements) of the interactions array (iatoms[]). This
147 * equals multinr[MAXNODES-1].
148 * int multinr[MAXNODES]
149 * specifies the number of type and atom id sequences in the iatoms[]
150 * array. Every element specifies the index of the first interaction
151 * for the next node. The first node starts at zero. So for
152 * n=0, the interactions run from 0 upto multinr[0]. The interactions
153 * for node n (n>0) run from multinr[n-1] to index[n] (not including
156 * specifies which atoms are involved in an interaction of a certain
157 * type. The layout of this array is as follows:
159 * +-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+...
160 * |type1|at1|at2|at3|type2|at1|at2|type1|at1|at2|at3|type3|at1|at2|
161 * +-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+...
163 * So for interaction type type1 3 atoms are needed, and for type2 and
164 * type3 only 2. The type identifier is used to select the function to
165 * calculate the interaction and its actual parameters. This type
166 * identifier is an index in a params[] and functype[] array.
167 * The multinr[] array will be initialised for MAXNODES in such a way that up
168 * to the actual number of nodes (during creation time), the array is
169 * filled with the indices, the remaining nodes get empty parts by
170 * setting the indices to the largest value. In that way it is always possible
171 * to run this system on a larger multinode ring however only the
172 * configured number of nodes will we used. Running on less nodes
173 * than configured is also possible by taking together adjacent
174 * nodes. Note that in this case the load balance might get worse.
175 * The single node version is implemented by simply using the complete
176 * configuration as one piece.
184 t_functype *functype;
191 * The struct t_idef defines all the interactions for the complete
192 * simulation. The structure is setup in such a way that the multinode
193 * version of the program can use it as easy as the single node version.
194 * General field description:
196 * defines the number of elements in functype[] and param[].
198 * the node id (if parallel machines)
200 * the number of atomtypes
201 * t_functype *functype
202 * array of length ntypes, defines for every force type what type of
203 * function to use. Every "bond" with the same function but different
204 * force parameters is a different force type. The type identifier in the
205 * forceatoms[] array is an index in this array.
207 * array of length ntypes, defines the parameters for every interaction
208 * type. The type identifier in the actual interaction list
209 * (bondeds.iatoms[] or shakes.iatoms[]) is an index in this array.
211 * The list of interactions for each type. Note that some,
212 * such as LJ and COUL will have 0 entries.