Calculating cascade density using TRIM, OVITO, and python
Method used in the paper: Deterministic Role of Collision Cascade Density in Radiation Defect Dynamics in Si
When an energetic ion enters a crystalline solid, the ion can collide with atoms in the lattice which are then displaced and go on to produce additional collisions. This proces continues along the path of the ion create a so-called cascade of defects. Modeling such cascades can reveal unique properties of the ion-solid interaction process such as the cascade density. The effect of cascade density on radiation defect dynamics is studied in detail in the paper “Deterministic Role of Collision Cascade Density in Radiation Defect Dynamics in Si”.
This blog post walks through the method used to determine the cascade density in the paper mentioned above using a combination of the TRansport of Ions in Matter (TRIM) software [1], Open Visualization Tool (OVITO) [2], and python. The cascade densities are calculated using a method similar to that proposed by Heinisch and Singh [3] in which the cascade density is defined as the average local density of vacancies within some averaging radius.
The following outline the steps necessary to calculating the cascade density.
Setting up your environment
TRIM
First download SRIM/TRIM software which is freely available here. Once installed, you can open a TRIM simulation, select the ion parameters you wish to use, then select “Detailed Calculation with full Damage Cascade” from the drop down DAMAGE menu, and check the Collision Details box under Outpout Disk Files. The configuration used in this post is shown below.
OVITO
Next, the OVITO library needs to be installed. As mentioned above OVITO is a tool for visual representation of atomic data. However, I’ve found that it has very nice (and efficient) implementations of coordination analysis methods and surface mesh / volume calculation via Delaunay tessellation. The library is installed via:
Importing TRIM results into python
Now that the environment is setup, we can move towards performing an actual simulation. After running TRIM with the settings specified above, an output file should be created in the SRIM Outputs directory. This file keeps track of the collision events positions, energy, recoil energy, etc., but is not easy to import and use for analysis in its current form. The script below parses the file and output the results as a pandas dataframe:
OVITO Simulation Class
In order to make importing new ion cascades easier, the following class has been created to interface with OVITO. The Class is initialized by passing the x,y,z positions of defects along with the yz-plane minimum and maximum dimensions.
Finally, one last function is needed to rearrange the cascades from the TRIM data file as we see fit. For isolated cascade calculations you can set the simulation cell size to be much larger than the area occupied by cascades so that every cascade is essentially isolated. Of course this method can also be used to study the interaction of collision cascades.
An Example
This section goes through an example using 500 keV Ar+ ions incident onto Si. The TRIM file created for this example had ~6000 ion cascades and was ~2.8 GB. The code below parses this file into a pandas dataframe in approximately 2 minutes on my Dell XPS13 laptop.
The depth dependence of vacancies can be plotted as shown below:
Next we can calculate the local cascade density for each vacancy near the depth of maximum vacancy concentration. The cascade density is returned as a histogram across density values (plotted below in Fig. 4). The average cascade density for the averaging radius of 10 nm is calculated in the last line of the snippet below.
The average cascade density for an averaging radius of 10 nm is calculated in the last line of the snippet above as 0.0481 Vac./nm3.
[3] Heinisch, H. L. & Singh, B. N. On the structure of irradiation-induced collision cascades in metals as a function of recoil energy and crystal structure. Phil. Mag. A 67, 407–424 (1993).