This example shows how to use output from the molecular dynamics code LAMMPS with Ovito and ImageJ in order to create an animated movie. This example will reference the scripts and data of the Uniaxial Compression in Single Crystal Aluminum example. This assumes that Ovito and ImageJ are already downloaded.
Author(s): Nathan R. Rhodes, Mark A. Tschopp
In order for LAMMPS to output compatible data, one must set up an appropriate dump file with the desired data in the LAMMPS input script. Near the end of the LAMMPS script, use the 'dump' command in order to output desired data to a 'custom' file type for use in Ovito. The following lines create a dumpfile for every atom in the simulation every 250 timesteps, and each file is named according to its associated timestep. Then, the file is specified to show, for each atom, the atom ID, atom type, scaled atom coordinates, previously computed centrosymmetry and potential energy variables, and forces upon each atom.
# Dump to cfg for Ovito post processing dump 1 all custom 250 dump.comp.* id type xs ys zs c_csym c_peratom fx fy fz
An example dumpfile is displayed below. This is the initial dumpfile from the Uniaxial Compression example with 4,000 atoms at 10 K.
ITEM: TIMESTEP 0 ITEM: NUMBER OF ATOMS 4000 ITEM: BOX BOUNDS -0.00194951 40.5019 -0.00194951 40.5019 -0.00194951 40.5019 ITEM: ATOMS id type xs ys zs c_csym c_peratom fx fy fz 4 1 0.000170336 0.0496471 0.0501861 0.0190701 -3.36248 -0.0745574 0.0414501 -0.0543807 8 1 0.099786 0.0498953 0.0508957 0.0517112 -3.35214 0.0486293 -0.0229895 -0.143769 43 1 0.0500606 0.0996001 0.0488291 0.0869119 -3.35753 -0.0631582 0.0496892 0.147736 45 1 0.100489 0.0997987 0.000770305 0.040524 -3.35329 -0.0949618 -0.00834898 -0.100968 202 1 0.0499904 0.0502952 0.0993613 0.0400135 -3.35974 -0.0659737 -0.0387528 0.138855 ...
Ovito movie showing compressive deformation of single crystal aluminum loaded in the <100> direction at a strain rate of 1010 s-1 and a temperature of 10 K. Common neighbor analysis used to show dislocations.