From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Aug 03 2004 - 14:57:35 CDT

Travis,
  There are numerous ways one could support a varying number of atoms
in a trajectory file or in a concatenation of PDB files for example,
but VMD will not read such files as its internal code cannot cope
with varying numbers of atoms. The only way to load structures with
differing atom counts into VMD is to load them as separate molecules.

To specifically address your question about DCD files, no, they don't
support a varying number of atoms, and neither do most other existing
binary trajectory file formats. XYZ files and concatenated PDB files
are the only two methods I'm aware of that one could do something like
this presently.

The main reason that the existing binary trajectory formats don't
allow changing numbers of atoms is because it would require re-saving
the structure data at each timestep, since there's no implied
connectivity if the atom indices are inconsistent from frame to frame,
thus making the files larger and somewhat unwieldy to work with.

All this being said, if you're really desperate to visualize
time-varying structures with changing atom counts, you could write
a Tcl script that loads frames into separate molecules in VMD, and
animates over the molecules rather than over the frames. This is done
by writing a script that loops over all molecules toggling their state
from off to on and then back to off, in sequence.

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Aug 03, 2004 at 12:43:51PM -0700, Travis DePuy wrote:
> Hello all.
>
> I have a simulation where the number of atoms
> change in each frame. I was hoping to use
> xyz files because they are nice and simple, but
> I am not sure if xyz supports a variable number
> of atoms from frame to frame. Does it?
>
> If not, does dcd? and does anyone know of an
> example of a dcd writer?
>
>
> Thanks
>
> Travis DePuy
>
>

-- 
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: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078