Re: [AMBER] distance to center of geometry

From: David Cerutti <>
Date: Tue, 16 Jan 2018 00:31:05 -0500

If you imaged the protein's center of geometry to the origin, you must have
written out the mask for it. The distance command will just need that mask
(looks like ':1-106' for a protein with 106 residues), and the mask for the
atom of interest (could say '.1500' if you know the absolute number, or
perhaps ':107.N' if you know it's the nitrogen of something like NH4+
residue 107). I haven't done this specific thing in awhile, but this is
explicitly how distance is supposed to work.

You might also try the 'vector mask <your mask>' command, applied once to
the protein and once to your atom of interest. Print out both vectors--it
should be easy to compare them to the trajectory to verify that you are
looking at what you think you want. Then you can look at the box
dimensions (just assume that the box isn't changing volume too much
throughout your simulation), and make your transformation matrices (harder
if you're working in an octahedral unit cell, but still formulaic),
transform both vectors into the fractional coordinate space of the unit
cell, find the minimum image distances at each time point, and translate
back. That's what cpptraj is supposed to do for you, but you will then
understand the math behind it and verify that you are getting the correct


On Mon, Jan 15, 2018 at 10:27 PM, Meng Wu <>

> Dear all,
> I want to calculate the distance between a atom and the center of geometry
> of a protein in MD trajectories. I have imaged the center of geometry to
> origin and tried ‘distance’ command in cpptraj, but I don’t know how to
> write mask of the center or the origin, could anybody give me some advices
> about this or other ways to get what I want? Thank you in advance!
> All the best,
> Meng Wu
> _______________________________________________
> AMBER mailing list
AMBER mailing list
Received on Mon Jan 15 2018 - 22:00:02 PST
Custom Search