changed reading hint
[gromacs/adressmacs.git] / src / tools / cmat.h
blob30c7cd85a722dcb48ec5901b84ac166e569b2741
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
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
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)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Great Red Oystrich Makes All Chemists Sane
30 #ifndef _cmat_h
31 #define _cmat_h
33 static char *SRCID_cmat_h = "$Id$";
35 #include "typedefs.h"
37 typedef struct {
38 int i,j;
39 real dist;
40 } t_dist;
42 typedef struct {
43 int conf,clust;
44 } t_clustid;
46 typedef struct {
47 int n1,nn;
48 int *m_ind;
49 bool b1D;
50 real emat,maxrms,sumrms;
51 real *erow;
52 real **mat;
53 } t_mat;
55 /* The matrix is indexed using the matrix index */
56 #define EROW(m,i) m->erow[i]
58 extern real **mk_matrix(int n1,bool b1D);
60 extern void done_matrix(int n1,real ***m);
62 extern t_mat *init_mat(int n1,bool b1D);
64 extern void enlarge_mat(t_mat *m,int deltan);
66 extern void reset_index(t_mat *m);
68 extern void swap_rows(t_mat *m,int isw,int jsw);
70 extern void set_mat_entry(t_mat *m,int i,int j,real val);
72 extern void done_mat(t_mat **m);
74 extern real row_energy(int n1,int row,real *mat,int m_ind[]);
76 extern real mat_energy(t_mat *mat);
78 extern void swap_mat(t_mat *m);
80 extern void low_rmsd_dist(char *fn,real maxrms,int nn,real **mat);
82 extern void rmsd_distribution(char *fn,t_mat *m);
84 extern t_clustid *new_clustid(int n1);
86 #endif