[lammps-users] [vmd-l: VMD 1.8.7 beta 2 posted for download]

dear LAMMPS users,

please see below for the announcement of availability of
the VMD 1.8.7 beta2 release. VMD 1.8.7 is going to have
improved support for people using LAMMPS. please give it
a try and report problems via e-mail to me and
[email protected] or the VMD mailing list.

first, thanks to the changes from 18 Mar 2009 to enhance
the dump output format, the LAMMPS plugin will now be able
to read a much larger number of trajectories, _including_
many that were created with dump style custom. special thanks
to lutz maibaum for helping to debug and improve this.
the lammps plugin is one of the very first plugins in VMD
that will read and store velocities, so they can be used
for computing spectral densities from velocities, or color
coding atoms by kinetic energy (with some extra scripting)
and so on.

second, there is a new package, 'topotools', that will allow
manipulations of simulation topologies, i.e. the kind of information
that is usually stored in "data" files in LAMMPS. while not
all cases can be covered b/c of principal incompatibilities of
what VMD assumes about "molecules", it should work for a significant
number of simulation setups and should be particularly useful
for setups just a few bonds/angle/dihedrals are added or their
type changed etc. or where multiple systems should be merged
(there also is a replicate, but the internal replicate command
of LAMMPS should be more reliable). with some extra scripting,
it can be made to act similar to a topology generating tool
like NAMD's psfgen, but with special focus on flexibility and
simplicity and deliberate ignorance of the type of molecule.
please see the integrated help below, and even further below
two examples for use of the ::TopoTools::mergemols comand
and the ::TopoTools::replicatemols. of course, one can also
use "topo writelammpsdata..." to save the resulting topology.

any feedback that helps us squashing a few more bugs before
the final release is out would be much appreciated.


package require topotools


topo help

Info) usage: topo <command> [args...] <flags>
Info) common flags:
Info) -molid <num>|top molecule id (default: 'top')
Info) -sel <selection> atom selection function or text
Info) (default: 'all')
Info) flags only applicable to 'bond' commands:
Info) -bondtype <typename> bond type name (default: unknown)
Info) -bondorder <bondorder> bond order parameter (default: 1)
Info) commands:
Info) help prints this message
Info) numatoms returns the number of unique atoms.
Info) numatomtypes returns the number of atom types.
Info) atomtypenames returns the list of atom types names.
Info) numbonds returns the number of unique bonds.
Info) numbondtypes returns the number of bond types.
Info) bondtypenames returns the list of bond types names.
Info) clearbonds deletes all bonds.
Info) retypebonds resets all bond types.
Info) addbond <id1> <id2> (re-)defines a single bond.
Info) delbond <id1> <id2> deletes a single bond, if it exists.
Info) getbondlist [type|order|both|none]
Info) returns a list of unique bonds, optionally
Info) including bond order and bond type.
Info) setbondlist <list> [type|order|both|none]
Info) resets all bonds from a list in the same
Info) format as returned by 'topo getbondlist'.
Info) bond order or -type are reset to defaults if not given.
Info) num(angle|dihedral|improper)s returns the number of unique
Info) num(angle|dihedral|improper)types returns the number of
(angle|dihedral|improper) types
Info) (angle|dihedral|improper)typenames returns the list of bond
type names
Info) clear(angle|dihedral|improper)s deletes all (angle|dihedral|
Info) sort(angle|dihedral|improper)s sorts the list of (angle|
Info) according to atom index and
removes duplicates
Info) retype(angle|dihedral|improper)s resets all angle types.
Info) addangle <id1> <id2> <id3> [<type>] (re-defines) a single angle.
Info) delangle <id1> <id2> <id3> (re-defines) a single angle.
Info) add(dihedral|improper) <id1> <id2> <id3> <id4> [<type>]
(re-defines) a single (dihedral|improper).
Info) del(dihedral|improper) <id1> <id2> <id3> <id4> (re-defines) a
single (dihedral|improper).
Info) getanglelist returns the list of angle definitions
Info) in the form {type <id1> <id2> <id3>}
Info) setanglelist <list>
Info) resets angle definitions from a list in the same
Info) format as retured by 'topo getanglelist'
Info) get(dihedral|improper)list returns the list of (dihedral|
improper) definitions
Info) in the form {type <id1> <id2> <id3> <id4>}
Info) set(dihedral|improper)list <list>
Info) resets (dihedral|improper) definitions from a list
in the same
Info) format as retured by 'topo get(dihedral|
Info) NOTE: for angle, dihedral, and improper lists, the
Info) type field currently has to be always present.
Info) readlammpsdata <filename> [<atomstyle>]
Info) read atom coordinates, properties, bond, angle, dihedral and
other related data
Info) from a LAMMPS data file. 'atomstyle' is the value given to
the 'atom_style'
Info) parameter. default value is 'full'.
Info) this subcommand creates a new molecule and returns the
molecule id or -1 on failure.
Info) the -sel parameter is currently ignored.
Info) writelammpsdata <filename> [<atomstyle>]
Info) write atom properties, bond, angle, dihedral and other
related data
Info) to a LAMMPS data file. 'atomstyle' is the value given to the
Info) parameter. default value is 'full'.
Info) Only data that is present is written.

<h3>Utility functions:</h3>
These are useful and convenient tools written on top of the topotools
Combines multiple separate molecules into one file. Example usage:

package require topotools 1.0

# load to be merged molecules into VMD
set midlist {}
set mol [mol new part1.psf waitfor all]
mol addfile part1.pdb
lappend midlist $mol
set mol [mol new part2.psf waitfor all]
mol addfile part2.pdb
lappend midlist $mol

# do the magic
set mol [TopoTools::mergemols $midlist]
animate write psf merged.psf $mol
animate write pdb merged.pdb $mol
Replicate the current unitcell according to integer replicate counts.

package require topotools 1.0

# load molecule
set mol [mol new pegc12e8-small.xml type hoomd waitfor all]

# do the magic
set newmol [::TopoTools::replicatemol $mol 2 2 1 ]
animate write hoomd replicated.xml $newmol