Version bump to 4.0.7
[gromacs.git] / src / tools / eigio.h
blob8c772c08edf4f215b8b22d2cc32bc64e657405c2
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 3.2.0
11 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
12 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
13 * Copyright (c) 2001-2004, The GROMACS development team,
14 * check out http://www.gromacs.org for more information.
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * For more info, check our website at http://www.gromacs.org
33 * And Hey:
34 * Green Red Orange Magenta Azure Cyan Skyblue
37 #ifndef _eigio_h
38 #define _eigio_h
40 #include "typedefs.h"
42 enum { eWXR_NO, eWXR_YES, eWXR_NOFIT };
44 extern void read_eigenvectors(char *file,int *natoms,bool *bFit,
45 rvec **xref,bool *bDMR,
46 rvec **xav,bool *bDMA,
47 int *nvec, int **eignr, rvec ***eigvec, real **eigval);
48 /* Read eigenvectors from file into eigvec, the eigenvector numbers */
49 /* are stored in eignr. */
50 /* When bFit=FALSE no fitting was used in the covariance analysis. */
51 /* xref is the reference structure, can be NULL if not present. */
52 /* bDMR indicates mass weighted fit. */
53 /* xav is the average/minimum structure is written (t=0). */
54 /* bDMA indicates mass weighted analysis/eigenvectors. */
56 extern void write_eigenvectors(char *trnname,int natoms,real mat[],
57 bool bReverse,int begin,int end,
58 int WriteXref,rvec *xref,bool bDMR,
59 rvec xav[],bool bDMA, real *eigval);
60 /* Write eigenvectors in mat to a TRN file. */
61 /* The reference structure is written (t=-1) when WriteXref=eWXR_YES. */
62 /* When WriteXref==eWXR_NOFIT a zero frame is written (t=-1), */
63 /* with lambda=-1. */
64 /* bDMR indicates mass weighted fit. */
65 /* The average/minimum structure is written (t=0). */
66 /* bDMA indicates mass weighted analysis/eigenvectors. */
67 /* eigenvectors with begin <= num <= end are written (num is base-1), */
68 /* the timestamp of eigenvector num is num. */
69 /* If bReverse==TRUE, num=1 is the last vector in mat. */
72 /* Read up to nmax eigenvalues from file fn, store the values in eigval[],
73 * and the corresponding indices (start counting on 0) in eigvalnr[].
74 * Returns the number of values read.
76 int
77 read_eigval (char * fn,
78 int nmax,
79 int eigvalnr[],
80 real eigval[]);
82 #endif