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
 Known problems



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

June 16th, 2019: Statistics on the history of McStas releases

Did you ever wonder how the number of included components and instrument files in McStas changed over time? - And did you know that we now include 215 components and 192 example instruments?

The figure below is generated from release-metadata extracted from, where all McStas releases can be found.

June 7th, 2019: math.h issues on macOS 10.14.5 Mojave

With the latest update to Xcode command line tools on macOS, there is no longer an option to install the system header files to the legacy location of /usr/include .

This unfortunately means that the miniconda-based gcc that we distribute with McStas (and set up by default) is no longer able to locate the math.h header file and compilations fail with

mccode-r.h:39:18: fatal error: math.h: No such file or directory

Our suggested workaround is to configure your McStas installation to instead use the system-provided clang compiler, see our GitHub issue #799 for a detailed description of how to do this.

April 2nd, 2019: Announcing ISTSI2019

The workshop Innovative Simulation Tools, Shielding and Instrumentation 2019 (ISTSI2019) will be held at Holiday Inn St. Petersburg, Russia, on Saturday June 29th 2019, as a satellite of the ECNS conference.

The workshop brings together the partners of the SINE2020 WP8 that have contributed work in the areas of

  • Integrated simulation using neutronics and Monte Carlo ray-tracing
  • Innovative Shielding Concepts and Materials
  • Compact Instrumentation for Larmor Labelling applications at the ESS

For more information and registration, please consult the website at

This workshop / project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 654000.

March 25th-20th, 2019: McStas School at CSNS

Dear all,

In collaboration with the China Spallation Neutron Source, the McStas team participated in the first ever McStas school in China in the last week of March.

All lecture material and exercises are available through our new McStas school site, hosted on GitHub

Further, our hosts suggested we recorded videos of the lectures which are slowly becoming available on the new McStas youtube channel.

January 18th, 2019: McStas survey results

Dear all,

The results from the 2018 McStas user survey are now online at

The main conclusions are that

  • Q1: McStas users tend to upgrade to the latest release.
  • Q2: Linux is by a large margin the most used platform, followed by Windows 10 and macOS.
  • Q3: McStas are generally happy about the installation and use of the package. Very few people have issues with installation.
  • Q4: The most used tool set is the default Python version, default since v. 2.1.
  • Q5: McStas users seem very satisfied with the user support.
  • Q6: McStas users tend to trust McStas to large extent. But please don't trust it blindly!!
  • Q7: McStas users mostly compare with experimental data or analytic / back of envelope calculations.
  • Q8: McStas users have widespread knowledge of all documentation resources - but we should probably disseminate the wiki further.
  • Q9: The individual suggestions/questions/comments/... will be answered through individual GitHub issues.
  • Q10: McStas is used on all continents that have / are planning neutron scattering infrastructure. Users are mostly based at these facilities, but also at other research labs or universities.
Thank you very much for the (generally) very positive review - also, you are more than welcome to participate in continuing debate on user suggestions that will take place in the individual GitHub survey issues.

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

Last Modified: Sunday, 16-Jun-2019 11:10:01 CEST
Search website mailinglist archive GitHub repos