1 | r""" |
---|
2 | Calculates the scattering from a **simple cubic lattice** with |
---|
3 | paracrystalline distortion. Thermal vibrations are considered to be |
---|
4 | negligible, and the size of the paracrystal is infinitely large. |
---|
5 | Paracrystalline distortion is assumed to be isotropic and characterized |
---|
6 | by a Gaussian distribution. |
---|
7 | |
---|
8 | Definition |
---|
9 | ---------- |
---|
10 | |
---|
11 | The scattering intensity $I(q)$ is calculated as |
---|
12 | |
---|
13 | .. math:: |
---|
14 | |
---|
15 | I(q) = \text{scale}\frac{V_\text{lattice}P(q)Z(q)}{V_p} + \text{background} |
---|
16 | |
---|
17 | where scale is the volume fraction of spheres, $V_p$ is the volume of |
---|
18 | the primary particle, $V_\text{lattice}$ is a volume correction for the crystal |
---|
19 | structure, $P(q)$ is the form factor of the sphere (normalized), and |
---|
20 | $Z(q)$ is the paracrystalline structure factor for a simple cubic structure. |
---|
21 | |
---|
22 | Equation (16) of the 1987 reference is used to calculate $Z(q)$, using |
---|
23 | equations (13)-(15) from the 1987 paper for Z1, Z2, and Z3. |
---|
24 | |
---|
25 | The lattice correction (the occupied volume of the lattice) for a simple |
---|
26 | cubic structure of particles of radius *R* and nearest neighbor separation *D* is |
---|
27 | |
---|
28 | .. math:: |
---|
29 | |
---|
30 | V_\text{lattice}=\frac{4\pi}{3}\frac{R^3}{D^3} |
---|
31 | |
---|
32 | The distortion factor (one standard deviation) of the paracrystal is included |
---|
33 | in the calculation of $Z(q)$ |
---|
34 | |
---|
35 | .. math:: |
---|
36 | |
---|
37 | \Delta a = gD |
---|
38 | |
---|
39 | where *g* is a fractional distortion based on the nearest neighbor distance. |
---|
40 | |
---|
41 | The simple cubic lattice is |
---|
42 | |
---|
43 | .. figure:: img/sc_crystal_geometry.jpg |
---|
44 | |
---|
45 | For a crystal, diffraction peaks appear at reduced q-values given by |
---|
46 | |
---|
47 | .. math:: |
---|
48 | |
---|
49 | \frac{qD}{2\pi} = \sqrt{h^2+k^2+l^2} |
---|
50 | |
---|
51 | where for a simple cubic lattice any h, k, l are allowed and none are |
---|
52 | forbidden. Thus the peak positions correspond to (just the first 5) |
---|
53 | |
---|
54 | .. math:: |
---|
55 | :nowrap: |
---|
56 | |
---|
57 | \begin{align*} |
---|
58 | q/q_0 \quad & \quad 1 |
---|
59 | & \sqrt{2} \quad |
---|
60 | & \quad \sqrt{3} \quad |
---|
61 | & \sqrt{4} \quad |
---|
62 | & \quad \sqrt{5}\quad \\ |
---|
63 | Indices \quad & (100) |
---|
64 | & \quad (110) \quad |
---|
65 | & \quad (111) |
---|
66 | & (200) \quad |
---|
67 | & \quad (210) |
---|
68 | \end{align*} |
---|
69 | |
---|
70 | .. note:: |
---|
71 | |
---|
72 | The calculation of *Z(q)* is a double numerical integral that must be |
---|
73 | carried out with a high density of points to properly capture the sharp |
---|
74 | peaks of the paracrystalline scattering. |
---|
75 | So be warned that the calculation is SLOW. Go get some coffee. |
---|
76 | Fitting of any experimental data must be resolution smeared for any |
---|
77 | meaningful fit. This makes a triple integral. Very, very slow. |
---|
78 | Go get lunch! |
---|
79 | |
---|
80 | The 2D (Anisotropic model) is based on the reference below where *I(q)* is |
---|
81 | approximated for 1d scattering. Thus the scattering pattern for 2D may not |
---|
82 | be accurate. Note that we are not responsible for any incorrectness of the 2D |
---|
83 | model computation. |
---|
84 | |
---|
85 | .. figure:: img/parallelepiped_angle_definition.png |
---|
86 | |
---|
87 | Orientation of the crystal with respect to the scattering plane, when |
---|
88 | $\theta = \phi = 0$ the $c$ axis is along the beam direction (the $z$ axis). |
---|
89 | |
---|
90 | Reference |
---|
91 | --------- |
---|
92 | Hideki Matsuoka et. al. *Physical Review B,* 36 (1987) 1754-1765 |
---|
93 | (Original Paper) |
---|
94 | |
---|
95 | Hideki Matsuoka et. al. *Physical Review B,* 41 (1990) 3854 -3856 |
---|
96 | (Corrections to FCC and BCC lattice structure calculation) |
---|
97 | |
---|
98 | """ |
---|
99 | |
---|
100 | from numpy import inf |
---|
101 | |
---|
102 | name = "sc_paracrystal" |
---|
103 | title = "Simple cubic lattice with paracrystalline distortion" |
---|
104 | description = """ |
---|
105 | P(q)=(scale/Vp)*V_lattice*P(q)*Z(q)+bkg where scale is the volume |
---|
106 | fraction of sphere, |
---|
107 | Vp = volume of the primary particle, |
---|
108 | V_lattice = volume correction for |
---|
109 | for the crystal structure, |
---|
110 | P(q)= form factor of the sphere (normalized), |
---|
111 | Z(q)= paracrystalline structure factor |
---|
112 | for a simple cubic structure. |
---|
113 | [Simple Cubic ParaCrystal Model] |
---|
114 | Parameters; |
---|
115 | scale: volume fraction of spheres |
---|
116 | bkg:background, R: radius of sphere |
---|
117 | dnn: Nearest neighbor distance |
---|
118 | d_factor: Paracrystal distortion factor |
---|
119 | radius: radius of the spheres |
---|
120 | sldSph: SLD of the sphere |
---|
121 | sldSolv: SLD of the solvent |
---|
122 | """ |
---|
123 | category = "shape:paracrystal" |
---|
124 | single = False |
---|
125 | # pylint: disable=bad-whitespace, line-too-long |
---|
126 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
127 | parameters = [["dnn", "Ang", 220.0, [0.0, inf], "", "Nearest neighbor distance"], |
---|
128 | ["d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], |
---|
129 | ["radius", "Ang", 40.0, [0.0, inf], "volume", "Radius of sphere"], |
---|
130 | ["sld", "1e-6/Ang^2", 3.0, [0.0, inf], "sld", "Sphere scattering length density"], |
---|
131 | ["sld_solvent", "1e-6/Ang^2", 6.3, [0.0, inf], "sld", "Solvent scattering length density"], |
---|
132 | ["n", "", 150, [0,inf], "", "integration order"], |
---|
133 | ["sym", "", 1, [0,1], "", "use symmetry"], |
---|
134 | ["theta", "degrees", 0, [-360, 360], "orientation", "c axis to beam angle"], |
---|
135 | ["phi", "degrees", 0, [-360, 360], "orientation", "rotation about beam"], |
---|
136 | ["psi", "degrees", 0, [-360, 360], "orientation", "rotation about c axis"] |
---|
137 | ] |
---|
138 | # pylint: enable=bad-whitespace, line-too-long |
---|
139 | |
---|
140 | source = ["lib/sas_3j1x_x.c", "lib/sphere_form.c", "lib/gauss150.c", "sc.c"] |
---|
141 | |
---|
142 | demo = dict(scale=1, background=0, |
---|
143 | dnn=220.0, |
---|
144 | d_factor=0.06, |
---|
145 | radius=40.0, |
---|
146 | sld=3.0, |
---|
147 | sld_solvent=6.3, |
---|
148 | theta=0.0, |
---|
149 | phi=0.0, |
---|
150 | psi=0.0) |
---|
151 | |
---|
152 | tests = [ |
---|
153 | # Accuracy tests based on content in test/utest_extra_models.py, 2d tests added April 10, 2017 |
---|
154 | [{}, 0.001, 10.3048], |
---|
155 | [{}, 0.215268, 0.00814889], |
---|
156 | [{}, 0.414467, 0.001313289], |
---|
157 | [{'theta':10.0,'phi':20,'psi':30.0},(0.045,-0.035),18.0397138402 ], |
---|
158 | [{'theta':10.0,'phi':20,'psi':30.0},(0.023,0.045),0.0177333171285 ] |
---|
159 | ] |
---|