1 | #fcc paracrystal model |
---|
2 | #note model title and parameter table are automatically inserted |
---|
3 | #note - calculation requires double precision |
---|
4 | r""" |
---|
5 | Calculates the scattering from a **face-centered cubic lattice** with |
---|
6 | paracrystalline distortion. Thermal vibrations are considered to be |
---|
7 | negligible, and the size of the paracrystal is infinitely large. |
---|
8 | Paracrystalline distortion is assumed to be isotropic and characterized by |
---|
9 | a Gaussian distribution. |
---|
10 | |
---|
11 | Definition |
---|
12 | ---------- |
---|
13 | |
---|
14 | The scattering intensity $I(q)$ is calculated as |
---|
15 | |
---|
16 | .. math:: |
---|
17 | |
---|
18 | I(q) = \frac{\text{scale}}{V_p} V_\text{lattice} P(q) Z(q) |
---|
19 | |
---|
20 | where *scale* is the volume fraction of spheres, $V_p$ is the volume of |
---|
21 | the primary particle, $V_\text{lattice}$ is a volume correction for the crystal |
---|
22 | structure, $P(q)$ is the form factor of the sphere (normalized), and $Z(q)$ |
---|
23 | is the paracrystalline structure factor for a face-centered cubic structure. |
---|
24 | |
---|
25 | Equation (1) of the 1990 reference is used to calculate $Z(q)$, using |
---|
26 | equations (23)-(25) from the 1987 paper for $Z1$, $Z2$, and $Z3$. |
---|
27 | |
---|
28 | The lattice correction (the occupied volume of the lattice) for a |
---|
29 | face-centered cubic structure of particles of radius $R$ and nearest |
---|
30 | neighbor separation $D$ is |
---|
31 | |
---|
32 | .. math:: |
---|
33 | |
---|
34 | V_\text{lattice} = \frac{16\pi}{3}\frac{R^3}{\left(D\sqrt{2}\right)^3} |
---|
35 | |
---|
36 | The distortion factor (one standard deviation) of the paracrystal is |
---|
37 | included in the calculation of $Z(q)$ |
---|
38 | |
---|
39 | .. math:: |
---|
40 | |
---|
41 | \Delta a = gD |
---|
42 | |
---|
43 | where $g$ is a fractional distortion based on the nearest neighbor distance. |
---|
44 | |
---|
45 | .. figure:: img/fcc_lattice.jpg |
---|
46 | |
---|
47 | Face-centered cubic lattice. |
---|
48 | |
---|
49 | For a crystal, diffraction peaks appear at reduced q-values given by |
---|
50 | |
---|
51 | .. math:: |
---|
52 | |
---|
53 | \frac{qD}{2\pi} = \sqrt{h^2 + k^2 + l^2} |
---|
54 | |
---|
55 | where for a face-centered cubic lattice $h, k , l$ all odd or all |
---|
56 | even are allowed and reflections where $h, k, l$ are mixed odd/even |
---|
57 | are forbidden. Thus the peak positions correspond to (just the first 5) |
---|
58 | |
---|
59 | .. math:: |
---|
60 | |
---|
61 | \begin{array}{cccccc} |
---|
62 | q/q_0 & 1 & \sqrt{4/3} & \sqrt{8/3} & \sqrt{11/3} & \sqrt{4} \\ |
---|
63 | \text{Indices} & (111) & (200) & (220) & (311) & (222) |
---|
64 | \end{array} |
---|
65 | |
---|
66 | **NB**: The calculation of $Z(q)$ is a double numerical integral that |
---|
67 | must be carried out with a high density of points to properly capture |
---|
68 | the sharp peaks of the paracrystalline scattering. So be warned that the |
---|
69 | calculation is SLOW. Go get some coffee. Fitting of any experimental data |
---|
70 | must be resolution smeared for any meaningful fit. This makes a triple |
---|
71 | integral. Very, very slow. Go get lunch! |
---|
72 | |
---|
73 | This example dataset is produced using 200 data points, *qmin* = 0.01 |Ang^-1|, |
---|
74 | *qmax* = 0.1 |Ang^-1| and the above default values. |
---|
75 | |
---|
76 | .. figure:: img/fcc_1d.jpg |
---|
77 | |
---|
78 | 1D plot in the linear scale using the default values (w/200 data point). |
---|
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 |
---|
83 | 2D model computation. |
---|
84 | |
---|
85 | .. figure:: img/crystal_orientation.png |
---|
86 | |
---|
87 | Orientation of the crystal with respect to the scattering plane. |
---|
88 | |
---|
89 | .. figure:: img/fcc_2d.jpg |
---|
90 | |
---|
91 | 2D plot using the default values (w/200X200 pixels). |
---|
92 | |
---|
93 | References |
---|
94 | ---------- |
---|
95 | |
---|
96 | Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 |
---|
97 | (Original Paper) |
---|
98 | |
---|
99 | Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 |
---|
100 | (Corrections to FCC and BCC lattice structure calculation) |
---|
101 | """ |
---|
102 | |
---|
103 | from numpy import inf |
---|
104 | |
---|
105 | name = "fcc_paracrystal" |
---|
106 | title = "Face-centred cubic lattic with paracrystalline distortion" |
---|
107 | description = """ |
---|
108 | Calculates the scattering from a **face-centered cubic lattice** with paracrystalline distortion. Thermal vibrations |
---|
109 | are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is |
---|
110 | assumed to be isotropic and characterized by a Gaussian distribution. |
---|
111 | """ |
---|
112 | category = "shape:paracrystal" |
---|
113 | |
---|
114 | single = False |
---|
115 | |
---|
116 | # pylint: disable=bad-whitespace, line-too-long |
---|
117 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
118 | parameters = [["dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"], |
---|
119 | ["d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], |
---|
120 | ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], |
---|
121 | ["sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Particle scattering length density"], |
---|
122 | ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"], |
---|
123 | ["theta", "degrees", 60, [-inf, inf], "orientation", "In plane angle"], |
---|
124 | ["phi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"], |
---|
125 | ["psi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"] |
---|
126 | ] |
---|
127 | # pylint: enable=bad-whitespace, line-too-long |
---|
128 | |
---|
129 | source = ["lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc.c"] |
---|
130 | |
---|
131 | # parameters for demo |
---|
132 | demo = dict(scale=1, background=0, |
---|
133 | dnn=220, d_factor=0.06, sld=4, solvent_sld=1, |
---|
134 | radius=40, |
---|
135 | theta=60, phi=60, psi=60, |
---|
136 | radius_pd=.2, radius_pd_n=0.2, |
---|
137 | theta_pd=15, theta_pd_n=0, |
---|
138 | phi_pd=15, phi_pd_n=0, |
---|
139 | psi_pd=15, psi_pd_n=0, |
---|
140 | ) |
---|
141 | |
---|
142 | # For testing against the old sasview models, include the converted parameter |
---|
143 | # names and the target sasview model name. |
---|
144 | oldname = 'FCCrystalModel' |
---|
145 | oldpars = dict(sld='sldSph', solvent_sld='sldSolv') |
---|