Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
A simple, reactor-based example instrument for MX diffraction is the instrument file [http://trac.mccode.org/browser/trunk/mcstas-comps/examples/templateNMX.instr templateNMX.instr] of the McStas distribution.

Also see [[Generating a new Laue file]]

A snapshot of the contents dating from early 2015 is provided below and shows example use of
* The Single_crystal component
* SPLIT for boosting simulation stats

For the Rubredoxin.lau  system, the Single_crystal component has suggested to use a SPLIT repetition number of 43, corresponding to the average number of active reflections in the system . That chosen split value will give you an efficiency factor of 43 in production of reflected neutrons from the sample.


/*******************************************************************************
*         McStas instrument definition URL=http://www.mcstas.org
*
* Instrument: templateLaue
*
* %Identification
* Written by: K. Nielsen
* Date: June 2nd, 2010
* Origin: ILL
* Release: McStas CVS-080208
* Version: $Revision: 5074 $
* Modified by: EF, PW
* %INSTRUMENT_SITE: Templates
*
* A simple Laue NMX diffractometer for macromolecules, adapted from the classic 
* templateLaue instrument.
*
* %Description
* A single crystal sample is illuminated with a white cold beam.
* Based on a Laue tutorial written by K. Nielsen, Feb 7, 2000.
*
* Example: templateNMX REPS=50 reflections=Rubredoxin.lau Detector: det_I=210.788
* Example: templateNMX REPS=700 reflections=PPase_D_P1.lau Detector: det_I=29.6512
*
* %Parameters
*
* %End
*******************************************************************************/

/* Change name of instrument and input parameters with default values */
DEFINE INSTRUMENT templateNMX(REPS=43, string reflections="Rubredoxin.lau")

TRACE

COMPONENT Origin = Progress_bar()
  AT (0,0,0) ABSOLUTE

COMPONENT source = Source_simple(
  radius=0.02, focus_xw=0.001, focus_yh=0.001, 
  lambda0=7, dlambda=5, flux=1e12)
AT (0,0,0) ABSOLUTE

COMPONENT slit = Slit(
  xwidth=0.001, yheight=0.001)
AT (0,0,5) RELATIVE source

SPLIT REPS COMPONENT sample = Single_crystal(
          xwidth=0.001, yheight=0.001, zdepth=0.001, mosaic=1e-3,
          reflections=reflections)
AT (0,0,0.10) RELATIVE slit
EXTEND %{
  if (!SCATTERED) ABSORB; /* perfect beam stop */
%}

COMPONENT det= PSD_monitor_4PI(radius=1, nx=360,ny=180,filename="psd")
AT (0,0,0) RELATIVE sample

END