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 * Good ROcking Metal Altar for Chronical Sinners
33 static char *SRCID_princ_h
= "$Id$";
37 extern void pr_jacobi(real
**a
,int n
,real d
[],real
**v
,int *nrot
);
39 extern void rotate_atoms(int gnx
,atom_id index
[],rvec x
[],matrix trans
);
40 /* Rotate all atoms in index using matrix trans */
42 extern void principal_comp(int n
,atom_id index
[],t_atom atom
[],rvec x
[],
44 /* Calculate the principal components of atoms in index. Atoms are
45 * mass weighted. It is assumed that the center of mass is in the origin!
48 extern real
calc_xcm(rvec x
[],int gnx
,atom_id index
[],t_atom atom
[],rvec xcm
,
50 /* Calculate the center of mass of the atoms in index. if bQ then the atoms
51 * will be charge weighted rather than mass weighted.
52 * Returns the total mass/charge.
55 extern real
sub_xcm(rvec x
[],int gnx
,atom_id index
[],t_atom atom
[],rvec xcm
,
57 /* Calc. the center of mass and subtract it from all coordinates.
58 * Returns the original center of mass in xcm
59 * Returns the total mass
62 extern void add_xcm(rvec x
[],int gnx
,atom_id index
[],rvec xcm
);
63 /* Increment all atoms in index with xcm */