From: T K (
Date: Thu Mar 20 2014 - 10:05:53 CDT

Hello Axel
Thank you for the quick replay, What I did was just save a LAMMPS restart
each time step I want to visualize and then loop over all the files and
load them into VMD, export them to file and animate that. but I think that
is very inefficient. I wonder if there is an option to group all of the
frames that I load into one molecule file, and how will VMD handle it that
each frame has a different number of bonds ?
Also one more thing that I cant figure out is why after the first frame
that I animate the atoms become colored red.
I attach my tcl script that I use to do this.
Thank you very much

display backgroundgradient on
for {set i 8000 ; set j 0 } {$j<1000} {incr i 628 ; incr j } {
  puts "I inside loop as $j"
  topo readlammpsdata data.${i} bond
  animate style Loop
  display resetview
  animate dup frame now $j
  mol rename $j {data.${i}}
  mol reanalyze $i
  mol color Name
  mol representation Lines
  mol selection all
  mol material Opaque
  mol addrep $j
  display resetview
  menu graphics off
  menu graphics on
  mol modstyle 0 $j VDW 0.500000 12.000000
  ##mol color Name
  mol representation VDW 2.500000 12.000000
  mol selection all
  mol material Opaque
  mol addrep $j
  mol modselect 1 $j type 2
  mol modstyle 1 $j VDW 4.000000 12.000000
##mol color Name
mol selection type 2
mol material Opaque
mol addrep $j
mol modstyle 2 $j Bonds 1.000000 12.000000
##mol color Name
mol representation Bonds 1.000000 12.000000
mol selection type 2
mol material Opaque
mol addrep $j
mol modselect 3 $j all
menu render off
menu render on
render snapshot vmdscene${j}.tga
  mol delete $j

On Sun, Mar 9, 2014 at 10:37 AM, Axel Kohlmeyer <> wrote:

> On Sun, Mar 9, 2014 at 7:52 AM, T K <> wrote:
> > Dear VMD mailing list
> > I am pretty new to using VMD so excuse me if this questions is a silly
> one.
> > I have a simulation with a changing number of bonds which I want to
> > visualize but cannot do so with DynamicBonds.
> why not?
> > My simulation is run on lammps
> > so what i tried to do is simple write a datafile withe write_data and
> then
> > loop over all the data files load them and create an imagefile,
> afterwards
> > to animate them using an external program. But I am guessing there is a
> much
> > easier way to do it completely in VMD ?
> depends. in general, VMD assumes that your bonds don't change. if they
> do, you have to use some tricks. those tricks usually require some
> tinkering and often some scripting, and not everything will work
> exactly as if your bonds would not change.
> you can also do the same kind of visualization from inside LAMMPS
> using the dump image command and automagically create an animation
> using dump movie. that is assuming that you do have bond information
> present, of course.
> > Hope you can help me, thank you !
> >
> > Taj
> --
> Dr. Axel Kohlmeyer
> College of Science & Technology, Temple University, Philadelphia PA, USA
> International Centre for Theoretical Physics, Trieste. Italy.