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
31 int pid
; /* The processor id */
32 int nprocs
; /* The number of processors */
33 int cgtotal
; /* Total number of charge groups */
34 int natoms
; /* Total number of atoms */
35 int nstDlb
; /* Every how many steps must we do load */
37 int shift
,bshift
; /* Coordinates are shifted left for */
38 /* 'shift' systolic pulses, and right */
39 /* for 'bshift' pulses. Forces are */
40 /* shifted right for 'shift' pulses */
41 /* and left for 'bshift' pulses */
42 /* This way is not necessary to shift */
43 /* the coordinates over the entire ring */
44 int homenr
[MAXPROC
]; /* The number of home particles */
45 int index
[MAXPROC
]; /* The starting of the home atoms */
46 int cgload
[MAXPROC
]; /* Division of charge groups over CPUS */
47 /* This is static, i.e. it does not */
48 /* change during the simulation */
49 int workload
[MAXPROC
]; /* This is the load for neighbor- */
50 /* searching, this is initially the same*/
51 /* as cgload, but may change due to */
52 /* dynamic load balancing */
55 #define START(nsb) ((nsb)->index[(nsb)->pid])
56 #define HOMENR(nsb) ((nsb)->homenr[(nsb)->pid])
57 #define CG0(nsb) (((nsb)->pid == 0) ? 0 : (nsb)->cgload[(nsb)->pid-1])
58 #define CG1(nsb) ((nsb)->cgload[(nsb)->pid])