Pizza.py WWW Site - Pizza.py Documentation - Pizza.py Tools

vtk tool

Purpose:

Convert LAMMPS snapshots to VTK format.

Description:

The vtk tool converts atom snapshots in a LAMMPS dump or data file to the VTK format used by various visualization packages.

The vtk constructor takes an object that stores atom snapshots (dump, data) as its first argument. The atom snapshots must have "id", "type", "x", "y", and "z" defined; see the map() methods of those tools.

The one(), many(), and single() methods convert specific snapshots to the VTK format and write them out. Optionally, a file prefix for the XYZ output files can also be specified. A ".xyz" suffix will be appended to all output files.

Usage:

v = vtk(d)	        d = object containing atom coords (dump, data) 
v.one()                 write all snapshots to tmp.vtk
v.one("new")            write all snapshots to new.vtk
v.many()                write snapshots to tmp0000.vtk, tmp0001.vtk, etc
v.many("new")           write snapshots to new0000.vtk, new0001.vtk, etc
v.single(N)             write snapshot for timestep N to tmp.vtk 
v.single(N,"file")      write snapshot for timestep N to file.vtk 
  surfaces in snapshot will be written to SURF1.vtk, SURF2.vtk, etc
    where each surface (triangle type) is in a different file 

Related tools:

cfg, data, dump, ensight, xyz

Prerequisites: none