From: Axel Kohlmeyer (
Date: Tue Jun 28 2011 - 12:14:19 CDT

hello nathan,

On Tue, Jun 28, 2011 at 12:34 PM, J. Nathan Scott
<> wrote:
> Hello VMD users,
> I have a Tcl script I wrote a while back to do some per-atom
> per-timestep coloring (based on previously calculated data) of water
> molecules around a residue of interest depending on the electric field
> they generate at a point in the protein. I have recently written a new
> program that analyzes my coordinate files and determines which water
> molecules are within a conic volume emanating from a residue in the
> protein for each frame in my trajectory. Essentially now I have a
> ASCII file with the resids of the water molecules contained within the
> conic volume, with each line of the file belonging to a single frame.
> What I would really like to do now is have the molecules within the
> conic volume represented using VDW, while all other waters would use
> CPK or anything else. The resids change each frame of course. Does
> this sound possible and/or practical? I suppose what I am really after
> is per-atom per-timestep representation. From what I can tell this
> doesn't seem to be built in to VMD, but I thought I'd ask here for
> advice before junking the idea. Being able to represent these waters
> within the conic volume differently would be of great aid in our
> analysis I think.

yes, you can do what you would like to do,
you just have to invert the procedure a little bit.

you can store per atom per time step data into
the (four) user fields and then use this information
to select atoms for a given representation.

a selection string "user == 1.0" should select
all atoms with a user value of 1.0. if you use this
for a VDW rep and "user != 1.0" for a CPK rep
and activate the "Update Selection Every Frame"
feature in the Trajectory tab, you should have
what you are looking for.

all that is left is to write a little bit of tcl scripting
that will read in your raw data, make selections
and assign the user values.


> --
> ----------
> J. Nathan Scott, Ph.D.
> Postdoctoral Fellow
> Department of Chemistry and Biochemistry
> Montana State University

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.