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