From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed May 11 2011 - 19:58:38 CDT

laura,

On Wed, May 11, 2011 at 8:17 PM, Adkins, Laura R <adkinsl_at_alfred.edu> wrote:
> I apologize if this issue has been addressed previously (in a way accessible to a non-expert programmer) and would be happy to be directed to any previous discussion.
>
> That said, I'm using VMD to run DLPOLY2 history files, and I've reassigned the names of the atoms in different timesteps to reflect their coordination within the system.  For example, some of the oxygen is relabeled as iron in various timesteps of the run.  I want these atoms to change color, throughout the trajectory run.
>
> I've tried using 'update every frame' but it doesn't work.  I've tried coloring the atoms by name (first letter of the atom), and element.  When I used element, all the atoms were the same color.  So I converted the file to XYZ format, and when I used element as the coloring method again, I got diverse colors, as appropriate.  Still, the atoms did not change color when the ID changed with the timestep.

this has been discussed a lot of times on the list. one of the basic
assumptions of VMD is that
atoms _don't_ change their name/element/type and so on.

if you want to have colors change over the course of a trajectory some
tcl script hacking will be required
or there may be some limitations as to what can be done or how this
can be implemented.
since you have generated an .xyz format the "cheapest" approach is
probably to use

topo readvarxy yourfile.xyz

this will read the .xyz file through a tcl script and then make a
table of how many atoms of which
type will be shown over the whole trajectory and then create an empty
system/molecule that can
hold all of them at the same time and then reorder the atom positions
for each frame to match the
defined atoms types. this way changing elements or a changing number
of atoms can be handled,
however, the downside is, that the order of atoms will change and thus
bonds cannot be displayed
(unless you use the dynamic bonds representation).

other options require some more tcl scripting, for which you find
examples discussed here:
http://sites.google.com/site/akohlmey/redirect/cpmd-vmd.pdf

cheers,
    axel.

>
> When I isolate timesteps to input them into VMD separately, the atom colors clearly correlate with the atom identities as they vary, but I'm dealing with 600 frames, and don't relish the task of sorting through the resultant files.
>
> Thanks,
> Laura Adkins
> /AdkinsL_at_alfred.edu
>
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.