From: Axel Kohlmeyer (axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de)
Date: Sun Jul 24 2005 - 02:29:44 CDT

On Sat, 23 Jul 2005, David Kingsbury wrote:

hi dave,

DK> I'm running some MD simulations and want to have an on-the-fly
DK> coloration of KE. I thought it would be ingenius to place the KE
DK> values into the BETA field of a .pdb file, and watch it with VMD. So
DK> now I have a 10 frame .pdb file of some action where the ke in the
DK> beta field is changing every frame. I made sure to color by BETA, and
DK> to check the "update color every frame" in the trajeectory tab. VMD
DK> however is not updating the colors... it is just retaining frame 1's

yep, that is how the VMD works. all structure and other similar
information (bonds etc.) are only taken from the first frame
(or a supported topology files) and from the remaining frames
only the coordinates are taken.

DK> BETA coloring scheme. Does anyone have any suggestions to get this
DK> working? I have a feeling it my be a small fix, (or a bug?)

there are actually two ways to this (been there, done it, and got the
t-shirt ;-) ). either you store the data in the 'user' field (which
is per frame, unlike beta) and use the 'User' colorization scheme
or write a small function to be hooked into the animation loop
that updates the beta field according to your pre-calculated values.

please have a look at:
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part3.html#chap5_sect3
for an example of the first method and about one screen down at:
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part3.html#chap5_sect4
for an example of the second method.

in your case, you probably want to use the first method, but
then read the data from a separate file, like in the second example.

i also should have a VMD script example somewhere, that computes
an estimate of the instantaneous kinetic energy from within VMD
(from distance differences) and stores it directly into the user
field. unfortunately, i did not have the time to add it to
the tutorial pages yet, so let me know, if i should send it to you.

regards,
        axel.

DK> Thanks!
DK> -David B. Kingsbury
DK> College of Charleston
DK>
DK>

-- 
=======================================================================
Dr. Axel Kohlmeyer   e-mail: axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.