Re: [AMBER] Distance calculation and distance matrix giving discrepant results

From: Daniel Roe <>
Date: Fri, 3 May 2019 12:14:29 -0400


The distances are in fact not imaged in the matrix command, which is
why when you use the 'noimage' keyword with the 'distance' command the
results match. This is actually not stated in the manual, but it
really, really should be (mea culpa).

The reason is largely historic - because ptraj didn't image distances,
when I rewrote the command I made this the default. There should
probably be an option to turn imaging on to be consistent with how
cpptraj handles other distance-related commands.

If you're using the distance matrix to explore internal structure
(i.e. you're interested with how far different parts of the molecule
are from parts in the same molecule), no imaging is probably what you

Hope this helps,


On Thu, May 2, 2019 at 12:26 PM Jonathan Huihui <> wrote:
> Hello,
> I have been getting different results for the distances between C-alpha atoms when I use the "distance" command and the "matrix dist" commands, and I'm not sure which set of values to believe.
> Here is what I'm using as commands (trying to see the end-to-end distance):
> >>distance Ree :1.CA :64.CA out Ree.dat
> >>matrix out Rij.dat name Rij byres .CA dist
> However, when I use "noimage" in the distance command, it returns a value that agrees with the matrix command.
> Furthermore, when I output the entire trajectory as a set of PDBs, and run separate analysis on those with my own code, it agrees with the matrix command results.
> I am running these analyses on trajectories that have been stripped of water and ions using these commands:
> >>autoimage
> >>strip :WAT,Cl-,Na+
> >>rms first .CA,C,N
> >>trajout output.mdcrd trajectory
> I am thinking that the trajectory already being "autoimaged" is what is causing this?
> Is there any additional information that is required?
> Thank you,
> Jonathan Huihui
> Graduate Student, University of Denver
> Department of Physics & Astronomy
> _______________________________________________
> AMBER mailing list

AMBER mailing list
Received on Fri May 03 2019 - 09:30:03 PDT
Custom Search