From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Oct 04 2006 - 00:24:11 CDT

Hi,
  I'll have to take a look at this. The new version of the plugin
included with VMD 1.8.5 contains a number of changes by Marco Kalweit
which may relate to this, and so I'll have to look at it closely and
see what's going on with the index field and get back to you.
If you have a few LAMMPS trajectories you can post on the VMD public
project on BioCoRE, that would be great. I have a bit of a shortage
of LAMMPS test files, so the more files I have the better.

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Oct 03, 2006 at 09:49:23AM -0700, Lutz Maibaum wrote:
> Hello,
>
> yesterday I sent an email saying that the LAMMPS plugin might have a problem
> reading dump files in which the atoms are not sorted by ascending atom-id.
> Files of that form are generated when LAMMPS is running on more than one
> processor.
>
> I played around with the code for a little while, and for me the following
> patch to the function read_lammps_structure in lammpsplugin.c (and
> lammpspluginA.c) solves my problem:
>
> 158,164c158
> < if ((atomid <= 0) || (atomid > data->numatoms))
> < {
> < fprintf(stderr, "lammpsplugin) Error while reading structure from
> lammps dump file '%s': atomid %d is not in valid range [1,
> %d]\n",data->file_name, atomid, data->numatoms);
> < return MOLFILE_ERROR;
> < }
> <
> < atom = atoms + atomid - 1;
> ---
> > atom = atoms + i;
>
> I believe that in this function the atom type was not assigned to the atom-id,
> but just to an increasing index number. The above patch should fix that. I
> don't know anything about the vmd code, so maybe someone could look over this
> patch. If this works then the documentation should reflect the fact that the
> LAMMPS plugin also conserves the atom types, and not just the positions.
>
> Thanks,
>
> Lutz

-- 
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