-
Notifications
You must be signed in to change notification settings - Fork 54
Generating input files for Single_crystal and PowderN
The main diffraction-oriented samples of the McStas- and McXtrace-packages are called Single_crystal and PowderN.
Both components take input files in the form of reflection lists defining the crystallographic information, these can often be generated from a [https://en.wikipedia.org/wiki/Crystallographic_Information_File CIF file] using the "cif2hkl" command line utility included with your McStas or McXtrace installation. The below example commands are run with --mode NUC for nuclear scattering / neutrons, please use --mode XRA for X-ray scattering.
To generate a file with a PowderN-compatible reflection list for McStas, use e.g.
cif2hkl --powder --mode NUC -o MnO_Fm-3m.hkl MnO_Fm-3m.cif
(The "--powder" or "-p" parameter will put one line per a set of equivalent reflections, i.e. only positive (h k l) indexes. This file type of file is therefore NOT compatible with Single_crystal.)
To generate a file with a Single_crystal and PowderN-compatible reflection list for McStas, use e.g.
cif2hkl --xtal --mode NUC -o MnO_Fm-3m.hkl MnO_Fm-3m.cif
(The "--xtal" or "-x" parameter will lists all reflections, including equivalent ones with signed (h k l) indexes, as needed by Single_crystal. Please note that the hkl sorted with respect to increasing length of the scattering vector.)
Please note that specifying -o output file
will only work if it occurs before the input CIF file on the command line!
The crystallographic input-files distributed with McStas are typically found in either .laz powder-format (e.g. [http://www.mcstas.org/download/components/data/Si.laz Si.laz] as example) or .lau single-crystal-format (e.g. [http://www.mcstas.org/download/components/data/YBaCuO.lau YBaCuO.lau]) that content-wise are close to what one would get from the above cif2hkl example runs, but with different order of the columns in the reflection lists.
More specifically, the components both read the header of the input file, parsing the Physical parameters section to define physical constants of the material and the Format parameters section to know the significance of the following data-table, YBaCuO.lau shown below for convenience:
# TITLE *YBa2Cu3O7 yttrium barium cuprate
# SPCGRP Pmmm orthorhombic (perovskite)
# Reference: Bednorz J G, Müller K A 1986 Z. Phys. B 64 189
#
# Physical parameters:
# sigma_coh 66.06 coherent scattering cross section (single atom) in [barn]
# sigma_inc 2.105 incoherent scattering cross section (single atom)in [barn]
# sigma_abs 14.82 absorption scattering cross section (single atom) in [barn]
# density 6.3 in [g/cm^3]
# weight 666.1 in [g/mol] (single atom)
# multiplicity 1 in [atoms/unit cell]
# Vc 173.28 volume of unit cell in [A^3]
# lattice_a 3.8186 lattice parameter a in [Angs]
# lattice_b 3.886 lattice parameter b in [Angs]
# lattice_c 11.6777 lattice parameter c in [Angs]
#
# Format parameters: Crystallographica format
# column_j 4 multiplicity 'j'
# column_d 5 d-spacing 'd' in [Angs]
# column_F2 7 norm of scattering factor |F|^2 in [fm^2]
# column_h 1
# column_k 2
# column_l 3
#
# h k l Mult. d-space 2Theta F-squared
0 0 1 2 11.6777 7.57041 76.2348
...
- In other words you may produce your reflection lists via another mechanism or crystallographic code, as long as you provide this type of information in the header.
In some rare cases you may find that cif2hkl can not produce a correct hkl list for your material. In these cases please send us a bug-report either here on GitHub or as an email to the [mailto:[email protected] McStas users list]!