changed reading hint
[gromacs/adressmacs.git] / include / init.h
blob06f0fad660d442cd311ec5ed39f4c904e228efbb
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
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
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Good ROcking Metal Altar for Chronical Sinners
30 #ifndef _init_h
31 #define _init_h
33 static char *SRCID_init_h = "$Id$";
35 #ifdef HAVE_IDENT
36 #ident "@(#) init.h 1.13 11/23/92"
37 #endif /* HAVE_IDENT */
39 #include <stdio.h>
40 #include "typedefs.h"
41 #include "mvdata.h"
42 #include "nsb.h"
44 typedef enum
46 LIST_SCALARS =0001,
47 LIST_PARM =0002,
48 LIST_TOP =0004,
49 LIST_X =0010,
50 LIST_V =0020,
51 LIST_F =0040,
52 LIST_LOAD =0100
53 } t_listitem;
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,
61 t_nsborder *nsb);
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
103 * all interactions.
106 extern void write_parm(FILE *log,char *title,int pid,t_parm *parm);
107 /* Write parm for debugging */
109 #endif /* _init_h */