new VMD plugin for reading LAMMPS dumps with variable number of atoms

hi everybody,

people have repeatedly asked for supporting reading trajectories with
a variable number of atoms into VMD for visualization and analysis.
while there is already a hack for that written in Tcl at:
https://sites.google.com/site/akohlmey/software/topotools/topotools---documentation#TOC-readvarxyz-file-name-

i've recently implemented an alternate approach that uses the slightly
different approach. rather than first analyzing the entire trajectory
and determining how many atoms of which kind are needed, this one
needs the number of the maximally possible number of atoms (or more)
at the very beginning and will pad the data that is fed to VMD
accordingly and will then direct any non-existent atoms to be located
at a predetermined dummy location, which defaults to (0.0,0.0,0.0).

the procedure is the following. launch VMD. you will see then a
comment on the console about updated plugins. there should be one more
than before. you can then set the provisioning size via:

set env(LAMMPSMAXATOMS) 10000

so this will reserve at least room for 10000 atoms. and then you can
load multiple trajectory files and for as long as they don't have more
than 10000 atoms, they will all load. mind you, the restriction of
atoms changing properties is still not supported (i have seen a
workaround in a different plugin, that i may adopt at some point) and
thus properties for atoms not present in the first frame, will be set
to some default values (details below). if you want to avoid that, you
can load load a single frame with all atoms first, then delete the
frame, but not the molecule and then load the entire trajectory.

if you have any questions beyond this, please post to the vmd-l mailing list.

here is the package with the updated plugins. it contains precompiled
plugins files for 32-bit and 64bit x86 cpus and Linux, MacOSX and
Windows. you can just copy those over the existing plugin files in
your VMD installation.

https://sites.google.com/site/akohlmey/software/lammps-plugin/vmd-lammpsplugin-20130725.tar.gz?attredirects=0&d=1

if you have any problems with the binaries, tough luck, but do let me know.

cheers,
    axel.

here are descriptions for the new features from
.https://sites.google.com/site/akohlmey/software/lammps-plugin

LAMMPSMAXATOMS

This environment variable instructs the plugin to reserve space for
more atoms than actually present in the first frame of the trajectory.
The VMD molfile API assumes that there is a fixed number of atoms in a
trajectory and that those atom's identity and properties (outside of
position and velocity vectors) will not change. By setting this
environment variable to a suitable number the lammps plugin can handle
trajectories where atoms are added. Those "dummy" atoms will be
assigned coordinates over the course of the trajectory as they appear.
This still will not assign them suitable structure information, that
would have to be added through different means (e.g. loading a
suitably sized .psf file). All dummy atoms will be initialized to the
following properties: name = @, type = X, resname = @@@, segid = @@@,
chain = @, mass =0, charge=0, radius=0, element=X. For coordinates of
inactive atoms, please see the next paragraph.

LAMMPSDUMMYPOS

This environment variable allows to set the position of inactive atoms
when reading a native LAMMPS trajectory dump with a varying number of
atoms. By default, those atoms will be assigned the position
(0.0,0.0,0.0). However this environment variable allows to change this
default, e.g.: set env(LAMMPSDUMMYPOS) {0.0 0.0 -10.0} will move the
inactive atom position to a z-value of -10.