From: Axel Kohlmeyer (akohlmey_at_vitae.cmm.upenn.edu)
Date: Tue Jan 03 2006 - 05:03:53 CST

On Mon, 2 Jan 2006, Chaitanya Krishna A wrote:

> Hi all,

hi chaitanya,

>
> I have the coordinates from an MD run. Now I want to look at an atom and all
> the atoms within a certain radius around the chosen atom.
>
> The problem is that in every time step the number of atoms in the sphere is
> different and when I give VMD something like the file below, it shows only two
> frames and 1 atom in each of the frame.
> file : tst.xyz
> 1
>
> O 1.0 1.0 1.0
> 2
>
> H 0.0 0.0 0.0
> H 1.0 1.0 1.0
> 2
>
> H 1.0 1.0 1.0
> O 2.0 2.0 2.0
>
> But I would like to see 1 atom in the first frame, 2 atoms in the second frame
> and again 2 atoms in the third frame. Is there any workaround for this problem.

no. by design VMD reads the number of atoms and the element assignment
only from the very first frame and reads only coordinates from the
rest, unless the format does not agree with the expected number of
atoms.

> I have been thinking for a while but couldn't figure out any solution. Also VMD
> also doesn't update the colors in every frame. Can we ask VMD to do this?

there are three ways to deal with your problem:

a) you can load the trajectory of the whole system into VMD
and use the VMD selection language to do the magic for you.
see the following URL for some rather elaborate examples:
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part4.html#chap6

b) you have to chop your trajectory into multiple files, load them as
separate molecules and use a script to display them subsequently. ex.:
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part7.html#chap9_sect5

c) use a different (less efficient) program, that does reparse the
molecule structure in each step. e.g. molden.

regards,
      axel.
>
> Regards,
> Chaitanya.

=======================================================================
Axel Kohlmeyer e-mail: akohlmey_at_cmm.upenn.edu, tel: ++1-215-898-1582
     Center for Molecular Modeling -- University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.