From: JhonY. I. (yijhon_at_hotmail.com)
Date: Mon Nov 15 2010 - 20:29:49 CST

I'd like to know details on how color assignment to atoms according to atomic stress can be done.
I've found a following anwer in VMD mail list.
 
 
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.

 
1. Here, I think that "$sel2 get { x y z }, $sel 1 set user $magval" might be mistyped since there is no description for $sel2 in "$sel 1 set user $magval".
Are these commands correct? Would you explain the meaning of the second command, please?
 
2. I succeeded in demonstrating the motion of system using dcd and psf files in VMD.
I've made a file for atomic stress in which three columns are given and the second column describes atomic stress for a atom corresponding to line number.

Would you let me know what I should do for it in detail to assign color assignment to atoms for all of the frames, please?
If there is a document or a script for it, would you send it to me, please?
 
3. Incidentally asking, when we open a dialogue to load a new file, the starting directory is VMD directory.
Can we change this default directory to another directory such as a directory from which we've loaded the a most recently?
 

Best regards,
 
  Luke