4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
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
34 * Green Red Orange Magenta Azure Cyan Skyblue
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), */
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.
77 read_eigval (char * fn
,