SRIM

Table of contents

  1. Introduction
  2. Running on Linux

Introduction

The Stopping and Range of Ions in Matter (SRIM) is a collection of software for calculations/simulations dealing with ion transport in matter. This includes:

  • ion stopping and range in targets,
  • ion implantation,
  • sputtering,
  • ion transmisstion,
  • and ion beam therapy.

Further details can be found at the SRIM homepage (http://www.srim.org/), as well as the textbook sharing the same name:


Title
SRIM - The Stopping and Range of Ions in Matter
Author
J. F. Ziegler, J. P. Biersack, M. D. Ziegler
Edition
7
Publisher
SRIM Co.
Address
Chester, MD
Year
2008
Cover
SRIM textbook

Papers dealing with specific versions of SRIM also exist:

Though the software is free, it is closed source and written in (the now defunct language) Visual Basic. Neither of these traits are particularly appealing (or sensible) by modern standards. Nevertheless, it offers a user friendly interface for a number of complicated tasks that are useful for many branches of science (e.g., the stopping profile of an implanted ion).

For those who prefer to work with scripts over SRIM’s GUI, check out pysrim, which provides a nice Python interface to the application.

Running on Linux

Though SRIM is a (legacy) Microsoft Windows application, it is possible to run the program on Linux thanks to the magic of Wine. Some install instructions are already available online and these seemed to work well in the past; however, for recent versions of Wine/Linux, a modified installation procedure was required.

First, I removed any previous instance of Wine by executing:

rm -rf ~/.wine

Next, I added the following to my .bashrc file:

export WINEARCH=win32
export WINEPREFIX=~/.wine

and in a fresh terminal run:

winecfg

This ensures a clean 32-bit Wine instance is set up. After executing the command, a dialog box will appear. If needed, select “Windows 7” as the Microsoft Windows version and click “OK”.

Through inspection of the contents of ~/.wine/drive_c/windows/system32, I noticed that many of the .dll and .ocx files needed by SRIM are already present. Instead following the exact instructions of registering each of the .ocxs provided with the application (i.e., in the folder /path/to/srim/SRIM-Setup/), I elected to start SRIM via:

wine SRIM.exe

which then prompted me with error messages as to which files were unregistered/missing. To rectify this, I both copied the missing files (from the SRIM Setup directory) to ~/.wine/drive_c/windows/system32 and registered them using:

regsvr32 *.ocx

where *.ocx is the missing (copied) file. Note: one also needs to extract the the missing Visual Basic library (MSVBVM50.DLL) from MSVBvm50.exe found in the SRIM Outputs directory and copy it to ~/.wine/drive_c/windows/system32 (does not need to be registered).

Afterwards, SRIM ran without issue!


Copyright © 2020-2023 Ryan M. L. McFadden.