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_update_h
= "$Id$";
36 #ident "@(#) update.h 1.33 24 Jun 1996"
37 #endif /* HAVE_IDENT */
46 extern void update(int natoms
, /* number of atoms in simulation */
48 int homenr
, /* number of home particles */
50 real lambda
, /* FEP scaling parameter */
51 real
*dvdlambda
, /* FEP stuff */
52 t_inputrec
*ir
, /* input record with constants */
54 rvec x
[], /* coordinates of home particles */
57 rvec force
[],/* forces on home particles */
59 rvec vold
[], /* Old velocities */
60 rvec v
[], /* velocities of home particles */
61 rvec vt
[], /* velocity at time t */
62 tensor pressure
,/* instantaneous pressure tensor */
63 tensor box
, /* instantaneous box lengths */
74 extern void calc_ke_part(bool bFirstStep
,int start
,int homenr
,
75 rvec vold
[],rvec v
[],rvec vt
[],
76 t_grpopts
*opts
,t_mdatoms
*md
,
77 t_groups
*grps
,t_nrnb
*nrnb
,
78 real lambda
,real
*dvdlambda
);
80 * Compute the partial kinetic energy for home particles;
81 * will be accumulated in the calling routine.
84 * Ekin = SUM(i) 0.5 m[i] v[i] (x) v[i]
86 * use v[i] = v[i] - u[i] when calculating temperature
88 * u must be accumulated already.
90 * Now also computes the contribution of the kinetic energy to the
95 /* Routines from coupling.c to do with Temperature, Pressure and coupling
98 extern real
run_aver(real old
,real cur
,int step
,int nmem
);
100 extern void tcoupl(bool bTC
,t_grpopts
*opts
,t_groups
*grps
,
101 real dt
,real SAfactor
,int step
,int nmem
);
102 /* Compute temperature scaling factors */
104 extern real
calc_temp(real ekin
,int nrdf
);
105 /* Calculate the temperature */
107 extern void calc_pres(int eBox
,matrix box
,
108 tensor ekin
,tensor vir
,tensor pres
,real Elr
);
109 /* Calculate the pressure. Unit of pressure is bar, If Elr != 0
110 * a long range correction based on Ewald/PPPM is made (see c-code)
113 extern void do_pcoupl(t_inputrec
*ir
,int step
,tensor pres
,
114 matrix box
,int start
,int nr_atoms
,
115 rvec x
[],unsigned short cFREEZE
[],
116 t_nrnb
*nrnb
,ivec nFreeze
[]);
118 #endif /* _update_h */