Skip to content
/ MuSTEM Public
forked from HamishGBrown/MuSTEM

Open source version of the MuSTEM multislice electron microscopy simulation code, developed at the University of Melbourne.

License

Notifications You must be signed in to change notification settings

ju-bar/MuSTEM

 
 

Repository files navigation

μSTEM

μSTEM is a transmission electron microscopy (TEM) simulation suite, in particular for scanning transmission electron microscopy (STEM) images, that was developed mainly at the University of Melbourne. The computing suite is based on the multislice method. More detail can be found in the manual and the following scientific paper:

Modelling the inelastic scattering of fast electrons, L.J. Allen, A.J. D'Alfonso and S.D. Findlay, Ultramicroscopy, Vol. 151, pp. 11-22, (2015).

This is a fork of the original µSTEM repository.

Precompiled executables

Prerequisites

  • 64-bit Windows OS
  • A CUDA enabled GPU with compute class 3.0 up to 7.5, GPU compute classes >7.5 are only supported on Linux with the Nvidia HPC SDK.
  • Version 10.1 of the Nvidia CUDA toolkit, this installs the .dll files necessary to run the GPU versions of μSTEM.

Prerequisites

  • 64-bit Windows OS
  • The CPU version is linked against the Intel OpenMP libraries. It requires libiomp5md.dll, which is provided in the zip archive with the executable.

Executables archive

Executables of previous versions can be found in the Executables folder of the repository.

Version changes

Version 6.1

  • Enforced a limit of the energy-loss range for EELS simulation to start with 1 eV, to ensure interpolation and not run as extrapolation.
  • Modified the plasmon menu to input "0" for no plasmon scattering to make that consistent with the other input menus.
  • Added custom EELS to support simulations beyond the energy range of the default EELS tables. Custom EELS files can be generated by J. Barthel (ju.barthel@fz-juelich.de) on reasonable request.
  • Added options display when calling muSTEM.exe options.
  • Added option omp_num_threads={number} to allow OpenMP setup by users. By default the number of threads is set to half of the number of logical cores on the CPU. The maximum used threads is capped to number of (cores - 1).
  • Modified GPU code summing over the diffraction plane. This now uses proper reduction and is faster than the previous implementation. The new implementation also resolves an instability that existed with the absorptive model code.
  • Added a Linux makefile supporting GPU and CPU versions using the Nvidia HPC SDK and the Intel oneAPI.

Version 6.0

  • Added Monte-Carlo code to simulate plasmon scattering, see [B. Mendis, Ultramic. 206 (2019) 112816, doi:10.1016/j.ultramic.2019.112816].
  • Updated the example run files distributed in the executable zip files. These also contain a STEM example now. Thanks to Duncan Alexander (EPFL, Lausanne, CH) for pointing out a problem with the distributed run files.

Tutorial

Click here to download the μSTEM tutorial calculations, powerpoint and activity sheet.

Compiling source code

Linux

A makefile is provided in the repository that can be used to compile the source code on Linux systems. The makefile supports both the CPU and GPU versions of μSTEM. To compile the code, run make in the terminal from the root directory of the repository. Adopt to your system / compiler installations. The distributed version assumes (CPU) the Intel oneAPI (ifx) and (GPU) the Nvidia HPC SDK (nvfortran).

Windows

A compile_gpu.bat is provided with the repository to produce a GPU version of μSTEM. This script assumes that the PGI Fortran compiler is installed. The repository also contains solution and project files for Microsoft Visual Studio 2022 set up to work with the Intel oneAPI for producing a CPU version of µSTEM.

Compiler and CUDA versions should be compatible and also support the hardware you are using.

Contributing

Please contact Dr. Hamish Brown with project suggestions and contributions.

Authors

License

This project is licensed under the GNU GPLv3.0 - see the LICENSE.txt file for details.

Acknowledgments

Les Allen, Adrian D'Alfonso and Scott Findlay originally took the initiative to make this code publicly available, with Adrian D'Alfonso taking on the considerable task of setting up the GPU code. Hamish Brown and Ben Forbes have subsequently made substantial refinements and extensions, with Ben Forbes responsible for several efficiency improvements. The code was developed mainly at the University of Melbourne. We would like to acknowledge the contributions of Mark Oxley and Chris Rossouw to the theoretical and numerical aspects of collaborative research that underpins μSTEM.

In particular, the code IONIZER, whose primary author has been Mark Oxley, was used to set up the parametrized atomic scattering factors for ionization used in μSTEM. Eireann Cosgriff, Torgny Josefsson, Nathan Lugg, Andrew Martin, Gary Ruben and Chris Witte have been members of the group at Melbourne University at various stages and all made contributions to our understanding of inelastic scattering and the simulation thereof.

About

Open source version of the MuSTEM multislice electron microscopy simulation code, developed at the University of Melbourne.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Fortran 91.9%
  • TeX 6.4%
  • Batchfile 0.6%
  • ImageJ Macro 0.5%
  • Makefile 0.4%
  • MATLAB 0.1%
  • Python 0.1%