Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
mcgui(1) USER COMMANDS mcgui(1)

mcgui - graphical user interface of the McStas neutron ray-trace simulation package

mcgui [--open] [file.instr]

The mcgui command is the graphical user interface of the McStas package. It has the following features: Loading instruments and editing their descriptions, compiling them, running single simulations, as well as scans of parameters, usage of parallel computation (when available), parameter optimization to maximize monitor values, plotting of simulation results and instrument geometry, access to instrument templates and plenty of documentation.
McStas is a general tool for simulating neutron scattering instruments and experiments. It is actively supported by Risoe National Laboratory and ILL
McStas is based on a compiler [mcstas(1)] that reads a high-level specification language defining the instrument to be simulated and produces C code that performs the Monte Carlo Simulation. The system is very fast in use, both when setting up the instrument definition and when doing calculations.
McStas supports all neutron scattering instruments, including triple-axis, time-of-flight instruments, and polarised neutrons. It comes with a comprehensive manual and a library of well-tested components that include most standard elements of neutron scattering instruments, including steady-state and pulsed sources, monochromators/analysers, guides, collimators, vanadium and powder samples, velocity selectors and choppers, and a variety of detectors.
The package consists of the following user commands:
is the graphical user interface. Then use the Neutron Site menu to select an example instrument, and access the whole documentation for the Help menu. It contains an instrument editor, methods to plot simulation results, and much more
is the command-line tool for building and running simulations
is the simulation results plotting tool
is the instrument geometry and neutron trajectory viewer
is the documentation tool
is the instrument compiler
can transform any text data set from one format to an other. It does not support conversion from binary data sets. It can also merge equivalent results.
We encourage users to refer to the User and Component Manuals, which are available with the command mcdoc

loads the specified instrument when starting
will open the instrument editor window
will only open the instrument editor window (no main/simulation window)
display command help

Typical usage
Open the foo.instr instrument
mcgui foo.instr

The MCSTAS environment variable may be set to define the McStas library location. This is /usr/local/lib/mcstas on Linux systems. Executables are usually located in /usr/local/bin. The McStas configuration file is MCSTAS/tools/perl/mcstas_config.perl
The MCSTAS_FORMAT environment variable may be set to define the default data format used for storing results. This is usually 'PGPLOT'.
The MCSTAS_CC environment variable may be set to define the compiler to use (e.g. gcc)
The MCSTAS_CFLAGS environment variable may be set to define the options for compilation (e.g. -O2)
The BROWSER environment variable may be set to define the default HTML browser to use

Some implementations of Perl-Tk do not support desktop switching and windows redraw. This may crash mcgui. McStas is a large package, and bugs might be found. If so, please report to and the mailing list

Peter Kjaer Willendrup, Emmanuel FARHI, Kim Lefmann, and Klaus Lieutenant

mcstas(1), mcrun(1), mcdisplay(1), mcplot(1), mcgui(1), mcdoc(1), mcformat(1)
web site: <>
mailing list: <>
matlab(1), idl(1), octave(1), vitess(1), NISP(1), restrax(1), mcnp(1), tripoli(1)
McStas 2.2a - May. 29, 2015

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.