From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed Jun 16 2010 - 13:01:21 CDT

On Wed, Jun 16, 2010 at 1:04 PM, Ardy Davari <ardydavari_at_gmail.com> wrote:
> Hi,
>
> Is it possible to color by speed of an atom using a charmm35 psf and dcd
> file? I came across the post attached below, and I am not sure how to do
> this in 1.8.7.

have you actually tried it? VMD hasn't changed in
that respect since john posted the message.

just create a script that loops over all frames,
computes the velocity and then stores it in a
user field and color by user. bingo!

cheers,
    axel.

>
> Best Regards,
>
> Ardy Davarifar
>
> ****Attached post ***
>
> Hi,
>   One can do that in the test versions of VMD 1.8.7 now, with a script,
> by querying the atom velocity components and drawing an arrow for each
> of the atoms of interest. The new velocity component keywords are
> "vx", "vy", and "vz". You can do something like:
>   set sel [atomselect top "index 1 to 5"]
>   set coords [$sel get { x y z }]
>   set velocities [$sel get { vx vy vz }]
> ...normalize the velocities to some scale...
> ...draw the arrow from the coordinate to an endpoint calculated by
>    adding the scaled velocity vector to the coordinate...
>
> See Axel's tutorial on various customized drawing commands,
> and dynamically updating graphics:
>   http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part7.html#chap9_sect1
>   http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part3.html#chap5_sect2
>
> You can also color by velocity in the new alpha versions of VMD 1.8.7.
>
> Cheers,
>   John Stone
>   vmd_at_ks.uiuc.edu
>
>
>

-- 
Dr. Axel Kohlmeyer    akohlmey_at_gmail.com
http://sites.google.com/site/akohlmey/
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.