# [gmx-users] eigenvalues and number of frames

Anton Feenstra feenstra at chem.vu.nl
Thu Apr 4 11:54:02 CEST 2002

```Jose D Faraldo-Gomez wrote:
>
> Hi
>
> Can anyone explain to me why when I use g_covar to build the covariance
> matrix and obtain the corresponding eigenvalues, the number of (clearly)
> non-zero eigenvalues appear to depend on the number of frames read (if this
> is smaller than 3N)?

Yes, at least in a kind of hand-waving fashion. For a mathematical
explanation you will have to get that from someone else....

You can think of the set of eigenvectors (and corresponding
eigenvalues) as a set of difference vectors beteween extreme
conformations. Obviously, there are only so many differences
between so many conformations, so you will only have as many
non-zero eigenvalues as there are conformations (or, actually
one less, I think).

As an example you can take a two-frame trajectory: in that case
one single eigenvector will describe all differences exactly.
The other eigenvalues therefore will be zero.

It also might help to consider that when you are looking at
eigenvector # 100 or so, you are talking about very tiny differences
in coordinates (as you can see from the small eigenvalue: 1e-5,
which relates to the mean square displacement). In principle you
are correct in saying that once constructed the matrix should be
independent on the number of frames used, but that is only true
for a 'large' number of frames, otherwise you are missing out on
these small differences...

Since reading the frames is the least time consuming part of
running g_covar, I always tend to take as many frames as possible,
at least several 1000...

--
Groetjes,

Anton
________ ___________________________________________________________
|        | Anton Feenstra                                            |
| .      | Dept. of Pharmacochemistry - Free University Amsterdam    |
| |----  | De Boelelaan 1083 - 1081 HV Amsterdam - The Netherlands   |
| |----  | Tel: +31 20 44 47608 - Fax: +31 20 44 47610               |
| ' __   | Feenstra at chem.vu.nl - http://www.chem.vu.nl/afdelingen/FAR|
|  /  \  |-----------------------------------------------------------|
| (    ) | Dept. of Biophysical Chemistry - University of Groningen  |
|  \__/  | Nijenborgh 4 - 9747 AG Groningen - The Netherlands        |
|   __   | Tel +31 50 363 4327 - Fax +31 50 363 4800                 |
|  /  \  | K.A.Feenstra at chem.rug.nl - http://md.chem.rug.nl/~anton   |
| (    ) |-----------------------------------------------------------|
|  \__/  | "Shake Yourself" (YES)                                    |
|________|___________________________________________________________|

```