using topotools to view lammps output

Hi Axel and all, I have output a dumpfile from LAMMPS in the xyz format (dump.xyz, attached), which I wish to view using VMD. Of course, simply loading dump.xyz gives vmd no info on atom types and bonding. I know that Axel has a scripting tool to read in lammps topology files. I have attached my topology, i.e. ‘data’ file in lammps lingo, file (Polyisobutene.lammps05). When I open up the tcl prompt in vmd and attempt to read the lammps topology file, I get the following error:

% topo readlammpsdata Polyisobutene.lammps05
Info) parsing LAMMPS header.
Info) parsing LAMMPS Masses section.
-error readlammpsdata: unkown header line: 92 : BondBond Coeffs
-error readlammpsdata: cannot continue.
-1

I am guessing that topotools was not meant to deal with type II force fields? Bond/Bond correlations are parameterized for type II FFs, but are not necessary to view trajectories.

For those trying the same stunt, i.e. viewing LAMMPS/typeII force field output, here is a workaround that worked for me: by manually editing out typeII-specific parameters (BondBond, etc.) from the lammps topology file, I was able to run the topotools command without error. Polyisobutene.lammps05 is then loaded into VMD as a new molecule and the bonding looks perfect. However, what I really want to do is to view a movie of all 200 frames in dump.xyz and I was hoping that the ‘topo readlammpsdata’ would inform vmd of the topology info relevant to dump.xyz. My understanding of the readlammpsdata script was that it would allow me to view the dump.xyz file. Have I done something wrong or misunderstood anything? Thanks,
Chris

hi chris,

Hi Axel and all, I have output a dumpfile from LAMMPS in the xyz format
(dump.xyz, attached), which I wish to view using VMD. Of course, simply
loading dump.xyz gives vmd no info on atom types and bonding. I know that
Axel has a scripting tool to read in lammps topology files. I have attached
my topology, i.e. 'data' file in lammps lingo, file
(Polyisobutene.lammps05). When I open up the tcl prompt in vmd and attempt
to read the lammps topology file, I get the following error:

% topo readlammpsdata Polyisobutene.lammps05
Info) parsing LAMMPS header.
Info) parsing LAMMPS Masses section.
-error readlammpsdata: unkown header line: 92 : BondBond Coeffs
-error readlammpsdata: cannot continue.
-1

I am guessing that topotools was not meant to deal with type II force
fields? Bond/Bond correlations are parameterized for type II FFs, but are
not necessary to view trajectories.

i don't use class2 force fields and neither did anybody so far that was
asking for help with topotools, so it wasn't implemented, since it is
not as easy to add support for them compared to the other sections.
those parameters, as you clearly identified, are irrelevant for the
visualization.

For those trying the same stunt, i.e. viewing LAMMPS/typeII force field
output, here is a workaround that worked for me: by manually editing out
typeII-specific parameters (BondBond, etc.) from the lammps topology file,
I was able to run the topotools command without error.

ok.

Polyisobutene.lammps05 is then loaded into VMD as a new molecule and the
bonding looks perfect. However, what I really want to do is to view a movie
of all 200 frames in dump.xyz and I was hoping that the 'topo
readlammpsdata' would inform vmd of the topology info relevant to dump.xyz.
My understanding of the readlammpsdata script was that it would allow me to
view the dump.xyz file. Have I done something wrong or misunderstood
anything? Thanks,

you can do one of two things.

a) just load the .xyz trajectory "on top" of the newly created molecule
from topo readlammpsdata with "mol addfile dump.xyz"
if you want to get rid of the coordinates in the data file first,
type: animate delete top

b) write out the topology information stored in the data file into a .psf file
which can then subsequently be loaded (and faster) in combination with
any .xyz file for systems with the same topology. this even works from
the command line (on unix/linux) with vmd dump.psf dump.xyz
the .psf file - unlike the data file - does not contain any coordinate info.

cheers,
     axel.

p.s.: there were no files attached, i presume they were large and thus
got "shrubbed off" by the list processor.