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
Migrating from McStas 2.x to 3.x? - Use the wiki-based guides
April 13th, 2026: McStas and McXtrace 3.6.14 released
Installation instructions
What's Changed
(Selected items, please consult the GitHub changelog for full set)
New comps/instruments
- Adding the ILL SANS instrument 'SAM' by @nmgm in #2388
New tool feature: NeXus scans become entries in one common HDF file
- Prototype solution to allow 'append' mode for datasets by @willend in #2376
Various updates to instruments/components/data files
Various tool improvements
- mctest / timeout system - ensure to kill underlying processes by @willend in #2363
- Add timers for maximal compile / runtime in mctest by @willend in #2356
- Add hints for alternative mcdisplay visualisation in Jupyter... by @willend in #2353
- mcrun -L list was broken, fixed here by (re-)calculating number of elements … by @willend in #2377
- Changed (hard-coded) mcgui 3D visualiser to be webgl-classic by @willend in #2381
- On Windows use psutil for probing number of available cores in MPI by @willend in #2367
Other changes
Please consult the GitHub changelog
- Fixes to various bugs
- LaTeX in doc headers
- Clang-format formatting of component syntax
- Various updates to project infrastructure: PR template, CI etc.
- Various GPU related fixes
New Contributors
Full Changelog: v3.6.5...v3.6.14
March 31st: First circular: PHOTONS AND NEUTRONS REALISTIC
ARTIFICIAL INTELLIGENCE DATASETS (PaNRAID)
Dear Colleagues,
In collaboration with the French DIADEM Academy, we invite interested participants to attend the following course in September:
 | PHOTONS AND NEUTRONS REALISTIC
ARTIFICIAL INTELLIGENCE DATASETS
(PaNRAID) |  |
|
Dates: 21-25 September
Location: Île d’Oléron, France
Objective
The course will develop an integrated approach for generating synthetic data for supervised learning. This approach combines multi-scale materials simulations (DFT, MD, XAS spectroscopy) with comprehensive digital twins of experimental X‑ray and neutron facilities, explicitly accounting for instrumental effects and experimental artefacts.
Intended audience
- Doctoral students
- Postdoctoral researchers
- Faculty and teaching-research staff
- Researchers and research engineers
Further information and pre-registration:
https://formation.pepr-diadem.fr/formation-panraid
Attached are PDF flyers in French and English.
Best regards,
Peter Willendrup
March 28th, 2026: McStas 2.x and McXtrace 1.x formally out of support
Dear all,
We have decided to formally declare that we no longer support
McStas 2.x and McXtrace 1.x, so user issues with these released will from
now on always prompt us to request that you upgrade.
If you are still running such an old release, please upgrade and
port your comps/instruments using the information in the use the wiki-based
porting-guides
We are of course at your service if you have issues porting your
existing code, please create a GitHub issue.
March 13th, 2026: "Best of McStas compilation"
Dear all,
In connection with a user request I realised that occasionally we may all benefit from easier access to old McStas variants.
I have therefore put together a "Best of McStas compilation" - a Linux image with McStas version 1.12c, 2.7.2 and the latest 3.6.8.
You can give the image a quick trial spin via binder:
https://mybinder.org/v2/gh/mccode-dev/jupyter-mcstas-mcxtrace-desktop/HEAD?urlpath=desktop
(will not in practice sustain much actual work / load)
Or alternatively pull docker.io/mccode/mcstas_v1.12c_v2.7.2_v3.6.8:latest via Docker / podman / etc., i.e. something like
Best and hope this may be useful,
Peter
Screenshot of the running compilation:
January 7th, 2026: McStas and McXtrace 3.6.5 released
McStas and McXtrace release 3.6.5 is now available.
McStas installation instructions are found on GitHub .
What's Changed - Main Changes:
Bugfixes, new features, all common to McStas and McXtrace:
- macOS bundles in 3.6.1 did not actually install that version but something earlier. Fixed by pinning in yml file, @willend in #2285
- PDF manuals had wrong version numbers, @willend in #2285
- Allow mcrun / mcdisplay to run / visualize without access to .c/.instr by @willend in #2281
- mcgui/mxgui editable font colors, handle long filenames without extreme window resizing by @willend in #2275
- Fix cross-platform sort-order issue in PowderN by @willend in #2272
- Platform-independent reflection list sort in Single_crystal by @willend in #2273
- mcrun/mxrun: feature addition - scan by seed by @willend in #2276
- Add mcplot toggle to "plot 1D-curves from 0-value" in linear mode by @willend in #2278
- Add commentstring to vim editor by @Lomholy in #2284
Other stuff
- %Example adjustments, McXtrace by @willend in #2269
- Test_SANS/Test_SAXS, supplement stats by x10 SPLIT by @willend in #2270
- Use ${{ matrix.mpi }} to ensure different output dirs by @willend in #2271
- Fix indentation bug - issue #2279 by @willend in #2280
- Temporarily disable this instr from McXtrace tests by @willend in #2283
Full Changelog:https://github.com/mccode-dev/McCode/compare/v3.6.1...v3.6.5
Previous news items: 2025, 2024,
2023, 2022, 2021,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, 13-Apr-2026 11:30:02 CEST