|
2 | 2 | # Note: model title and parameter table are inserted automatically |
3 | 3 | r""" |
4 | 4 | This model provides the form factor P(q) for a general octahedron. |
5 | | -It can be a regular octahedron shape with all edges of the same length. |
| 5 | +It can be a regular octahedron, with all edges of equal length. |
6 | 6 | Or a general shape with different elongations along the three perpendicular two-fold axes. |
7 | 7 | It includes the possibility to add an adjustable square truncation at each of the six vertices. |
8 | 8 | This model includes the general cuboctahedron shape for the maximum value of truncation. |
|
13 | 13 | Definition |
14 | 14 | ---------- |
15 | 15 |
|
16 | | -The general octahedron is defined by its dimensions along its three perpendicular two-fold axes along x, y and z directions. |
17 | | -:math:`radius_a`, :math:`radius_b` and :math:`radius_c` are the distances from the center of the general octahedron to its 6 vertices, |
| 16 | +This model computes the form factor of a general octahedron by defining its size through |
| 17 | +its circumradius :math:`radius_a` (parameter called *radius_a* in the model), |
| 18 | +the elongations through the ratios :math:`\frac{b}{a}` and :math:`\frac{c}{a}` (parameters called *b2a_ratio* and *c2a_ratio* in the model) and the truncation level through the |
| 19 | +truncation ratio *t* (parameter called *truncation* in the model). |
| 20 | +
|
| 21 | +Indeed, the general octahedron is defined by its dimensions along its three perpendicular two-fold axes along x, y and z directions. |
| 22 | +:math:`radius_a` (parameter called *radius_a* in the model), :math:`radius_b` and :math:`radius_c` are the distances from the center of the general octahedron to its 6 vertices, |
18 | 23 | which are equivalent to the circumradiuses of the general octahedron along the three directions. |
19 | 24 |
|
20 | 25 | Coordinates of the six vertices are: |
21 | | - (:math:`radius_a`, 0, 0), |
22 | | - (:math:`-radius_a`, 0, 0), |
23 | | - (0, :math:`radius_b`, 0), |
24 | | - (0, :math:`-radius_b`, 0), |
25 | | - (0, 0, :math:`radius_c`), |
26 | | - (0, 0, :math:`-radius_c`) |
| 26 | +
|
| 27 | +.. math:: |
| 28 | +
|
| 29 | + (radius_a,\ 0,\ 0) \\ |
| 30 | + (-radius_a,\ 0,\ 0) \\ |
| 31 | + (0,\ radius_b,\ 0) \\ |
| 32 | + (0,\ -radius_b,\ 0) \\ |
| 33 | + (0,\ 0,\ radius_c) \\ |
| 34 | + (0,\ 0,\ -radius_c) |
27 | 35 |
|
28 | 36 | Truncation adds a square facet for each vertex that is perpendicular to a 2-fold axis. |
29 | 37 | The resulting shape consists of six squares and eight hexagons, which may be irregular depending on the three dimensions. |
30 | | -The user-defined parameter `t` is the truncation ratio and is defined as: 0 ≤ t ≤ 0.5, 0 corresponding to no truncation |
| 38 | +The truncation ratio *t* (parameter called `truncation` in the model) is defined as: 0 ≤ t ≤ 0.5, 0 corresponding to no truncation |
31 | 39 | (full octahedron) and 0.5 corresponding to the maximum truncation (cuboctahedron). |
32 | 40 | For the following formulas, we will use the notation :math:`t_inv = 1 - t`. |
33 | | -Indeed, a square facet crosses the x, y, z directions at distances equal to :math:`t_inv radius_a`, :math:`t_inv radius_b` and :math:`t_inv radius_c`. |
| 41 | +Indeed, a square facet crosses the x, y, z directions at distances equal to |
| 42 | +:math:`t_{\mathrm{inv}} \, radius_a`, :math:`t_{\mathrm{inv}} \, radius_b` and :math:`t_{\mathrm{inv}} \, radius_c`. |
34 | 43 |
|
35 | 44 | A regular octahedron corresponds to: |
36 | 45 |
|
|
44 | 53 |
|
45 | 54 | radius_a = radius_b = radius_c, \quad t = \frac{1}{2} |
46 | 55 |
|
47 | | -The model contains 4 parameters: :math:`radius_a`, the two ratios :math:`b2a_ratio` and :math:`c2a_ratio` and :math:`t`: |
48 | | -
|
49 | | -.. math:: |
50 | | -
|
51 | | - b2a_{\text{ratio}} = \frac{radius_b}{radius_a}, \quad |
52 | | - c2a_{\text{ratio}} = \frac{radius_c}{radius_a}, \quad |
53 | | -
|
54 | | - 0 ≤ t ≤ \frac{1}{2} |
55 | | -
|
56 | | -
|
57 | 56 |
|
58 | | -For a regular shape: |
| 57 | +The volume of the general shape including truncation is given by: |
59 | 58 |
|
60 | 59 | .. math:: |
61 | 60 |
|
62 | | - b2a_{\text{ratio}} = c2a_{\text{ratio}} = 1 |
63 | | -
|
64 | | -Volume of the general shape including truncation is given by: |
65 | | -
|
66 | | -.. math:: |
67 | | -
|
68 | | - V = \frac{4}{3}\, radius_{\text{a}}^{3}\, b2a_{\text{ratio}}\, c2a_{\text{ratio}}\,\bigl(1 - 3t^{3}\bigr) |
| 61 | + V = \frac{4}{3}\, radius_{\text{a}}^{3}\, \frac{b}{a}\, \frac{c}{a}\,\bigl(1 - 3t^{3}\bigr) |
69 | 62 |
|
70 | 63 | The general octahedron is made of eight triangular faces. The three edge lengths |
71 | 64 | are: |
|
80 | 73 |
|
81 | 74 | .. math:: |
82 | 75 |
|
83 | | - b2a_{\text{ratio}} = c2a_{\text{ratio}} = 1,\qquad |
84 | | - A_{\text{edge}} = B_{\text{edge}} = C_{\text{edge}} = radius_{\text{a}} \sqrt{2},\qquad |
| 76 | + \frac{b}{a} = \frac{c}{a} = 1 |
| 77 | +
|
| 78 | +.. math:: |
| 79 | +
|
| 80 | + A_{\text{edge}} = B_{\text{edge}} = C_{\text{edge}} = radius_{\text{a}} \sqrt{2} |
| 81 | +
|
| 82 | +.. math:: |
| 83 | + |
85 | 84 | radius_{\text{a}} = radius_{\text{b}} = radius_{\text{c}} = A_{\text{edge}} / \sqrt{2} |
86 | 85 |
|
87 | 86 | .. math:: |
|
98 | 97 | .. math:: |
99 | 98 |
|
100 | 99 | AA = \frac{1}{2\,(q_y^2 - q_z^2)\,(q_y^2 - q_x^2)}\Big[(q_y - q_x)\sin\big(q_y t - q_x t_{\text{inv}}\big) |
101 | | - + (q_y + q_x)\sin\big(q_y t + q_x t_{\text{inv}}\big)\Big] |
| 100 | + + (q_y + q_x)\sin\big(q_y t + q_x t_{\text{inv}}\big)\Big] \\ |
102 | 101 | + \frac{1}{2\,(q_z^2 - q_x^2)\,(q_z^2 - q_y^2)}\Big[(q_z - q_x)\sin\big(q_z t - q_x t_{\text{inv}}\big) |
103 | 102 | + (q_z + q_x)\sin\big(q_z t + q_x t_{\text{inv}}\big)\Big] |
104 | 103 |
|
105 | 104 | .. math:: |
106 | 105 |
|
107 | 106 | BB = \frac{1}{2\,(q_z^2 - q_x^2)\,(q_z^2 - q_y^2)}\Big[(q_z - q_y)\sin\big(q_z t - q_y t_{\text{inv}}\big) |
108 | | - + (q_z + q_y)\sin\big(q_z t + q_y t_{\text{inv}}\big)\Big] |
| 107 | + + (q_z + q_y)\sin\big(q_z t + q_y t_{\text{inv}}\big)\Big] \\ |
109 | 108 | + \frac{1}{2\,(q_x^2 - q_y^2)\,(q_x^2 - q_z^2)}\Big[(q_x - q_y)\sin\big(q_x t - q_y t_{\text{inv}}\big) |
110 | 109 | + (q_x + q_y)\sin\big(q_x t + q_y t_{\text{inv}}\big)\Big] |
111 | 110 |
|
112 | 111 | .. math:: |
113 | 112 |
|
114 | 113 | CC = \frac{1}{2\,(q_x^2 - q_y^2)\,(q_x^2 - q_z^2)}\Big[(q_x - q_z)\sin\big(q_x t - q_z t_{\text{inv}}\big) |
115 | | - + (q_x + q_z)\sin\big(q_x t + q_z t_{\text{inv}}\big)\Big] |
| 114 | + + (q_x + q_z)\sin\big(q_x t + q_z t_{\text{inv}}\big)\Big] \\ |
116 | 115 | + \frac{1}{2\,(q_y^2 - q_z^2)\,(q_y^2 - q_x^2)}\Big[(q_y - q_z)\sin\big(q_y t - q_z t_{\text{inv}}\big) |
117 | 116 | + (q_y + q_z)\sin\big(q_y t + q_z t_{\text{inv}}\big)\Big] |
118 | 117 |
|
|
165 | 164 |
|
166 | 165 | .. figure:: img/octahedrons_intensity_plot.png |
167 | 166 |
|
168 | | - Scattering intensity of a cuboctahedron (t=0.5) and a regular octahedron (t=0) of a = 300 Angstroms. |
| 167 | + Scattering intensity of a cuboctahedron (t=0.5) and a regular octahedron (t=0) of radius_a = 400 Å. |
169 | 168 |
|
170 | 169 | Validation |
171 | 170 | ---------- |
172 | 171 |
|
173 | 172 | Validation of the code is made using numerical checks. |
174 | 173 | Comparisons with Debye formula calculations were made using DebyeCalculator library (https://github.com/FrederikLizakJohansen/DebyeCalculator). |
175 | | -Good agreement was found at q < 0.1 1/Angstrom. |
| 174 | +Good agreement was found at q < 0.1 1/Å. |
176 | 175 |
|
177 | 176 | References |
178 | 177 | ---------- |
179 | 178 |
|
180 | | -1. Wei-Ren Chen et al. "Scattering functions of Platonic solids". |
181 | | - In: Journal of Applied Crystallography - J APPL CRYST 44 (June 2011). |
182 | | - DOI: 10.1107/S0021889811011691 |
| 179 | +1. Li, X., Shew, C., He, L., Meilleur, F., Myles, D. A. A., Liu, E., Zhang, Y., Smith, G. S., |
| 180 | + Herwig, K. W., Pynn, R., & Chen, W. (2011). Scattering functions of Platonic solids. |
| 181 | + *Journal Of Applied Crystallography*, 44(3), 545‑557. https://doi.org/10.1107/s0021889811011691 |
| 182 | +
|
| 183 | +2. Croset, B. (2017). Form factor of any polyhedron : a general compact formula and its singularities. |
| 184 | + *Journal Of Applied Crystallography*, 50(5), 1245‑1255. https://doi.org/10.1107/s1600576717010147 |
183 | 185 |
|
184 | | -2. Croset, Bernard, "Form factor of any polyhedron: a general compact |
185 | | - formula and its singularities" In: J. Appl. Cryst. (2017). 50, 1245–1255 |
186 | | - https://doi.org/10.1107/S1600576717010147 |
| 186 | +3. Wuttke, J. (2021). Numerically stable form factor of any polygon and polyhedron. |
| 187 | + *Journal Of Applied Crystallography*, 54(2), 580‑587. https://doi.org/10.1107/s1600576721001710 |
187 | 188 |
|
188 | | -3. Wuttke, J. Numerically stable form factor of any polygon and polyhedron |
189 | | - J Appl Cryst 54, 580-587 (2021) |
190 | | - https://doi.org/10.1107/S160057672100171 |
191 | 189 |
|
192 | 190 | Authorship and Verification |
193 | 191 | ---------------------------- |
|
0 commit comments