Re: [AMBER] : : timecorr

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Sun, 21 Jul 2013 10:02:32 -0600

Hi,

If you want to calculate a coordinate covariance matrix use either the
'matrix covar' or 'matrix mwcovar' (for mass-weighted) commands. If
you want to calculate a matrix of the correlation between atomic
positions (which is also called 'dynamic cross-correlation map) use
the 'matrix correl' command, which calculates matrix entries as:

Mij = (<ri * rj> - <ri><rj>) / sqrt( (<ri^2> - <ri>^2) * (<rj^2> - <rj>^2) )

See the AmberTools 13 manual for more information about these
commands. Hope this helps,

-Dan

On Sat, Jul 20, 2013 at 8:51 PM, Hongyi WU <why0713.sjtu.edu.cn> wrote:
> Daniel,
>
> Sorry for my terribly late reply...
> But how can I calculate the correlation between 2 vectors (e.g. 2 alpha
> carbons) over a period of time, which I think is to calculate the
> correlation between 2 matrix:
> {{x1(1),y1(1),z1(1)},{x1(2),y1(2),z1(2)},...,{x1(t),y1(t),z1(t)}}
> And
> {{x2(1),y2(1),z2(1)},{x2(2),y2(2),z2(2)},...,{x2(t),y2(t),z2(t)}}
>
>
>
> Hongyi
>
>
>
> -----ʼԭ-----
> : Daniel Roe [mailto:daniel.r.roe.gmail.com]
> ʱ: 201379 22:08
> ռ: AMBER Mailing List
> : Re: [AMBER] : timecorr
>
> Hi,
>
> The poorly-named 'crosscorr' command in CPPTRAJ will calculate the Pearson
> product moment correlation coefficients between 2 or more data sets. For
> example, using the input:
>
> parm ../tz2.parm7
> trajin ../tz2.nc
> distance d1 :2 :12
> radgyr rg :1-3 mass nomax
> crosscorr d1 rg out d1rg.dat
>
> You'll get a 2D matrix as output:
>
> #crosscorr_00002
> 1.000 1.000 0.0000
> 1.000 2.000 -0.3105
> 2.000 1.000 -0.3105
> 2.000 2.000 0.0000
>
> Here the first two numbers are the indices of the data sets (corresponding
> to the order you gave to the crosscorr command), so the first line reads
> 'correlation coefficient between data set 1 (d1) and data set 1 is 0.0 (of
> course it should actually be 1.0, but since we know that it's not actually
> calculated which is why it's reported as zero), the second is correlation
> between data set 1 (d1) and data set
> 2 (rg), etc.
>
> Note that the Pearson coefficient is also reported as part of output from
> the 'corr' command (which computes time correlation functions for non-vector
> data sets), e.g.:
>
> 1: [corr d1 rg out cross.dat ]
> CORR: 101 elements, max lag 101
> CORRELATION COEFFICIENT d1 to rg IS -0.3105
>
> Hope this helps,
>
> -Dan
>
> On Tue, Jul 9, 2013 at 6:34 AM, Hongyi WU <why0713.sjtu.edu.cn> wrote:
>> Dear David,
>>
>> Thanks for your answer.
>> But I get the definition of correlation from our text book, Molecular
>> Modeling Principles and Applications by Andrew R. Leach. And it's just
>> the same as Pearson correlation (or at least the mathematical form). I
>> have attached a screenshot of the definition to this letter.
>>
>>
>> -----ʼԭ-----
>> : David A Case [mailto:case.biomaps.rutgers.edu]
>> ʱ: 201379 20:03
>> ռ: AMBER Mailing List
>> : Re: [AMBER] timecorr
>>
>> On Tue, Jul 09, 2013, Hongyi WU wrote:
>>>
>>> The function timecorr in AmberTools 13 will return squared
>>> correlation r^2, right?
>>
>> No: the "time correlation" [C(t)] is unreleated to the Pearson
>> (linear) correlation function (which it sounds like you might be thinking
> of).
>> C(t) is normalized such that C(0)=1; it is not the square of anything.
>>
>> Apologies if I am misunderstanding your question.
>>
>> ..dac
>>
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
>
>
>
> --
> -------------------------
> Daniel R. Roe, PhD
> Department of Medicinal Chemistry
> University of Utah
> 30 South 2000 East, Room 201
> Salt Lake City, UT 84112-5820
> http://home.chpc.utah.edu/~cheatham/
> (801) 587-9652
> (801) 585-9119 (Fax)
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber



-- 
-------------------------
Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 201
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-9119 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun Jul 21 2013 - 09:30:02 PDT
Custom Search