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

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.