69c6251ce6407ec1fc6d194fba8239853e447898
[alexxy/gromacs.git] / include / mshift.h
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
11  * 
12  * Copyright (c) 1991-1999
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
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)
20  * 
21  * Also check out our WWW page:
22  * http://md.chem.rug.nl/~gmx
23  * or e-mail to:
24  * gromacs@chem.rug.nl
25  * 
26  * And Hey:
27  * Good ROcking Metal Altar for Chronical Sinners
28  */
29
30 #ifndef _mshift_h
31 #define _mshift_h
32
33 static char *SRCID_mshift_h = "$Id$";
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 #ifdef HAVE_IDENT
40 #ident  "@(#) mshift.h 1.11 2/2/97"
41 #endif /* HAVE_IDENT */
42
43 #include "typedefs.h"
44
45 extern t_graph *mk_graph(t_idef *idef,int natoms,bool bShakeOnly,bool bSettle);
46 /* Build a graph from an idef description. The graph can be used
47  * to generate mol-shift indices.
48  * If bShakeOnly, only the connections in the shake list are used.
49  * If bSettle && bShakeOnly the settles are used too.
50  */
51 extern void done_graph(t_graph *g);
52 /* Free the memory in g */
53  
54 extern void p_graph(FILE *log,char *title,t_graph *g);
55 /* Print a graph to log */
56
57 extern void mk_mshift(FILE *log,t_graph *g,matrix box,rvec x[]);
58 /* Calculate the mshift codes, based on the connection graph in g. */
59
60 extern void shift_atom(t_graph *g,matrix box,rvec x[],rvec x_s[],atom_id ai);
61 /* Shift single atom ai */
62
63 extern void shift_x(t_graph *g,matrix box,rvec x[],rvec x_s[]);
64 /* Add the shift vector to x, and store in x_s (may be same array as x) */
65
66 extern void shift_self(t_graph *g,matrix box,rvec x[]);
67 /* Id. but in place */
68
69 extern void unshift_atom(t_graph *g,matrix box,rvec x[],rvec x_s[],atom_id ai);
70 /* Unshift single atom ai */
71
72 extern void unshift_x(t_graph *g,matrix box,rvec x[],rvec x_s[]);
73 /* Subtract the shift vector from x_s, and store in x (may be same array) */
74
75 extern void unshift_self(t_graph *g,matrix box,rvec x[]);
76 /* Id, but in place */
77
78 #endif  /* _mshift_h */