# [gmx-users] g_covar -ref

Tsjerk Wassenaar tsjerkw at gmail.com
Thu Mar 18 19:37:40 CET 2010

```Hi Vijaya,

I'm sorry if I didn't quite get that first sentence of yours. Did you
meant to start it with "I thought that ..."? Or were you trying to
explain me something you thought I missed?

PCA stands for 'principal component analysis', not 'covariance
analysis'. For instance, PCA can be applied to correlations, and then
is 'correlation analysis'. SVD is a particular flavour of PCA and here
yields the same results as traditional PCA because the covariance
matrix is symmetric, but otherwise they're not strictly the same. That
is to say, the SVD is obtained by extracting the eigenvectors from the
matrices transpose(S) x S and S x transpose(S). Which are quite
obviously identical if S is a symmetric matrix.

By the way, was your question regarding the -ref option answered, or
did the answer elude you? If the latter is the case, maybe if now you
feel sufficiently confident that I know a bit about PCA, you can go

Cheers,

Tsjerk

On Thu, Mar 18, 2010 at 7:01 PM, vijaya subramanian
<vijaya65 at hotmail.com> wrote:
> PCA refers to covariance analysis (though SVD gives the same results).
> Principal components are obtained by projecting the trajectory onto
>  the eigenvectors of the covariance matrix.
> I just wanted to know why the option -ref was offered and if it had any
> significance.
> Thanks
> Vijaya
>
>> Date: Thu, 18 Mar 2010 17:51:04 +0100
>> Subject: Re: [gmx-users] g_covar -ref
>> From: tsjerkw at gmail.com
>> To: gmx-users at gromacs.org
>>
>> Hi Vijaya,
>>
>> Well, to start with that will be something as calculating the
>> 'fluctuation' as sum((xi-ri)^2)/N, with xi and ri denoting the ith
>> atom of the conformation x and the reference structure r and the sum
>> is over time/observations. In the case of no variation in xi, the
>> value you get will still be finite, in stead of zero, as would
>> probably be most meaningful.
>> Now for the covariances, there's a bit more to it. The covariance is
>> the product moment of the deviations: sum((xi-ri)(xj-rj))/N. When
>> there is no correlation, the deviations about the mean are random and
>> average out to zero. But with the deviations against a reference, that
>> is not the case. So the results should be regarded meaningless, unless
>> you have a good reason for doing so, and come with a solid
>> justification. Okay, there may be a purpose, but I'll leave that to
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>> On Thu, Mar 18, 2010 at 5:33 PM, vijaya subramanian
>> <vijaya65 at hotmail.com> wrote:
>> > Hi
>> > Has anyone studied the effect of using different reference structures,
>> > not the average structure, when carrying out PCA.  Does it make sense to
>> > use
>> > a structure besides the average to calculate the covariance matrix?
>> > Thanks
>> > Vijaya
>> >
>> >
>> >
>> > ________________________________
>> > Hotmail: Trusted email with powerful SPAM protection. Sign up now.
>> > --
>> > gmx-users mailing list    gmx-users at gromacs.org
>> > http://lists.gromacs.org/mailman/listinfo/gmx-users
>> > Please search the archive at http://www.gromacs.org/search before
>> > posting!
>> > Please don't post (un)subscribe requests to the list. Use the
>> > www interface or send it to gmx-users-request at gromacs.org.
>> > Can't post? Read http://www.gromacs.org/mailing_lists/users.php
>> >
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>> post-doctoral researcher
>> Molecular Dynamics Group
>> Groningen Institute for Biomolecular Research and Biotechnology
>> University of Groningen
>> The Netherlands
>> --
>> gmx-users mailing list gmx-users at gromacs.org
>> http://lists.gromacs.org/mailman/listinfo/gmx-users
>> Please search the archive at http://www.gromacs.org/search before posting!
>> Please don't post (un)subscribe requests to the list. Use the
>> www interface or send it to gmx-users-request at gromacs.org.
>
> ________________________________
> now.
> --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at http://www.gromacs.org/search before posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
>

--
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
Groningen Institute for Biomolecular Research and Biotechnology
University of Groningen
The Netherlands

```