McXtrace logo

McXtrace - An X-ray ray-trace simulation package

ESRF; SAXSLAB Niels Bohr Institute DTU Physics


Project Status
 Project Partners
 Project People

 Mac OSX Installation
 Windows Installation

Mailing List



Minutes of Meetings

McXtrace Art

About McXtrace




McXtrace: PowderN Component

[ Identification | Description | Input parameters | Output parameters | Links ]

The PowderN Component

Modified for X-ray use: EK, 28.10.10 General powder sample (N lines, single scattering, incoherent scattering)


  • Author: P. Willendrup, L. Chapon, K. Lefmann, A.B.Abrahamsen, N.B.Christensen, E.M.Lauridsen.
  • Origin: McStas release
  • Date: 4.2.98
  • Version: 1.54
  • Modification history:
    • KL, KN 20.03.98 (rewrite)
    • KL, 28.09.01 (two lines)
    • KL, 22.05.03 (background)
    • KL, PW 01.05.05 (N lines)
    • PW, LC 04.10.05 (Merge with Chapon Powder_multi)
    • PW, KL 05.06.07 (Concentricity)
    • EF, 17.10.08 (added any shape sample geometry)


General powder sample with
        many scattering vectors
        possibility for intrinsic line broadening
        incoherent backgorund ratio is specified by user.
        No multiple scattering. No secondary extinction.

Based on Powder1/Powder2/Single_crystal.
Geometry is a powder filled cylinder or a box.
Incoherent scattering is only provided here to account for a background
The efficient is highly improved when restricting the vertical scattering
range on the Debye-Scherrer cone (with 'd_phi').
The unit cell volume Vc may also be computed when giving the density,
the atomic/molecular weight and the number of atoms per unit cell.

Sample shape:
Sample shape may be a cylinder, a sphere, a box or any other shape.
  box/plate:       xwidth x yheight x zdepth (thickness=0)
  hollow box/plate:xwidth x yheight x zdepth and thickness>0
  cylinder:        radius x yheight (thickness=0)
  hollow cylinder: radius x yheight and thickness>0
  sphere:          radius (yheight=0 thickness=0)
  hollow sphere:   radius and thickness>0 (yheight=0)
  any shape:       geometry=OFF_file

  The complex geometry option handles any closed non-convex polyhedra.
  It computes the intersection points of the xray with the object
  transparently, so that it can be used like a regular sample object.
  It supports the OFF and NOFF file format but not COFF (colored faces).
  Such files may be generated from XYZ data using:
    qhull < Qx Qv Tv o >
  and viewed with geomview or java -jar jroff.jar (see below).
  The default size of the object depends of the OFF file data, but its
  bounding box may be resized using xwidth,yheight and zdepth.

If you use this component and produce valuable scientific results, please
cite authors with references bellow (in Links).

Example: PowderN(reflections = "c60.lau", d_phi = 15 , radius = 0.01,
  yheight = 0.05, Vc = 1076.89, Delta_d=0, DW=1,

Powder definition file format
Powder structure is specified with an ascii data file 'reflections'.
The powder data are free-text column based files.
Lines begining by '#' are read as comments (ignored) but they may contain
the following keywords (in the header):
These values are not read if entered as component parameters (Vc=...)

The signification of the columns in the numerical block may be
set using the 'format' parameter. Built-in formats are:
and these specifications it is important NOT to use quotes, as shown.

An other possibility to define other formats is to set directly
the signification of the columns as a vector of indexes in the order
Signification of the symbols is given below. Indexes start at 1.
Indexes with zero means that the column is not present, so that:
  Crystallographica={ 4,5,7,0,0,0,0,0 }
  Fullprof         ={ 4,0,8,0,0,5,0,0 }
  Lazy             ={17,6,0,0,0,0,0,13}
Here again, NO quotes should be around the 'format' value.

At last, the format may be overridden by direct definition of the
column indexes in the file itself by using the following keywords
in the header (e.g. '#column_j 4'):


PowderN assumes 'concentric' shape, i.e. can contain other components inside its
optional inner hollow. Example, Sample in Al cryostat:

COMPONENT Cryo = PowderN(reflections="Al.laz", radius = 0.01, thickness = 0.001,
                         concentric = 1, p_interact=0.1)
AT (0,0,0) RELATIVE Somewhere

COMPONENT Sample = some_other_component(with geometry FULLY enclosed in the hollow)
AT (0,0,0) RELATIVE Somewhere

COMPONENT Cryo2 = COPY(Cryo)(concentric = 0)
AT (0,0,0) RELATIVE Somewhere

(The second instance of the cryostat component can also be written out completely
 using PowderN(...). In both cases, this second instance needs concentric = 0.)

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
format no quotes Name of the format, or list of column indexes (see Description). Undefined
reflections string Input file for reflections. Use only incoherent scattering if NULL or "" 0
material 0
geometry str Name of an Object File Format (OFF) file for complex geometry. The OFF file may be generated from XYZ coordinates using qhull/powercrust 0
radius m Outer radius of sample in (x,z) plane 0
yheight m Height of sample y direction 0
xwidth m Horiz. dimension of sample, as a width 0
zdepth m Depth of box sample 0
thickness m Thickness of hollow sample. Negative value extends the hollow volume outside of the box/cylinder. 0
pack 1 Packing factor 1
Vc AA^3 Volume of unit cell=nb atoms per cell/density of atoms 0
Delta_d Angs Global relative Delta_d/d spreading when the 'w' column is not available. Use 0 if ideal. 0
p_inc 1 Fraction of incoherently scattered xrays 0.1
p_transmit 1 Fraction of transmitted (only attenuated) xrays 0.1
DW 1 Global Debey-Waller factor when the 'DW' column is not available. Use 1 if included in F2 0
nb_atoms 1 Number of sub-unit per unit cell, that is ratio of sigma for chemical formula to sigma per unit cell 1
d_phi deg,0-180 Angle corresponding to the vertical angular range to focus to, e.g. detector height. 0 for no focusing 0
p_interact 1 Fraction of events interacting with sample, e.g. 1-p_transmit-p_inc 0
concentric 1 Indicate that this component has a hollow geometry and may contain other components. It should then be duplicated after the inside part (only for box, cylinder, sphere) 0
density g/cm^3 Density of material. rho=density/weight/1e24*N_A. 0
weight g/mol Atomic/molecular weight of material 0
barns 1 Flag to indicate if |F|^2 from 'reflections' is in barns or fm^2 (barns=1 for laz, barns=0 for lau type files). 1

Output parameters

Name Unit Description Default


  • Source code for PowderN.comp.
  • “Validation of a realistic powder sample using data from DMC at PSI” Willendrup P, Filges U, Keller L, Farhi E, Lefmann K, Physica B-Cond Matt 385 (2006) 1032.
  • See also: Powder1, Powder2 and PowderN
  • See ICSD Inorganic Crystal Structure Database
  • Cross sections for single elements:
  • Cross sections for compounds:
  • Web Elements
  • Fullprof powder refinement:
  • Crystallographica software:
  • Geomview and Object File Format (OFF)
  • Java version of Geomview (display only) jroff.jar
  • Powercrust/qhull

[ Identification | Description | Input parameters | Output parameters | Links ]

Generated automatically by McDoc, Peter Willendrup <> / Tue Aug 16 12:59:11 2016

Last Modified: Tuesday, 16-Aug-2016 14:59:11 CEST
Search website mailinglist archive SVN repos McCode Trac