The Swiss-army knife of atomic simulations
This tutorial explains how to interpolate atom positions between two configurations.
▶ For more information, refer to the corresponding documentation page.
In this tutorial we will use the example of the migration of a vacancy in aluminium.
Assuming that you do not already have the initial and final configurations, we will begin by preparing them.
Let us begin with the initial configuration. It will just be a crystal of fcc aluminium containing a vacancy. We use the mode "--create" to generate the unit cell, then duplicate it, and finally remove an atom to introduce a vacancy:
atomsk --create fcc 4.02 Al -duplicate 10 10 10 -rmatom 1 initial.cfg
This initial configuration can be visualized in Atomeye or OVITO. Below atoms are coloured according to their coordination, so atoms around the vacancy appear in red:
Now let us prepare the final configuration, this time deleting atom 2:
atomsk --create fcc 4.02 Al -duplicate 10 10 10 -rmatom 2 final.cfg
And thus we constructed the initial and final configurations, where the vacancy is in two neighboring positions.
Now that we have the initial and final configurations, we can use the mode "--interpolate" of Atomsk to generate new configurations between them. This mode requires the name of the files containing the initial and final configurations, the number of interpolated configurations to be generated, and the format of the output files. For example, to generate 7 configurations in the CFG format you may use:
atomsk --interpolate initial.cfg final.cfg 7 cfg
Atomsk will generate 9 new files. The first one, named "initial_img0.cfg", contains exactly the same system as the initial configuration. The ones named from "initial_img1.cfg" up to "initial_img7.cfg" are the intermediate configurations that we asked for. The final one, "initial_img8.cfg", is identical to the final configuration. You may change the number of intermediate configurations at will. Note that Atomsk performs a linear interpolation of atom positions, meaning that all intermediate positions of an atom are along the segment joining its initial and final positions, and all are equidistant to one another.
Opening the first configuration ("initial_img1.cfg") with OVITO will cause it to open the sequence of files. You may then play with the slider to navigate between configurations, or generate an animation like the one below.
Interpolation can be performed between any type of configurations: vacancy or interstitial atom moving, dislocation in two consecutive Peierls valleys, etc. It can be useful to generate intermediate configurations in preparation of a chain-of-state calculation such as the nudged elastic band (NEB) method, or simply to smooth the visualization of a defect moving around in the lattice.