From: Axel Kohlmeyer (
Date: Tue Apr 24 2007 - 09:21:45 CDT

On Tue, 24 Apr 2007, Ignacio Fernández Galván wrote:

IFG> Hi all,

hi ignacio,

IFG> I have a trajectory (actually, a set of configurations) in a xyz file,
IFG> where the number of atoms in each structure is different, and I would
IFG> like to display them in some kind of movie. According to this message

check out the new VMD 1.8.6 release. we managed to put in
a small GUI for that at the very last minute.

IFG> (<>), I
IFG> could load each structure in a separate molecule, but when I tried the
IFG> scripts in this page
IFG> (<>),
IFG> with something like:
IFG> for {set i 0} {$i < 15} {incr i} {
IFG> mol new "" first $i last $i
IFG> }
IFG> VMD didn't want to read the structures in frames after the first (it
IFG> created molecules with 0 frames). Can it be made to work? I don't want
IFG> to have each frame in a different file...

no. this is not yet doable. the xyz plugin does not track
the number of atoms when skipping over lines.

but splitting the existing file into parts is not that difficult.
please have a look at the attached perl script (took only a couple
of minutes to write...).

just run: perl

and then in the VMD console

foreach f [lsort [glob split*.xyz]] {
    mol new $f type xyz waitfor all



p.s.: please let us know how well it works so that we can add
this to the MultiMolAnim plugin documentation. thanks. a.

IFG> Thanks a lot
IFG> ___________________________________________________________
IFG> Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
IFG> now.

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.