Integrated Computational Materials Engineering (ICME)

Making Atomistic Movies using AtomEye

Abstract

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

LAMMPS Input

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

LAMMPS Dumpfile

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 
...

AtomEye

* Visualize the dumpfile in AtomEye by typing the following command, "/A dump.tensile_0.cfg" (UNIX).
  • Use the AtomEye options to select how you want to visualize deformation. In this example, the centrosymmetry parameter was used to show only atoms in a non-centrosymmetric environment.
    • Look at dumpfile to see parameters available for view, denoted by 'auxiliary.' In this case, centrosymmetry, potential energy, and forces on atoms are available.
    • Use Alt+'auxiliary number' to activate desired view. In this case, centrosymmetry (Alt+0) is used (see Figure 1).
    • Adjust threshold, or set of atoms to view, by using Shift+T. This will allow creation of a set for the current parameter (in this case, csym).
    • Make atoms with values outside of the threshold invisible by using Ctrl+A.
  • Adjust view angle as desired.
  • Press 'y' within AtomEye to produce an animation script.
  • The folder "Jpg" now contains snapshots of all dumpfiles.
Dislocation 4k

Figure 1. Image of nucleated dislocation near peak stress


ImageJ

  • Open ImageJ
  • Drag the folder created by AtomEye (Jpg) into ImageJ.
    • Select "Convert to RGB" to keep the color from the AtomEye images.
    • Choose "yes" to load a stack.
  • Adjust the size as needed (Image/Adjust/Size)
  • Adjust frame rate as desired (Image/Stacks/Animation Options)
  • Save as Animated Gif file
ImageJ 4k

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.