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 2nd, 2020: McStas presentation from the 2020 OpenACC summit now online

Dear all,

The McStas presentation from the OpenACC summit is now online on YouTube.

OpenACC (see https://www.openacc.org) is a high-level, compiler-driven approach to GPU-acceleration, and in the video McStas team tech-lead Peter Willendrup gives an overview about neutron scattering, McStas and how the team is porting the code to Nvidia GPU's.

Have a look at https://www.youtube.com/watch?v=HDU-WRJUZXs&feature=youtu.be


September 10th, 2020: Multi-GPU support in McStas 3 code tree

For Linux systems with multiple Nvidia GPU's the McStas team now has a solution, based on MPI and OpenACC. The images below show 8 NVIDIA GeForce 1080 running BNL_H8 in parallel and profiling-output in NVIDIA Nsight Systems:

8 gpus shown running using nvidia-smi8-gpu profiling output

The plan is to release either another beta or the first "real" McStas 3.0 before the end of 2020.


August 24th, 2020: macOS 11.0 Big Sur beta, hold your horses...

The McStas team has tested the current 2.6.1 release on the beta, and lots of stuff is broken on Big Sur...

We are aware that getting the freshest or forthcoming version of macOS can be tempting, but please wait for an updated McStas release if you aim to do any work with McStas... :-)


May 26th, 2020: Experimental McStas 2.6.1 and McXtrace 1.5 dockers

The combined McStas and McXtrace team have started experimenting with using Docker's for deployment. The advantage is simplified installation and a uniform look and feel / functionality across platforms.

If you feel like giving our experimental docker solutions a spin, have a look at https://github.com/McStasMcXtrace/McCode/blob/master/Docker/README.md


May 4th, 2020: McStas 2.6.1 released

Dear all,

A new minor-release of McStas, v. 2.6.1 has been built and is ready for download!

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

The release adresses a few bugs found in the 2.6 release, see the related issue list at GitHub, but is in terms of features and functionality almost identical to 2.6.

Best
Peter Willendrup


April 28th, 2020: McStas 2.6 on Ubuntu 20.04

Dear all,

I have tried out the McStas 2.6 release on the fresh Ubuntu 20.04 release, and my findings are these:

A new minor release 2.6.1 is on the way, implementing a few bugfixes, see our GitHub issue tracker for more information.

Best regards,
Peter Willendrup


February 27th, 2020: McStas 3.0beta bugfixes etc


February 25th, 2020: McStas 3.0beta technology preview available!

Dear all,

A technology preview for the forthcoming McStas 3.x series is now available for testing!

Main highlights of the release are:

For more details and instructions, please refer to this document on our Wiki

Thanks to:


January 24th, 2020: McStas 2.6 release!

Dear all,

A new release of McStas, v. 2.6 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 http://mcstas.org/CHANGES_McStas.

Changes in McStas v.2.6, January 24th, 2020

- Most other new datafiles are directly related to component- or instrument-additions and have been mentioned above.

We hope you will enjoy this new release!!!


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