compute xrd command
compute ID group-ID xrd lambda type1 type2 ... typeN keyword value ...
ID, group-ID are documented in compute command
xrd = style name of this compute command
lambda = wavelength of incident radiation (length units)
type1 type2 … typeN = chemical symbol of each atom type (see valid options below)
zero or more keyword/value pairs may be appended
keyword = 2Theta or c or LP or manual or echo
2Theta values = Min2Theta Max2Theta Min2Theta,Max2Theta = minimum and maximum 2 theta range to explore (radians or degrees) c values = c1 c2 c3 c1,c2,c3 = parameters to adjust the spacing of the reciprocal lattice nodes in the h, k, and l directions respectively LP value = switch to apply Lorentz-polarization factor 0/1 = off/on manual = flag to use manual spacing of reciprocal lattice points based on the values of the c parameters echo = flag to provide extra output for debugging purposes
compute 1 all xrd 1.541838 Al O 2Theta 0.087 0.87 c 1 1 1 LP 1 echo compute 2 all xrd 1.541838 Al O 2Theta 10 100 c 0.05 0.05 0.05 LP 1 manual fix 1 all ave/histo/weight 1 1 1 0.087 0.87 250 c_1 c_1 mode vector file Rad2Theta.xrd fix 2 all ave/histo/weight 1 1 1 10 100 250 c_2 c_2 mode vector file Deg2Theta.xrd
Define a computation that calculates x-ray diffraction intensity as described in (Coleman) on a mesh of reciprocal lattice nodes defined by the entire simulation domain (or manually) using a simulated radiation of wavelength lambda.
The x-ray diffraction intensity, I, at each reciprocal lattice point, k, is computed from the structure factor, F, using the equations:
Here, K is the location of the reciprocal lattice node, rj is the position of each atom, fj are atomic scattering factors, LP is the Lorentz-polarization factor, and theta is the scattering angle of diffraction. The Lorentz-polarization factor can be turned off using the optional LP keyword.
Diffraction intensities are calculated on a three-dimensional mesh of reciprocal lattice nodes. The mesh spacing is defined either (a) by the entire simulation domain or (b) manually using selected values as shown in the 2D diagram below.
For a mesh defined by the simulation domain, a rectilinear grid is constructed with spacing c*inv(A) along each reciprocal lattice axis. Where A are the vectors corresponding to the edges of the simulation cell. If one or two directions has non-periodic boundary conditions, then the spacing in these directions is defined from the average of the (inversed) box lengths with periodic boundary conditions. Meshes defined by the simulation domain must contain at least one periodic boundary.
If the manual flag is included, the mesh of reciprocal lattice nodes will defined using the c values for the spacing along each reciprocal lattice axis. Note that manual mapping of the reciprocal space mesh is good for comparing diffraction results from multiple simulations; however it can reduce the likelihood that Bragg reflections will be satisfied unless small spacing parameters (< 0.05 Angstrom^(-1)) are implemented. Meshes with manual spacing do not require a periodic boundary.
The limits of the reciprocal lattice mesh are determined by range of scattering angles explored. The 2Theta parameters allows the user to reduce the scattering angle range to only the region of interest which reduces the cost of the computation.
The atomic scattering factors, fj, accounts for the reduction in diffraction intensity due to Compton scattering. Compute xrd uses analytical approximations of the atomic scattering factors that vary for each atom type (type1 type2 … typeN) and angle of diffraction. The analytic approximation is computed using the formula (Colliex):
Coefficients parameterized by (Peng) are assigned for each atom type designating the chemical symbol and charge of each atom type. Valid chemical symbols for compute xrd are:
If the echo keyword is specified, compute xrd will provide extra reporting information to the screen.
This compute calculates a global array. The number of rows in the array is the number of reciprocal lattice nodes that are explored which by the mesh. The global array has 2 columns.
The first column contains the diffraction angle in the units (radians or degrees) provided with the 2Theta values. The second column contains the computed diffraction intensities as described above.
The array can be accessed by any command that uses global values from a compute as input. See this section for an overview of LAMMPS output options.
All array values calculated by this compute are “intensive”.
This compute is part of the USER-DIFFRACTION package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
The compute_xrd command does not work for triclinic cells.
The option defaults are 2Theta = 1 179 (degrees), c = 1 1 1, LP = 1, no manual flag, no echo flag.
(Coleman) Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013).
(Colliex) Colliex et al. International Tables for Crystallography Volume C: Mathematical and Chemical Tables, 249-429 (2004).
(Peng) Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76 (1996).