1 This directory used to contain utility scripts for using VMD to
2 visualize and analyze LAMMPS trajectories. As of April 2010 all of the
3 scripts and many additional features have been merged into the topotools
4 plugin that is bundled with VMD. Updates between VMD releases are here:
5 http://sites.google.com/site/akohlmey/software/topotools
6 This page also contains detailed documentation and some tutorials.
8 These scripts within VMD and the plugin for native LAMMPS dump files are
9 are maintained by Axel Kohlmeyer <akohlmey@gmail.com>; please contact
10 him through the LAMMPS mailing list in case of problems.
12 Below are a few comments on support for LAMMPS in VMD.
14 -------------------------
16 1. File formats and VMD limitations
18 VMD currently supports reading several but not all file formats
19 that LAMMPS can generate. Supported are: atom (text mode), custom
20 (text mode, only some fields are directly supported, please see
21 below for more details), dcd, xyz and xtc. Cfg and binary native
22 dump files are not supported (06/2012). The new molfile dump style
23 in addition allows to use VMD molfile plugins to write dumps in
24 any format that is supported by VMD.
26 However VMD requires all frames of a file to have the same number of
27 atoms. If the number of atoms changes between two frames, the file
28 reader will stop. The topotools plugin has a special scripted file
29 reader for .xyz files that can generate the necessary padding so that
30 the file can still be read into VMD. Whether an atom is real or
31 "invisible" is then flagged in the "user" field. For efficiency
32 reasons this script will not preserve atom identity between frames.
34 2. Topology files, a.k.a. as "data" files
36 The topotools plugin also contains a read and write option for LAMMPS
37 data files. This reader will try to preserve as much information as
38 possible and will also store useful information as comments upon
39 writing. It does not store or read coefficient data. In combination
40 with other functionality in topotools complete topologies for rather
41 complicated systems for LAMMPS can be build with VMD scripting.
43 3. Reading custom data fields into VMD
45 At this moment VMD only supports reading coordinates and velocities
46 (if present) as per timestep data. Everthing else is just taken
47 from the first frame or whatever file was used to generate this
48 structure information. Through setting the environment variable
49 LAMMPSREMAPFIELDS, custom properties can be mapped to the x, y, z,
50 vx, vy, vz data fields and then accessed from within VMD. For
51 example to store radius and charge of a particle in the vx and vy
52 fields, respectively set this variable to "vx=radius,vy=q". Future
53 versions of VMD will allow more flexibility.
55 4. Recovering information about elements
57 Colorization in VMD is by default based on atom names, yet LAMMPS
58 requires identification of atoms by consecutive numbers starting at
59 1. With the option of reading a LAMMPS data file, additional
60 information is provided that can help to recover some of this
61 data. 'topo guessatom element mass' will guess the atom's element
62 name from it mass (with fuzz, where possible).
64 5. Reading files from the command line
66 Converting a LAMMPS data file to a .psf file can be very convenient
67 for loading trajectories from the command line. This conversion is
70 topo readlammpsdata data.rhodo full
71 animate write psf rhodo.psf
73 In the future you can now load this PSF file first and then the
74 LAMMPS dump file(s) (or a more compact and faster loading DCD or
77 vmd micelle.psf -lammpstrj dump.micelle
79 Note how the -lammpstrj flag will tell VMD that dump.micelle is a
80 lammps trajectory file.