McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP


About McStas
 Conditions of use
 Project funding

 Other Downloads (share)

Mailing list

Search web/mailinglist

 McStas manual



Links <- UPDATED!

Report bugs


McStas - A neutron ray-trace simulation package

McStas is a general tool for simulating neutron scattering instruments and experiments. It is actively supported by DTU Physics, NBI KU, ESS, PSI and ILL

Simulated scattering from a hollow-cylinder vanadium sample.

The plot shows the intensity of scattered neutrons (red is highest intensity). The sample is at the center of the sphere with the neutron beam coming from the left. Clearly seen is the shadowing effect of the sample causing a lower intensity opposite the beam. Also seen is the effect of the non-symmetric geometry of the sample, causing lower intensity directly above and to the side of the sample.

Recent news

October 4th, 2021: McStas "classic" 2.7.1 released

Dear all,

A new release of McStas "classic", v. 2.7.1 has been built and is ready for download!

Download and installation instructions are available via our GitHub download pages.

Selected highligts from the release are listed below. The full list of changes is also available at

  • Fixes of issues from last release:
  • Tools
    • mcgui allows definition of an "external editor", see the configuration menu.
    • On Linux we preconfigure for gedit (where we now also provide syntax-highlighting, on macOS and Windows we default to use the OS file-type settings, i.e. whatever you get by double-clicking an instr file.) Use ctrl/meta + shift + e to spawn the editor from mcgui.
  • Platforms:
    • We still support 64bit Windows 10/11 on Intel, all recent 64bit macOS including 11.0 Big Sur on both Intel and Apple Silicon/M1 processors. Debian-based distros on Intel and Arm, RPM-based distros on Intel. (RPMs are built on/for CentOS and Fedora, you may get varying milage elsewhere.)
We hope you will enjoy this new release!!! (And keep an eye out for 3.1, it is almost also there...)

April 21st, 2021: McStas on the Apple M1 processor

Dear all,

The McStas team finally got access to a mac with the new Apple M1 processor and can now report some experience back:

  • Installation and use of the McStas 2.7 and 3.0 app bundles work OK via Rosetta 2 (i.e. Intel-emulation on M1)
  • You have to do a little hacking to run on the commandline, i.e. use the command:
    arch -x86_64 /usr/local/bin/mcstas-3.0-environment 
    to start a full McStas 3.0 environment in emulation.
  • To simply always run such an env script via emulation, you may even replace the first #! command in the script by this:
    #!/usr/bin/arch -x86_64 /bin/bash
  • Performance-wise the processor looks very good, having tried a few MPI-based simulations that are all a factor of 2-6 faster than on the 2018 machine it is replacing.
  • Performance should be even better the moment we release a dedicated M1-native version of McStas, hopfully within the next few months.

March 10th, 2021: Videos from Virtual McStas Seminar at MLZ

Dear all,

Mads Bertelsen and Peter Willendrup gave 3 talks at an MLZ Virtual McStas Seminar last week, arranged by Peter Link MLZ. The videos are available on YouTube:

McStas 3.0 - GPU support in McStas (Peter Willendrup)
Abstract: The recent McStas 3.0 marks a big step forward with added support for acceleration on NVIDIA GPUs. The presentation will highlight the main changes between the McStas 2 and McStas 3 series and with emphasis on what modifications are needed to port an existing instrument or component. Finally the presentation will discuss the areas of McStas 3 that are not yet fully developed and mature.

McStas Union components (Mads Bertelsen)
Abstract: The McStas Union components is a set of components that are used in together to describe complex parts of neutron instruments where multiple scattering can be an important aspect. The user will describe scattering properties in a modular fashion to describe materials. Complex geometry can be described, allowing hollow regions, windows and similar with full multiple scattering, which is especially useful for simulating sample environments. The talk will have a focus on the practical use of these components, teaching the basic concepts, as well as showcasing what can be achieved.

McStasScript (Mads Bertelsen)
Abstract: As python has become the main language for scientific software, it was decided to introduce a python interface to McStas called McStasScript. Using McStasScript a user can describe an instrument, perform simulations and analyze the data directly from a python script. This simplifies including McStas in more advanced workflows. The talk will introduce McStasScript and show how it allows using McStas in a new way that appeals to both new and experienced users.

February 9th, 2021: Updated miniconda3 packages for v.2.7 and 3.0 on CentOS

Dear all,

We have recently discovered issues with binary-compatibility of some miniconda3-based Python modules in both 2.7 and 3.0 on CentOS. As a consequence, the related packages have been updated on the download page plus in our repo.

Previous news items: 2020,2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998.

Last Modified: Monday, 04-Oct-2021 10:55:03 CEST
Search website mailinglist archive GitHub repos