3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
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
33 * GRoups of Organic Molecules in ACtion for Science
43 typedef unsigned long t_excl;
45 /* The maximum charge group size because of minimum size of t_excl
48 #define MAX_CHARGEGROUP_SIZE 32
50 /* The maximum charge group size for CG-CG nblists.
51 * The excl entry in t_nblist uses blocks of this size.
53 #define MAX_CGCGSIZE 32
57 int igeometry; /* The type of list (atom, water, etc.) */
58 int ielec; /* Coulomb loop type index for kernels */
59 int ielecmod; /* Coulomb modifier (e.g. switch/shift) */
60 int ivdw; /* VdW loop type index for kernels */
61 int ivdwmod; /* VdW modifier (e.g. switch/shift) */
62 int free_energy; /* Free energy setting for this list */
64 int nri,maxnri; /* Current/max number of i particles */
65 int nrj,maxnrj; /* Current/max number of j particles */
66 int maxlen; /* maxnr of j atoms for a single i atom */
67 int * iinr; /* The i-elements */
68 int * iinr_end; /* The end atom, only with enlistCG */
69 int * gid; /* Index in energy arrays */
70 int * shift; /* Shift vector index */
71 int * jindex; /* Index in jjnr */
72 int * jjnr; /* The j-atom list */
73 int * jjnr_end; /* The end atom, only with enltypeCG */
74 t_excl * excl; /* Exclusions, only with enltypeCG */
76 /* We use separate pointers for kernels that compute both potential
77 * and force (vf suffix), only potential (v) or only force (f)
83 /* Pad the list of neighbors for each i atom with "-1" entries up to the
84 * simd_padding_width, if it is larger than 0. This is necessary for many
85 * accelerated kernels using single-instruction multiple-data operations
88 int simd_padding_width;
93 /* For atom I = nblist->iinr[N] (0 <= N < nblist->nri) there can be
94 * several neighborlists (N's), for different energy groups (gid) and
95 * different shifts (shift).
96 * For corresponding J atoms for each list start at:
98 * with nblist->jindex[N] <= JI < nblist->jindex[N+1]
100 * enlist is of the form enlistUNIT1_UNIT2:
101 * UNIT ATOM: there is one atom: iinr[N] or jjnr[JI]
102 * UNIT SPC: there are 3 atoms: iinr[N],iinr[N]+1,iinr[N]+2, jjnr analog.
103 * UNIT TIP4P: there are 4 atoms: iinr[N],...,iinr[N]+3, jjnr analog.
104 * UNIT CG: there are N atoms: iinr[N],...,iinr_end[N]-1, jjnr analog.