On Thu, Jun 4, 2015 at 11:44 AM, Gard Nelson <Gard.Nelson.nantbio.com>
wrote:
>
> That makes perfect sense. For some reason, I was thinking that instead of
> an average, the "matrix dist" command would produce an M x N x S matrix,
> where M and N are the atom indicies and S is the number of steps. Given
> that that isn't how the "correl" command behaves, I should have known
> better. Out of curiosity, is there any way to write such a distance matrix
> (M x N x S) from cpptraj?
>
Unfortunately no, although you could probably script something up using
multiple 'distance' commands (or if you like python you could try using
pytraj, a python front-end to cpptraj: https://github.com/pytraj/pytraj).
> Based on my (hurried) reading of the code, the "matrix correl" command
> seems to be calculating the same formula found on Wikipedia for the Pearson
> product-moment, (rhoX,Y = <(X - uX)(Y - uY)> / (sigmaX * sigmaY)) but
> between frames instead of between datasets as you explained. Is that
> correct? Is "dynamic cross correlation" referring to the Pearson
> product-moment, or is there some subtlety I'm missing? My googling hasn't
> returned much for it...
>
It's actually calculating a normalized covariance matrix, where each matrix
element is the normalized covariance between atomic vectors Vi and Vj:
Mij = (<Vi * Vj> - <Vi> * <Vj>) / sqrt( (<Vi^2> - <Vi>^2)(<Vj^2> - <Vj>^2) )
See this publication for an early example of its use and definition:
http://www.ncbi.nlm.nih.gov/pubmed/7563068
-Dan
>
> Thanks for your help,
> gard
>
>
> -----Original Message-----
> From: Daniel Roe [mailto:daniel.r.roe.gmail.com]
> Sent: Thursday, June 04, 2015 9:01 AM
> To: AMBER Mailing List
> Subject: Re: [AMBER] cpptraj crosscorr command
>
> Hi,
>
> This is a case of the error message in cpptraj being woefully inadequate.
> The 'crosscorr' command (another terribly named command, I'm on a roll
> today) calculates the Pearson product-moment correlation coefficients
> between 1D data sets and puts them in a matrix. So if you have 3 1D data
> sets (from e.g. the distance command) named d1, d2, and d3 you would get a
> matrix like so:
>
> --- d1%d2 d1%d3
> --- --- d2%d3
> --- --- ---
>
> where % in this case denotes the correlation calculation. Since you're
> only giving it 1 data set there's nothing to calculate correlation to (and
> if you did give it more data sets I suspect the code would segfault). The
> 'matrix correl' command calculates a "dynamic cross correlation matrix",
> the elements of which are the normalized covariance between atomic vectors.
> In contrast, the elements of a distance matrix are simply the average
> distance between the two atoms.
>
> Hope this clears some things up, let me know if you have more questions.
> Thanks also for the report, cpptraj should do a better job trapping and
> giving information about this issue.
>
> -Dan
>
>
> On Wed, Jun 3, 2015 at 5:53 PM, Gard Nelson <Gard.Nelson.nantbio.com>
> wrote:
>
> > Hi everyone,
> >
> > I’m sure there is something very basic that I’m missing, but for the
> > life of me, I can’t figure out what it is. I want to run the crosscorr
> > analysis and have tried every permutation of the following that I can
> think of.
> >
> > parm …
> > trajin …
> >
> > matrix name dstmtx dist <mask1> <mask2> go runanalysis crosscorr
> > dstmtx out crosscorr.dat
> >
> > Regardless of what I do, cpptraj tells me that the size of
> > crosscorr_00001 is zero and the output file isn’t written.
> >
> > The point of this is to determine the difference (if any) between
> > running crosscorr on a distance matrix, and running the “matrix correl”
> command?
> > Any explanations adding to what’s contained in the manual would be
> > appreciated.
> >
> > Thanks,
> > gard
> > CONFIDENTIALITY NOTICE
> > This e-mail message and any attachments are only for the use of the
> > intended recipient and may contain information that is privileged,
> > confidential or exempt from disclosure under applicable law. If you
> > are not the intended recipient, any disclosure, distribution or other
> > use of this e-mail message or attachments is prohibited. If you have
> > received this e-mail message in error, please delete and notify the
> sender immediately.
> > Thank you.
> > _______________________________________________
> > 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 307
> Salt Lake City, UT 84112-5820
> http://home.chpc.utah.edu/~cheatham/
> (801) 587-9652
> (801) 585-6208 (Fax)
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
> CONFIDENTIALITY NOTICE
> This e-mail message and any attachments are only for the use of the
> intended recipient and may contain information that is privileged,
> confidential or exempt from disclosure under applicable law. If you are not
> the intended recipient, any disclosure, distribution or other use of this
> e-mail message or attachments is prohibited. If you have received this
> e-mail message in error, please delete and notify the sender immediately.
> Thank you.
> _______________________________________________
> 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 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jun 04 2015 - 11:30:03 PDT