From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Mar 08 2012 - 12:15:47 CST

Hi,
  Besides using awk, one could also do this easily with a short Tcl
script looping over the atoms in a selection to compute the same values.
The built-in measure commands don't currently have a mode to allow you
to compute each of the X, Y, or Z components independently, but if enough
people wanted such a feature it could be implemented. We've just never
had anyone ask for this before.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Mar 06, 2012 at 06:31:31PM -0800, Andrew Jewett wrote:
> I've no idea if you can do it from inside VMD, but once you have the
> two molecules superimposed in VMD, you can save the coordinates of the
> two structures (I recommend using XYZ format), paste them together
> into a single file, (using unix "paste" command), and then compute the
> x, y, or z component of the RMSD directly using awk.
>
> The commands would be something like:
>
> paste -d' ' file1.xyz file2.xyz | tail -n +3 > file12.dat
> awk '{if (NF==8) {n++; sumsq+=($2-$6)^2}} END{print(sqrt(sumsq/n))}' <
> file12.dat
>
> (I'm guessing this gives you the RMSD in the X component. For the Y
> and Z components, try sumsq+=($3-$7)^2, and sumsq+=($4-$8)^2)
>
> I hope this helps.
> Cheers
>
> Andrew
>
> On Tue, Mar 6, 2012 at 9:36 AM, patrick wintrode <pat_wde2_at_yahoo.com> wrote:
> >
> > Hi all.
> >
> > Is there a way to write out the x, y and z components of RMSD or RMSF
> > separately in VMD?
> >
> > Thanks.
> >
> > Patrick L. Wintrode
> > Associate Professor
> > Dept. of Pharmaceutical Sciences
> > University of Maryland School of Pharmacy

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/       Fax: 217-244-6078