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$";
41 extern void rotate_atoms(int gnx,atom_id index[],rvec x[],matrix trans);
42 /* Rotate all atoms in index using matrix trans */
44 extern void principal_comp(int n,atom_id index[],t_atom atom[],rvec x[],
46 /* Calculate the principal components of atoms in index. Atoms are
47 * mass weighted. It is assumed that the center of mass is in the origin!
50 extern void orient_princ(t_atoms *atoms, int isize, atom_id *index,
51 int natoms, rvec x[], rvec *v, rvec *d);
52 /* rotates molecule to align principal axes with coordinate axes */
54 extern real calc_xcm(rvec x[],int gnx,atom_id *index,t_atom *atom,rvec xcm,
56 /* Calculate the center of mass of the atoms in index. if bQ then the atoms
57 * will be charge weighted rather than mass weighted.
58 * Returns the total mass/charge.
61 extern real sub_xcm(rvec x[],int gnx,atom_id *index,t_atom atom[],rvec xcm,
63 /* Calc. the center of mass and subtract it from all coordinates.
64 * Returns the original center of mass in xcm
65 * Returns the total mass
68 extern void add_xcm(rvec x[],int gnx,atom_id *index,rvec xcm);
69 /* Increment all atoms in index with xcm */