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.

Prerequisites

GPU version

  • 64 bit windows OS
  • A CUDA enabled GPU with compute class 3.0 or greater
  • Version 10.1 of the Nvidia CUDA toolkit, this installs the .dll files necessary to run the GPU versions of μSTEM.

To compile source code

CPU version

  • 64 bit Windows OS

To compile source code

  • Any Fortran 90 compiler, FFTW libraries, or the Intel MKL

Precompiled executables

Precompiled executables can be found in the Executables folder of the repository or by clicking the links below:

Current versions

Version 6.0

Remark: The GPU version is distributed without the CUDA dynamic link libraries. The executable links to cudart64_101.dll and to cufft64_10.dll, which are distributed with the NVIDIA CUDA Toolit Version 10.1.

Tutorial

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

Compiling source code

The GPU version of MuSTEM is built using the PGI Fortran compiler and Microsoft Visual Studio 2015, please make sure that this software is correctly installed before proceeding. Create a new Visual Studio project and add the source code contained in this repository. The GPU version of the code requires the source files in the GPU_routines folder and the CPU only version of the code requires the source files in the CPU_routines folder. Modify the project properties so that Microsoft Visual Studio passes the following commands to the PGI compiler:

Build commands:

-Mpreprocess -Bstatic -Mbackslash -mp -Mcuda=cuda9.0 -I"C:\Program Files\PGI\win64\17.3\include" -I"c:\program files\pgi\win64\17.3\include" -I"C:\Program Files\PGI\Microsoft Open Tools 14\include" -I"C:\Program Files (x86)\Windows Kits\10\Include\shared" -I"C:\Program Files (x86)\Windows Kits\10\Include\um" -fast -ta=tesla -Minform=warn

To build the single precision version add the command -Dsingle_precision. For the Double precision version add the command -Ddouble_precision. To build the GPU version (requires the PGI compiler) add the command -Dgpu. The code also requires recursive routines to be enabled (The /recursive command in the Intel Visual Fortran compiler) for correct calculation of the absorptive form factors.

Linker commands:

-Bstatic -mp -Mcuda=cuda8.0 -ta=tesla -o"$(Outdir)\MuSTEM_Open.exe" -Wl,/libpath:"C:\Program Files\PGI\win64\17.3\lib" -Wl,/libpath:"C:\Program Files\PGI\win64\2017\cuda\9.0\lib64" cufft.lib

The links to the PGI CUDA libraries and Windows kits may need to be modified depending on the install directories. $(Outdir) represents the output directory of the Microsoft Visual Studio build.

Some example simulations are included on the MuSTEM website.

The CPU version of MuSTEM can also be built using the

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 92.0%
  • TeX 6.6%
  • Batchfile 0.6%
  • ImageJ Macro 0.5%
  • Makefile 0.1%
  • MATLAB 0.1%
  • Python 0.1%