"Pizza.py WWW Site"_pws - "Pizza.py Documentation"_pd - "Pizza.py Tools"_pc :c

:link(pws,http://pizza.sandia.gov)
:link(pd,Manual.html)
:link(pc,Section_tools.html)

:line

bdump tool :h3

[Purpose:]

Read dump files with bond info.

[Description:]

The bdump tool reads one or more LAMMPS dump files, and stores their
contents as a series of snapshots with 2d arrays of atom attributes.
It is assumed that each entry contains info for a bond in a LAMMPS
simulation as is typically written by the dump local command in
LAMMPS.  Other tools use bdump objects to extract bond info for
visualization, like the dump tool via its extra() method.

The constructor method is passed a string containing one or more dump
filenames.  They can be listed in any order since snapshots are sorted
by timestep after they are read and duplicate snapshots (with the same
time stamp) are deleted.  If a 2nd argument is specified, the files
are not immediately read, but snapshots can be read one-at-a-time by
the next() method.

The map() method assigns names to columns of attributes.  The
id,type,atom1,atom2 names must be assigned in order for bond info to
be extracted.

The viz() method is called by Pizza.py tools that visualize snapshots
of atoms (e.g. gl, raster, svg tools).

:line

Normally, "LAMMPS"_http://lammps.sandia.gov creates the dump files
read in by this tool. If you want to create them yourself, the format
of LAMMPS dump local files is simple.  Each snapshot is formatted as
follows:

ITEM: TIMESTEP
100
ITEM: NUMBER OF ENTRIES
32
ITEM: ENTRIES
1 1 5 10
2 1 11 45
3 2 6 8
...
N -3 23 456 :pre

There are N lines following "ITEM: ENTRIES" where N is the number of
entries.  Entries do not have to be listed in any particular order.
There can be a different number of entries in each snapshot.  Each
line must contain the bond ID, type, and the 2 atom IDs of the atoms
in the bond, as specified by the map() command.

:line

[Usage:]

b = bdump("dump.one")             read in one or more dump files
b = bdump("dump.1 dump.2.gz")	  can be gzipped
b = bdump("dump.*")		  wildcard expands to multiple files
b = bdump("dump.*",0)		  two args = store filenames, but don't read :pre

  incomplete and duplicate snapshots are deleted
  no column name assignment is performed :pre

time = b.next()             	  read next snapshot from dump files :pre

  used with 2-argument constructor to allow reading snapshots one-at-a-time
  snapshot will be skipped only if another snapshot has same time stamp
  return time stamp of snapshot read
  return -1 if no snapshots left or last snapshot is incomplete
  no column name assignment is performed :pre

b.map(1,"id",3,"x")               assign names to atom columns (1-N) :pre

  must assign id,type,atom1,atom2 :pre

time,box,atoms,bonds,tris,lines = b.viz(index)   return list of viz objects :pre

  viz() returns line info for specified timestep index
    can also call as viz(time,1) and will find index of preceding snapshot
    time = timestep value
    box = NULL
    atoms = NULL
    bonds = id,type,atom1,atom2 for each line as 2d array
    tris = NULL
    lines = NULL :pre

[Related tools:]

"dump"_dump.html, "gl"_gl.html, "raster"_raster.html, "svg"_svg.html

[Prerequisites:]

Numeric or NumPy Python packages.  Gunzip command (if you want to read
gzipped files).
