From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Feb 09 2007 - 02:56:59 CST

Adrian,
  Yes, you can do this. Probably the easiest way to accomplish this
would be:
  1) load the trajectory XYZ into VMD
  2) Load the resultant force values into the per-atom-per-timestep
     "user" field
  3) Color by "user"
  4) use the VMD movie maker plugin to make your movie
and maybe even
  5) Extra credit for using the "draw multiple frames" feature
     in the trajectory tab to make a single still image that captures
     the interesting parts of your force/dynamics all at once.

Step 2) is the only part that's at all tricky, and a cheap sleazy
way of accomplishing it with very little script writing is to load your
XYZ file of resultant force vectors into a separate molecule, and
use the "$sel2 get { x y z }" commands to read them out, compute their
magnitude, and then store them into the original molecule's "user"
fields with something like "$sel 1 set user $magval". I'm omitting
the details of the loops over all of the frames, but the main thing
is getting the data into the user field of the first molecule where
you've got the MD trajectory loaded. I have a couple of scripts
that populate the "user" field with such values, if you need
one as a starting point to try out.

  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Feb 09, 2007 at 02:08:26PM +0800, Adrian Koh wrote:
> Hi,
>
> I know this been asked countless of times, but I couldn't seem to get
> the gist of it. I have a .xyz trajectory file (containing the positions
> of atoms for every frame, 250 frames in all). And I have another .xyz
> file (containing the atomic resultant forces on every atom, for the 250
> frames). Would I be able to combine the two files, request VMD to plot
> the positions of the atoms with the corresponding color codes based on
> the magnitude of the atomic resultant force, all in one single animation?
>
> How do I do it?
>
> Thanks!
>
>
> Best Regards,
> Adrian.
>
>
> --
> ----------------------------------------------------------------------
> This email is confidential and may be privileged. If you are not the
> intended recipient, please delete it and notify us immediately. Please do
> not copy or use it for any purpose, or disclose its contents to any other
> person. Thank you.
> ----------------------------------------------------------------------
>

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