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