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 * Good ROcking Metal Altar for Chronical Sinners
33 static char *SRCID_init_h
= "$Id$";
36 #ident "@(#) init.h 1.13 11/23/92"
37 #endif /* HAVE_IDENT */
55 extern void check_nprocs_top(char *fn
,t_topology
*top
,int nprocs
);
56 /* Verify whether this tpr file is for nprocs processors, and quit if not */
58 extern void init_single(FILE *log
,
59 t_parm
*parm
, char *tpbfile
, t_topology
*top
,
60 rvec
**x
,rvec
**v
,t_mdatoms
**mdatoms
,
63 * Allocates space for the topology (top), the coordinates x, the
64 * velocities v, masses mass. Reads the parameters, topology,
65 * coordinates and velocities from the file specified in tpbfile
68 extern void distribute_parts(int left
,int right
,int pid
,int nprocs
,
69 t_parm
*parm
,char *tpbfile
,int nstDlb
);
71 * Reads the parameters, topology, coordinates and velocities for the
72 * multi processor version of the program from the file specified in
73 * parm->files[STATUS_NM]. This file should also contain a so called
74 * split descriptor which describes how to distribute particles over
75 * the system. It then selects for all subsystems the appropriate data
76 * and sends this to the processor using the left and right channels.
77 * At last it sends its own subsystem down the ring where it is buffered.
78 * Its own buffers for reading the data from the file are freed, and it
79 * is now possible to reload this processor from the ring by using the
80 * init_parts() routine.
81 * The routine also creates a renum array which can be used for writing
82 * out the x,v and f for analysis purpose.
85 extern void init_parts(FILE *log
,t_commrec
*cr
,
86 t_parm
*parm
,t_topology
*top
,
87 rvec
**x
,rvec
**v
,t_mdatoms
**mdatoms
,
88 t_nsborder
*nsb
,int list
);
90 * Loads the data for a simulation from the ring. Parameters, topology
91 * coordinates, velocities, and masses are initialised equal to using
92 * init_single() in the single processor version. The extra argument
93 * f_add is allocated to use for the update of the forces, the load
94 * array specifies in which part of the x and f array the subsystems
95 * of the other processors are located. Homenr0, homenr1, nparts0 and
96 * nparts1 are necessary to calculate the non bonded interaction using
97 * the symmetry and thus calculating every force only once. List is a facility
98 * for logging (and debugging). One can decide to print none or a set of
99 * selected parameters to the file specified by log. Parameters are
100 * printed by or-ing the corresponding items from t_listitem. A 0 (zero)
101 * specifies that nothing is to be printed on the file. The function
102 * returns the number of shifts over the ring to perform to calculate
106 extern void write_parm(FILE *log
,char *title
,int pid
,t_parm
*parm
);
107 /* Write parm for debugging */