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

May 18th, 2018: MDANSE 2018

Does the combination of DFT or classical MD with McStas for modeling experimental data sound interesting?

If so, please consider participating in the MDANSE 2018 event in Tenerife this fall. Registration closes on May 31st 2018.

(You can also read more in this a post to mcstas-users)

April 30th, 2018: Release 2.4.1 works OK on Ubuntu 18.04 + a workaround

Dear all,

I have tested McStas 2.4.1 with the recent Ubuntu 18.04 LTS "bionic beaver", and the usual installation recipe works.

The only found issue so far relates to the behaviour of the Perl+PGPLOT plotter which out of the box fails with the error message: "%giza - ERROR - giza_open_device: Unknown device, device not opened" (see below graphics also).

(In fact the problem was known already for Debian testing, see our related GitHub issue)

The following solutions/workarounds exist:

  1. Recommended:
    Use the Python-based pyqtgraph plotter instead, i.e. mcplot (or mcplot-pyqtgraph). This would give you graphics like this:
  2. Configure pgplot/giza for "XWIN" driver:
    Either edit your /usr/share/mcstas/2.4.1/tools/Perl/perl/mccode_config.perl replacing XSERV with XWIN or set the related environment variable in the shell, i.e.
    export PGPLOT_DEV=/XWIN
    The solution will give you this appearance:
  3. Force-configure to use the legacy PGPLOT:
    Use these commands in a shell and get your "normal" PGPLOT window back The solution will give you this appearance (as usual):

March 2018: McStas-McXtrace team participates in GPU Hackathon

As some of you may have already seen via our facebook page or on twitter, a joint McStas-McXtrace team visited the 2018 GPU Hackathon in Dresden in March.

We can not a such claim that the software fully runs on NVIDIA GPU's, but we certainly gained knowledge and will investigate further. :-)

The team pariticpating in Dresden were

Here is a few photos from the event - and also a PDF from the final presentation, put together by Mads Bertelsen, University of Copenhagen

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