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
33 static char *SRCID_random_h = "$Id$";
40 #ident "@(#) random.h 1.5 12/16/92"
41 #endif /* HAVE_IDENT */
45 extern real gauss(real am, real sd, int *ig);
46 /* Generate a gaussian number with:
47 * am = center of the distribution
48 * sd = standard deviation
49 * ig = the random number seed.
52 extern int make_seed(void);
53 /* Make a random seed: (time+getpid) % 1000000 */
55 extern real rando(int *ig);
56 /* Generate a random number 0 <= r < 1. ig is the (address of) the
60 extern void grp_maxwell(t_block *grp,real tempi[],int nrdf[],int seed,
61 t_atoms *atoms,rvec v[]);
62 /* Generate for each group in grp a temperature.
63 * When seed = -1, set the seed to make_seed.
66 extern void maxwell_speed(real tempi,int nrdf,int seed,
67 t_atoms *atoms, rvec v[]);
68 /* Generate velocites according to a maxwellian distribution */
70 extern real calc_cm(FILE *log,int natoms,real mass[],rvec x[],rvec v[],
71 rvec xcm,rvec vcm,rvec acm,matrix L);
72 /* Calculate the c.o.m. position, velocity, acceleration and the
73 * moment of Inertia. Returns the total mass.
76 extern void stop_cm(FILE *log,int natoms,real mass[],rvec x[],rvec v[]);
78 #endif /* _random_h */