VMD-L Mailing List
From: Lutz Maibaum (maibaum_at_berkeley.edu)
Date: Tue Oct 03 2006 - 11:49:23 CDT
- Next message: Cesar Millan: "save coordinates after moving them."
- Previous message: Francesco Iori: "PME units"
- In reply to: Lutz Maibaum: "Possible bug in LAMMPS plugin"
- Next in thread: John Stone: "Re: Possible bug in LAMMPS plugin"
- Reply: John Stone: "Re: Possible bug in LAMMPS plugin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Cesar Millan: "save coordinates after moving them."
- Previous message: Francesco Iori: "PME units"
- In reply to: Lutz Maibaum: "Possible bug in LAMMPS plugin"
- Next in thread: John Stone: "Re: Possible bug in LAMMPS plugin"
- Reply: John Stone: "Re: Possible bug in LAMMPS plugin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]