[gmx-users] Correlation Matrix Calculation
Arneh Babakhani
ababakha at mccammon.ucsd.edu
Thu Sep 6 15:23:39 CEST 2007
Hi Tsjerk, yes I did make a mistake in the group that I chose . . . should
be C-alpha. Anyway, thanks for the help, appreciate it,
Arneh
> Hi Arneh,
>
> I think this has been covered on the mailing list before. But anyway,
> the number indeed refers to the atom index number, running from 1-N.
> You mean that you have 1934427 X 3 elements in the covar.dat file? So
> that corresponds to sqrt( 1934427 X 3 ) / 3 = 803 atoms. I think you
> made a mistake with the group you chose (Protein rather than
> c-alpha?). You would expect to have 90000 elements for a system of 100
> atoms.
>
> Hope it helps,
>
> Tsjerk
>
> On 9/5/07, Arneh Babakhani <ababakha at mccammon.ucsd.edu> wrote:
>> Thanks Tsjerk,
>>
>> One other question, regarding the covar.dat file (the covariance matrix
>> that's outputted when using the -ascii flag):
>>
>> I dont' quite understand the format of it. In the manual, it states:
>> "The order of the elements is: x1x1, x1y1, x1z1, x1x2, ..."
>>
>> Does "1" and "2" refer to the particles in the group? I'm asking b/c my
>> particular covar.dat file is of dimmensions 1934427 X 3 , for a group of
>> about 100 atoms and a traj of 1 NS. Just trying to make sense out of it
>> . . .
>>
>> Thanks,
>>
>> Arneh
>>
>>
>>
>> Tsjerk Wassenaar wrote:
>> > Hi Arneh,
>> >
>> > Yes. As you should be able to recall, the (linear, not "generalized")
>> > correlation is formally given as:
>> >
>> > cor(x,y) = cov(x,y) / ( sqrt(var(x))*sqrt(var(y)) )
>> >
>> > The diagonal elements of the covariance matrix give the variances...
>> >
>> > Cheers,
>> >
>> > Tsjerk
>> >
>> > On 8/31/07, Arneh Babakhani <ababakha at mccammon.ucsd.edu> wrote:
>> >
>> >> Sorry for the confusion . I want the correlation. So I can just use
>> >> g_covar to get the covar. matrix, and divide each term by what you
>> stated,
>> >> to get the correlation matrix? (if I follow you correctly).
>> >>
>> >> Thanks,
>> >>
>> >>
>> >>> Hi Arneh,
>> >>>
>> >>> You're not clear on what you want. Is it a covariance matrix or a
>> >>> correlation matrix. Correlation and covariance are different things.
>> >>> g_covar lets you write out a covariance matrix using the option
>> >>> -ascii. In case you want the correlation matrix (though IIRC Karplus
>> >>> also used the covariance matrix), you have to divide each element
>> m_ij
>> >>> by sqrt(m_ii)*sqrt(m_jj).
>> >>>
>> >>> Cheers,
>> >>>
>> >>> Tsjerk
>> >>>
>> >>> On 8/31/07, Arneh Babakhani <ababakha at mccammon.ucsd.edu> wrote:
>> >>>
>> >>>> Can anyone briefly recommend a procedure for calculating the
>> correlation
>> >>>> matrix (not the diagonalized covariance matrix, as done by g_covar)
>> of a
>> >>>> specified group?
>> >>>>
>> >>>> In particular, I'm looking to calculate the covariance matrix, as
>> >>>> specifed
>> >>>> in the Karplus paper (Proteins: Vol 11:205-217, 1991), where each
>> entry
>> >>>> of
>> >>>> the matrix is defined as the correlation between the i-th and j-th
>> atom:
>> >>>>
>> >>>> c_ij = <delta r_i> <delta r_j>
>> >>>>
>> >>>> where delta r is the deviation of i from its average position,
>> averaged
>> >>>> over the ensemble.
>> >>>>
>> >>>> Or, is there a way to use g_covar and suppress the diagonalization
>> step,
>> >>>> so as to obtain only the translation correlation matrix??? (I
>> couldn't
>> >>>> find anything to this effect in the manual).
>> >>>>
>> >>>> Much thanks,
>> >>>>
>> >>>> Arneh
>> >>>>
>> >>>> _______________________________________________
>> >>>> gmx-users mailing list gmx-users at gromacs.org
>> >>>> http://www.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.
>> >>> Junior UD (post-doc)
>> >>> Biomolecular NMR, Bijvoet Center
>> >>> Utrecht University
>> >>> Padualaan 8
>> >>> 3584 CH Utrecht
>> >>> The Netherlands
>> >>> P: +31-30-2539931
>> >>> F: +31-30-2537623
>> >>>
>> >>>
>> >>
>> >
>> >
>> >
>>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
> Junior UD (post-doc)
> Biomolecular NMR, Bijvoet Center
> Utrecht University
> Padualaan 8
> 3584 CH Utrecht
> The Netherlands
> P: +31-30-2539931
> F: +31-30-2537623
> _______________________________________________
> gmx-users mailing list gmx-users at gromacs.org
> http://www.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
>
More information about the gromacs.org_gmx-users
mailing list