[gmx-users] cross correlations

Tsjerk Wassenaar tsjerkw at gmail.com
Sun Jun 19 12:46:48 CEST 2011


Of course you did... Though mind the brackets :)

C_ij = <x_i * x_j> / sqrt ( <x_i ^2> * <x_j^2> )

The point I want to make is that you can easily take the output from
g_covar -ascii and turn it into a correlation matrix. In R
(r-project.org) there is even a dedicated function for it:

x <- scan("covar.dat")
x <- matrix(x,sqrt(length(x)))
y <- cov2cor(x)
write(y,"correl.dat",ncolumns=3)

Cheers,

Tsjerk

On Sun, Jun 19, 2011 at 12:37 PM, Alexey Shvetsov
<alexxy at omrb.pnpi.spb.ru> wrote:
> Hi,
>
> Thats actualy that i did here [1]. Extracting coordinate for every atom in
> interesting two group and computing
>
> C_ij = <x_i * x_j> / sqrt ( x_i ^2 * x_j^2 ) assuming that x_i and x_j is
> vectors
>
>
> [1]
> http://omrb.pnpi.spb.ru/gitweb/?p=gromacs/gromacs.git;a=shortlog;h=refs/heads/alexxy/g_correl
> On Sun, 19 Jun 2011 12:27:53 +0200, Tsjerk Wassenaar wrote:
>>
>> Hey,
>>
>> The method from Lange is quite a different thing. It includes
>> non-linear correlations, which is interesting to look at for overall
>> correlation between atoms. If the ultimate goal is to do PCA on it,
>> then it will give you awkward components that will give you a hard
>> time trying to interpret.
>>
>> There is another way, besides using an external tool. Extract the
>> diagonal elements and take the square root of each. Then for each
>> element [i,j] in the matrix, divide by the elements i and j of these
>> square roots, and you'll have yourself a correlation matrix.
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>> On Sun, Jun 19, 2011 at 11:55 AM, Alexey Shvetsov
>> <alexxy at omrb.pnpi.spb.ru> wrote:
>>>
>>> Hi.
>>>
>>> There is two possibilitys
>>> 1. utility written by   Oliver F. Lange and Helmut Grubmüller [1] that
>>> compites
>>> general corelation coefficients
>>> 2. My utility that computes pearson correlation coefficients [2]
>>>
>>> [1]
>>>
>>>
>>> http://www.mpibpc.mpg.de/home/grubmueller/downloads/GeneralizedCorrelations/index.html
>>> [2]
>>>
>>>
>>> http://omrb.pnpi.spb.ru/gitweb/?p=gromacs/gromacs.git;a=shortlog;h=refs/heads/alexxy/g_correl
>>>
>>>
>>> On Fri, 17 Jun 2011 00:48:01 -0500, E. Nihal Korkmaz wrote:
>>>>
>>>> Dear all,
>>>>
>>>> Is there any built in function that gives me the pairwise correlation
>>>> of the fluctuation (unit vector between two coordinates of a residue)
>>>> of residues (averaged over the input trajectory). I tried g_covar but
>>>> thats not what im looking for. The result I want should be an NxN
>>>> matrix with values ranging from -1 to 1.
>>>>
>>>> Thanks in advance,
>>>> Nihal
>>>>
>>>> --
>>>> Elif Nihal Korkmaz
>>>>
>>>> Research Assistant
>>>> University of Wisconsin - Biophysics
>>>> Member of Qiang Cui & Thomas Record Labs
>>>> 1101 University Ave, Rm. 8359
>>>>  Madison, WI 53706
>>>>  Phone:  608-265-3644
>>>>  Email:   korkmaz at wisc.edu [1]
>>>>
>>>>
>>>>
>>>> Links:
>>>> ------
>>>> [1] mailto:korkmaz at wisc.edu
>>>
>>> --
>>> Best Regards,
>>> Alexey 'Alexxy' Shvetsov
>>> Petersburg Nuclear Physics Institute, Russia
>>> Department of Molecular and Radiation Biophysics
>>> Gentoo Team Ru
>>> Gentoo Linux Dev
>>> mailto:alexxyum at gmail.com
>>> mailto:alexxy at gentoo.org
>>> mailto:alexxy at omrb.pnpi.spb.ru
>>> --
>>> 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/Support/Mailing_Lists/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/Support/Mailing_Lists
>>>
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>> post-doctoral researcher
>> Molecular Dynamics Group
>> * Groningen Institute for Biomolecular Research and Biotechnology
>> * Zernike Institute for Advanced Materials
>> University of Groningen
>> The Netherlands
>
> --
> Best Regards,
> Alexey 'Alexxy' Shvetsov
> Petersburg Nuclear Physics Institute, Russia
> Department of Molecular and Radiation Biophysics
> Gentoo Team Ru
> Gentoo Linux Dev
> mailto:alexxyum at gmail.com
> mailto:alexxy at gentoo.org
> mailto:alexxy at omrb.pnpi.spb.ru
> --
> 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/Support/Mailing_Lists/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/Support/Mailing_Lists
>



-- 
Tsjerk A. Wassenaar, Ph.D.

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



More information about the gromacs.org_gmx-users mailing list