3382cca1c70efd0c482f9b685b6b71503898b3ad
[alexxy/gromacs.git] / include / do_fit.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 _do_fit_h
31 #define _do_fit_h
32
33 static char *SRCID_do_fit_h = "$Id$";
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 #ifdef HAVE_IDENT
40 #ident  "@(#) do_fit.h 1.8 2/2/97"
41 #endif /* HAVE_IDENT */
42 extern real calc_similar_ind(bool bRho,int nind,atom_id *index,real mass[],
43                              rvec x[],rvec xp[]);
44 /* Returns RMSD or Rho (depending on bRho) over all atoms in index */
45
46 extern real rmsdev_ind(int nind,atom_id index[],real mass[],
47                        rvec x[],rvec xp[]);
48 /* Returns the RMS Deviation betweem x and xp over all atoms in index */
49
50 extern real rmsdev(int natoms,real mass[],rvec x[],rvec xp[]);
51 /* Returns the RMS Deviation betweem x and xp over all atoms */
52
53 extern real rhodev_ind(int nind,atom_id index[],real mass[],rvec x[],rvec xp[]);
54 /* Returns size-independent Rho similarity parameter over all atoms in index
55  * Maiorov & Crippen, PROTEINS 22, 273 (1995).
56  */
57  
58 extern real rhodev(int natoms,real mass[],rvec x[],rvec xp[]);
59 /* Returns size-independent Rho similarity parameter over all atoms
60  * Maiorov & Crippen, PROTEINS 22, 273 (1995).
61  */
62
63 extern void do_fit(int natoms,real *w_rls,rvec *xp,rvec *x);
64 /* Do a least squares fit of x to xp. Atoms which have zero mass
65  * (w_rls[i]) are not take into account in fitting.
66  * This makes is possible to fit eg. on Calpha atoms and orient
67  * all atoms. The routine only fits the rotational part,
68  * therefore both xp and x should be centered round the origin.
69  */
70
71 extern void reset_x(int ncm,atom_id ind_cm[],
72                     int nreset,atom_id *ind_reset,rvec x[],real mass[]);
73 /* Put the center of mass of atoms in the origin.
74  * The center of mass is computed from the index ind_cm.
75  * When ind_reset!=NULL the coordinates indexed by ind_reset are reset.
76  * When ind_reset==NULL the coordinates up to nreset are reset.
77  */
78
79 #endif  /* _do_fit_h */