This example shows how to use output from the molecular dynamics code LAMMPS with AtomEye 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 AtomEye and ImageJ are already downloaded.
Author(s): Nathan R. Rhodes, Mark A. Tschopp
In order for LAMMPS to output data useful for making an animation, one must set up a 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 cfg file for use in AtomEye. 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. The 'dump_modify' command specifies the element as Aluminum, in this case
# Use cfg for AtomEye dump 1 all cfg 250 dump.comp_*.cfg id type xs ys zs c_csym c_peratom fx fy fz dump_modify 1 element Al
An example dumpfile is displayed below. This is the initial dumpfile from the Uniaxial Compression example with 4,000 atoms at 300 K.
Number of particles = 4000 A = 1.0 Angstrom (basic length-scale) H0(1,1) = 40.6491 A H0(1,2) = 0 A H0(1,3) = 0 A H0(2,1) = 0 A H0(2,2) = 40.6491 A H0(2,3) = 0 A H0(3,1) = 0 A H0(3,2) = 0 A H0(3,3) = 40.6491 A .NO_VELOCITY. entry_count = 8 auxiliary[0] = csym auxiliary[1] = peratom auxiliary[2] = fx auxiliary[3] = fy auxiliary[4] = fz 26.982 Al 0.0493442 0.0581882 0.00323696 1.58804 -3.34266 0.196691 -0.804728 -0.0280286 0.0987502 0.00417997 0.00238952 0.827133 -3.34273 -0.475844 -0.270217 -0.120716 0.0989802 0.0523976 0.0521907 0.363772 -3.30304 -0.309005 -0.274515 -0.299433 ...
Figure 1. Image of nucleated dislocation near peak stress
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 300 K. Only atoms in non-centrosymmetric environment are shown.