1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
9 compute xrd command :h3
13 compute ID group-ID xrd lambda type1 type2 ... typeN keyword value ... :pre
15 ID, group-ID are documented in "compute"_compute.html command :ulb,l
16 xrd = style name of this compute command :l
17 lambda = wavelength of incident radiation (length units) :l
18 type1 type2 ... typeN = chemical symbol of each atom type (see valid options below) :l
20 zero or more keyword/value pairs may be appended :l
21 keyword = {2Theta} or {c} or {LP} or {manual} or {echo} :l
22 {2Theta} values = Min2Theta Max2Theta
23 Min2Theta,Max2Theta = minimum and maximum 2 theta range to explore
26 c1,c2,c3 = parameters to adjust the spacing of the reciprocal
27 lattice nodes in the h, k, and l directions respectively
28 {LP} value = switch to apply Lorentz-polarization factor
30 {manual} = flag to use manual spacing of reciprocal lattice points
31 based on the values of the {c} parameters
32 {echo} = flag to provide extra output for debugging purposes :pre
37 compute 1 all xrd 1.541838 Al O 2Theta 0.087 0.87 c 1 1 1 LP 1 echo
38 compute 2 all xrd 1.541838 Al O 2Theta 10 100 c 0.05 0.05 0.05 LP 1 manual :pre
40 fix 1 all ave/histo/weight 1 1 1 0.087 0.87 250 c_1\[1\] c_1\[2\] mode vector file Rad2Theta.xrd
41 fix 2 all ave/histo/weight 1 1 1 10 100 250 c_2\[1\] c_2\[2\] mode vector file Deg2Theta.xrd :pre
45 Define a computation that calculates x-ray diffraction intensity as described
46 in "(Coleman)"_#xrd-Coleman on a mesh of reciprocal lattice nodes defined
47 by the entire simulation domain (or manually) using a simulated radiation
50 The x-ray diffraction intensity, I, at each reciprocal lattice point, k,
51 is computed from the structure factor, F, using the equations:
53 :c,image(Eqs/compute_xrd1.jpg)
54 :c,image(Eqs/compute_xrd2.jpg)
55 :c,image(Eqs/compute_xrd3.jpg)
56 :c,image(Eqs/compute_xrd4.jpg)
58 Here, K is the location of the reciprocal lattice node, rj is the
59 position of each atom, fj are atomic scattering factors, LP is the
60 Lorentz-polarization factor, and theta is the scattering angle of
61 diffraction. The Lorentz-polarization factor can be turned off using
62 the optional {LP} keyword.
64 Diffraction intensities are calculated on a three-dimensional mesh of
65 reciprocal lattice nodes. The mesh spacing is defined either (a)
66 by the entire simulation domain or (b) manually using selected values as
67 shown in the 2D diagram below.
69 :c,image(JPG/xrd_mesh_small.jpg,JPG/xrd_mesh.jpg)
72 For a mesh defined by the simulation domain, a rectilinear grid is
73 constructed with spacing {c}*inv(A) along each reciprocal lattice
74 axis. Where A are the vectors corresponding to the edges of the
75 simulation cell. If one or two directions has non-periodic boundary
76 conditions, then the spacing in these directions is defined from the
77 average of the (inversed) box lengths with periodic boundary conditions.
78 Meshes defined by the simulation domain must contain at least one periodic
81 If the {manual} flag is included, the mesh of reciprocal lattice nodes
82 will defined using the {c} values for the spacing along each
83 reciprocal lattice axis. Note that manual mapping of the reciprocal
84 space mesh is good for comparing diffraction results from multiple
85 simulations; however it can reduce the likelihood that Bragg
86 reflections will be satisfied unless small spacing parameters (< 0.05
87 Angstrom^(-1)) are implemented. Meshes with manual spacing do not
88 require a periodic boundary.
90 The limits of the reciprocal lattice mesh are determined by range of
91 scattering angles explored. The {2Theta} parameters allows the user
92 to reduce the scattering angle range to only the region of interest
93 which reduces the cost of the computation.
95 The atomic scattering factors, fj, accounts for the reduction in
96 diffraction intensity due to Compton scattering. Compute xrd uses
97 analytical approximations of the atomic scattering factors that vary
98 for each atom type (type1 type2 ... typeN) and angle of diffraction.
99 The analytic approximation is computed using the formula
100 "(Colliex)"_#Colliex:
102 :c,image(Eqs/compute_xrd5.jpg)
104 Coefficients parameterized by "(Peng)"_#Peng are assigned for each
105 atom type designating the chemical symbol and charge of each atom
106 type. Valid chemical symbols for compute xrd are:
108 H| He1-| He| Li| Li1+|
109 Be| Be2+| B| C| Cval|
111 Ne| Na| Na1+| Mg| Mg2+|
112 Al| Al3+| Si| Sival| Si4+|
114 K| Ca| Ca2+| Sc| Sc3+|
115 Ti| Ti2+| Ti3+| Ti4+| V|
116 V2+| V3+| V5+| Cr| Cr2+|
117 Cr3+| Mn| Mn2+| Mn3+| Mn4+|
118 Fe| Fe2+| Fe3+| Co| Co2+|
119 Co| Ni| Ni2+| Ni3+| Cu|
120 Cu1+| Cu2+| Zn| Zn2+| Ga|
121 Ga3+| Ge| Ge4+| As| Se|
122 Br| Br1-| Kr| Rb| Rb1+|
123 Sr| Sr2+| Y| Y3+| Zr|
124 Zr4+| Nb| Nb3+| Nb5+| Mo|
125 Mo3+| Mo5+| Mo6+| Tc| Ru|
126 Ru3+| Ru4+| Rh| Rh3+| Rh4+|
127 Pd| Pd2+| Pd4+| Ag| Ag1+|
128 Ag2+| Cd| Cd2+| In| In3+|
129 Sn| Sn2+| Sn4+| Sb| Sb3+|
130 Sb5+| Te| I| I1-| Xe|
131 Cs| Cs1+| Ba| Ba2+| La|
132 La3+| Ce| Ce3+| Ce4+| Pr|
133 Pr3+| Pr4+| Nd| Nd3+| Pm|
134 Pm3+| Sm| Sm3+| Eu| Eu2+|
135 Eu3+| Gd| Gd3+| Tb| Tb3+|
136 Dy| Dy3+| Ho| Ho3+| Er|
137 Er3+| Tm| Tm3+| Yb| Yb2+|
138 Yb3+| Lu| Lu3+| Hf| Hf4+|
139 Ta| Ta5+| W| W6+| Re|
140 Os| Os4+| Ir| Ir3+| Ir4+|
141 Pt| Pt2+| Pt4+| Au| Au1+|
142 Au3+| Hg| Hg1+| Hg2+| Tl|
143 Tl1+| Tl3+| Pb| Pb2+| Pb4+|
144 Bi| Bi3+| Bi5+| Po| At|
145 Rn| Fr| Ra| Ra2+| Ac|
146 Ac3+| Th| Th4+| Pa| U|
147 U3+| U4+| U6+| Np| Np3+|
148 Np4+| Np6+| Pu| Pu3+| Pu4+|
149 Pu6+| Am| Cm| Bk| Cf :tb(c=5,s=|)
151 If the {echo} keyword is specified, compute xrd will provide extra
152 reporting information to the screen.
156 This compute calculates a global array. The number of rows in the
157 array is the number of reciprocal lattice nodes that are explored
158 which by the mesh. The global array has 2 columns.
160 The first column contains the diffraction angle in the units (radians
161 or degrees) provided with the {2Theta} values. The second column contains
162 the computed diffraction intensities as described above.
164 The array can be accessed by any command that uses global values from
165 a compute as input. See "this section"_Section_howto.html#howto_15
166 for an overview of LAMMPS output options.
168 All array values calculated by this compute are "intensive".
172 This compute is part of the USER-DIFFRACTION package. It is only
173 enabled if LAMMPS was built with that package. See the "Making
174 LAMMPS"_Section_start.html#start_3 section for more info.
176 The compute_xrd command does not work for triclinic cells.
180 "fix ave/histo"_fix_ave_histo.html,
181 "compute saed"_compute_saed.html
185 The option defaults are 2Theta = 1 179 (degrees), c = 1 1 1, LP = 1,
186 no manual flag, no echo flag.
191 [(Coleman)] Coleman, Spearot, Capolungo, MSMSE, 21, 055020
195 [(Colliex)] Colliex et al. International Tables for Crystallography
196 Volume C: Mathematical and Chemical Tables, 249-429 (2004).
199 [(Peng)] Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76