From: John Stone (
Date: Wed Sep 15 2004 - 17:56:07 CDT

  At present there's no easy way of doing this in VMD, as VMD
assumes that the atom types remain constant over the course of a
simulation. VMD also requires that number of atoms remain constant
over the course of an MD trajectory, which is another assumption that
may not hold for the type of simulations you're doing. Can you double
check that your XYZ file follows the format described on this page:

I've thought about your problem a bit over the last couple days, and
I think that the only reasonable way to get your atoms colored appropriately
is probably going to involved writing scripts to parse your XYZ files for
the atom species data you store there and then modifyin the
per-frame-per-atom "User" attribute for each atom, and setting the
rep to be colored by "User" rather than by atom type. This solves
the coloring parts of your problem, but still does not address
whether the number of atoms per timestep is changing. That's a
harder problem to solve. I've attached a simple example script that
sets the "User" attribute for an atom selection so you can see how
that is done.

I'll be away from email until Sunday, but I hope this is helpful in
the mean time.

  John Stone

On Wed, Sep 08, 2004 at 08:59:11AM +0100, Oliver Lanning wrote:
> Hi,
> I have been using vmd to display the atom positions from an MD run, using
> the xyz format. With vmd 1.8.1 I could read in a number of frames and
> play them. In the file at the top I had the number of atoms in each frame
> and the number of frames, then for each frame I had a comment line, then
> the list of atoms for that frame with each line consisting of an atom
> identity and their xyz coordinates. However, during the run the identity
> of some of the atoms changes, I am visualising the first coordination
> sphere for an atom and am interested in the change of the species in this
> shell. It turns out that vmd, whilst reading in the new xyz data at each
> frame does not read in the ion identity, so the color stays as it was in
> the first frame. Is there any way to solve this problem? With vmd 1.8.2 I
> cannot get the program to read in more than 1 frame.
> many thanks,
> Oliver Lanning
> --------------------------------------------------------------------------
> Oliver Lanning
> The Queen's College Physical and Theoretical Chemistry Lab
> High Street South Parks Road
> Oxford Oxford
> OX1 4AW OX1 3QZ

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349              
  WWW:      Fax: 217-244-6078