symcrys 0.10.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/README.md +6 -6
  2. package/dist/cell.d.ts +19 -16
  3. package/dist/cell.d.ts.map +1 -1
  4. package/dist/cell.js +63 -35
  5. package/dist/cell.js.map +1 -1
  6. package/dist/checks.d.ts +29 -0
  7. package/dist/checks.d.ts.map +1 -0
  8. package/dist/checks.js +79 -0
  9. package/dist/checks.js.map +1 -0
  10. package/dist/closure.d.ts +43 -0
  11. package/dist/closure.d.ts.map +1 -0
  12. package/dist/closure.js +201 -0
  13. package/dist/closure.js.map +1 -0
  14. package/dist/coordinates.d.ts +143 -0
  15. package/dist/coordinates.d.ts.map +1 -0
  16. package/dist/coordinates.js +198 -0
  17. package/dist/coordinates.js.map +1 -0
  18. package/dist/crystalClasses.d.ts +170 -117
  19. package/dist/crystalClasses.d.ts.map +1 -1
  20. package/dist/crystalClasses.js +190 -121
  21. package/dist/crystalClasses.js.map +1 -1
  22. package/dist/freeze.d.ts +7 -0
  23. package/dist/freeze.d.ts.map +1 -0
  24. package/dist/freeze.js +15 -0
  25. package/dist/freeze.js.map +1 -0
  26. package/dist/index.d.ts +13 -10
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +5 -3
  29. package/dist/index.js.map +1 -1
  30. package/dist/indices.d.ts +30 -20
  31. package/dist/indices.d.ts.map +1 -1
  32. package/dist/indices.js +101 -31
  33. package/dist/indices.js.map +1 -1
  34. package/dist/lattice.d.ts +15 -1
  35. package/dist/lattice.d.ts.map +1 -1
  36. package/dist/lattice.js +30 -1
  37. package/dist/lattice.js.map +1 -1
  38. package/dist/linalg.d.ts +2 -2
  39. package/dist/linalg.d.ts.map +1 -1
  40. package/dist/linalg.js +3 -3
  41. package/dist/linalg.js.map +1 -1
  42. package/dist/magnetic.d.ts +14 -10
  43. package/dist/magnetic.d.ts.map +1 -1
  44. package/dist/magnetic.js +10 -6
  45. package/dist/magnetic.js.map +1 -1
  46. package/dist/notation.d.ts +16 -0
  47. package/dist/notation.d.ts.map +1 -0
  48. package/dist/notation.js +66 -0
  49. package/dist/notation.js.map +1 -0
  50. package/dist/operations.d.ts +40 -26
  51. package/dist/operations.d.ts.map +1 -1
  52. package/dist/operations.js +48 -60
  53. package/dist/operations.js.map +1 -1
  54. package/dist/plane.d.ts +297 -80
  55. package/dist/plane.d.ts.map +1 -1
  56. package/dist/plane.js +289 -94
  57. package/dist/plane.js.map +1 -1
  58. package/dist/pointGroups/crystalForms.d.ts +6 -21
  59. package/dist/pointGroups/crystalForms.d.ts.map +1 -1
  60. package/dist/pointGroups/crystalForms.js +9 -16
  61. package/dist/pointGroups/crystalForms.js.map +1 -1
  62. package/dist/pointGroups/crystalFormsData.d.ts +4 -1
  63. package/dist/pointGroups/crystalFormsData.d.ts.map +1 -1
  64. package/dist/pointGroups/crystalFormsData.js +64 -1
  65. package/dist/pointGroups/crystalFormsData.js.map +1 -1
  66. package/dist/pointGroups/elements.d.ts +19 -17
  67. package/dist/pointGroups/elements.d.ts.map +1 -1
  68. package/dist/pointGroups/elements.js +65 -83
  69. package/dist/pointGroups/elements.js.map +1 -1
  70. package/dist/pointGroups/identify.d.ts +10 -18
  71. package/dist/pointGroups/identify.d.ts.map +1 -1
  72. package/dist/pointGroups/identify.js +27 -79
  73. package/dist/pointGroups/identify.js.map +1 -1
  74. package/dist/pointGroups/itaOrder.d.ts +15 -14
  75. package/dist/pointGroups/itaOrder.d.ts.map +1 -1
  76. package/dist/pointGroups/itaOrder.js +116 -94
  77. package/dist/pointGroups/itaOrder.js.map +1 -1
  78. package/dist/pointGroups/itcData.d.ts +96 -0
  79. package/dist/pointGroups/itcData.d.ts.map +1 -0
  80. package/dist/pointGroups/itcData.js +336 -0
  81. package/dist/pointGroups/itcData.js.map +1 -0
  82. package/dist/pointGroups/itcMagneticData.d.ts +55 -0
  83. package/dist/pointGroups/itcMagneticData.d.ts.map +1 -0
  84. package/dist/pointGroups/itcMagneticData.js +172 -0
  85. package/dist/pointGroups/itcMagneticData.js.map +1 -0
  86. package/dist/pointGroups/keys.d.ts +32 -0
  87. package/dist/pointGroups/keys.d.ts.map +1 -0
  88. package/dist/pointGroups/keys.js +120 -0
  89. package/dist/pointGroups/keys.js.map +1 -0
  90. package/dist/pointGroups/magneticSymbols.d.ts +6 -5
  91. package/dist/pointGroups/magneticSymbols.d.ts.map +1 -1
  92. package/dist/pointGroups/magneticSymbols.js +15 -12
  93. package/dist/pointGroups/magneticSymbols.js.map +1 -1
  94. package/dist/pointGroups/orbits.d.ts +23 -42
  95. package/dist/pointGroups/orbits.d.ts.map +1 -1
  96. package/dist/pointGroups/orbits.js +20 -62
  97. package/dist/pointGroups/orbits.js.map +1 -1
  98. package/dist/pointGroups/pointGroups.d.ts +145 -68
  99. package/dist/pointGroups/pointGroups.d.ts.map +1 -1
  100. package/dist/pointGroups/pointGroups.js +455 -243
  101. package/dist/pointGroups/pointGroups.js.map +1 -1
  102. package/dist/pointGroups/properties.d.ts +21 -22
  103. package/dist/pointGroups/properties.d.ts.map +1 -1
  104. package/dist/pointGroups/properties.js +40 -37
  105. package/dist/pointGroups/properties.js.map +1 -1
  106. package/dist/pointGroups/seitzData.d.ts +26 -0
  107. package/dist/pointGroups/seitzData.d.ts.map +1 -0
  108. package/dist/pointGroups/seitzData.js +130 -0
  109. package/dist/pointGroups/seitzData.js.map +1 -0
  110. package/dist/pointGroups/shubnikovData.d.ts +11 -0
  111. package/dist/pointGroups/shubnikovData.d.ts.map +1 -0
  112. package/dist/pointGroups/shubnikovData.js +101 -0
  113. package/dist/pointGroups/shubnikovData.js.map +1 -0
  114. package/dist/pointGroups/wyckoff.d.ts +70 -40
  115. package/dist/pointGroups/wyckoff.d.ts.map +1 -1
  116. package/dist/pointGroups/wyckoff.js +98 -91
  117. package/dist/pointGroups/wyckoff.js.map +1 -1
  118. package/dist/pointGroups/wyckoffData.d.ts +7 -4
  119. package/dist/pointGroups/wyckoffData.d.ts.map +1 -1
  120. package/dist/pointGroups/wyckoffData.js +789 -168
  121. package/dist/pointGroups/wyckoffData.js.map +1 -1
  122. package/dist/siteSymmetry.d.ts +8 -16
  123. package/dist/siteSymmetry.d.ts.map +1 -1
  124. package/dist/siteSymmetry.js +34 -24
  125. package/dist/siteSymmetry.js.map +1 -1
  126. package/dist/spaceGroups/affine.d.ts.map +1 -1
  127. package/dist/spaceGroups/affine.js +3 -2
  128. package/dist/spaceGroups/affine.js.map +1 -1
  129. package/dist/spaceGroups/cell.d.ts +43 -31
  130. package/dist/spaceGroups/cell.d.ts.map +1 -1
  131. package/dist/spaceGroups/cell.js +173 -85
  132. package/dist/spaceGroups/cell.js.map +1 -1
  133. package/dist/spaceGroups/describe.d.ts +13 -10
  134. package/dist/spaceGroups/describe.d.ts.map +1 -1
  135. package/dist/spaceGroups/describe.js +11 -10
  136. package/dist/spaceGroups/describe.js.map +1 -1
  137. package/dist/spaceGroups/planeGroupData.d.ts +3 -1
  138. package/dist/spaceGroups/planeGroupData.d.ts.map +1 -1
  139. package/dist/spaceGroups/planeGroupData.js +25 -8
  140. package/dist/spaceGroups/planeGroupData.js.map +1 -1
  141. package/dist/spaceGroups/planeGroups.d.ts.map +1 -1
  142. package/dist/spaceGroups/planeGroups.js +2 -1
  143. package/dist/spaceGroups/planeGroups.js.map +1 -1
  144. package/dist/spaceGroups/planeLattice.d.ts +78 -0
  145. package/dist/spaceGroups/planeLattice.d.ts.map +1 -0
  146. package/dist/spaceGroups/planeLattice.js +143 -0
  147. package/dist/spaceGroups/planeLattice.js.map +1 -0
  148. package/dist/spaceGroups/planePointGroups.d.ts +6 -2
  149. package/dist/spaceGroups/planePointGroups.d.ts.map +1 -1
  150. package/dist/spaceGroups/planePointGroups.js +14 -2
  151. package/dist/spaceGroups/planePointGroups.js.map +1 -1
  152. package/dist/spaceGroups/positions.d.ts +48 -19
  153. package/dist/spaceGroups/positions.d.ts.map +1 -1
  154. package/dist/spaceGroups/positions.js +166 -67
  155. package/dist/spaceGroups/positions.js.map +1 -1
  156. package/dist/spaceGroups/rational.d.ts +18 -0
  157. package/dist/spaceGroups/rational.d.ts.map +1 -1
  158. package/dist/spaceGroups/rational.js +58 -0
  159. package/dist/spaceGroups/rational.js.map +1 -1
  160. package/dist/tensors/propertyTable.d.ts +3 -1
  161. package/dist/tensors/propertyTable.d.ts.map +1 -1
  162. package/dist/tensors/propertyTable.js +17 -10
  163. package/dist/tensors/propertyTable.js.map +1 -1
  164. package/dist/tensors/rowEchelon.d.ts +3 -3
  165. package/dist/tensors/rowEchelon.d.ts.map +1 -1
  166. package/dist/tensors/rowEchelon.js +4 -4
  167. package/dist/tensors/rowEchelon.js.map +1 -1
  168. package/dist/tensors/tensorForm.d.ts +75 -34
  169. package/dist/tensors/tensorForm.d.ts.map +1 -1
  170. package/dist/tensors/tensorForm.js +171 -67
  171. package/dist/tensors/tensorForm.js.map +1 -1
  172. package/dist/tensors/tensorProperties.d.ts +10 -9
  173. package/dist/tensors/tensorProperties.d.ts.map +1 -1
  174. package/dist/tensors/tensorProperties.js +22 -12
  175. package/dist/tensors/tensorProperties.js.map +1 -1
  176. package/dist/tensors/voigt.d.ts +56 -0
  177. package/dist/tensors/voigt.d.ts.map +1 -0
  178. package/dist/tensors/voigt.js +188 -0
  179. package/dist/tensors/voigt.js.map +1 -0
  180. package/dist/tolerances.d.ts +56 -1
  181. package/dist/tolerances.d.ts.map +1 -1
  182. package/dist/tolerances.js +51 -1
  183. package/dist/tolerances.js.map +1 -1
  184. package/dist/version.d.ts +1 -1
  185. package/dist/version.js +1 -1
  186. package/package.json +1 -1
  187. package/src/cell.ts +78 -51
  188. package/src/checks.ts +84 -0
  189. package/src/closure.ts +214 -0
  190. package/src/coordinates.ts +370 -0
  191. package/src/crystalClasses.ts +271 -157
  192. package/src/freeze.ts +14 -0
  193. package/src/index.ts +33 -12
  194. package/src/indices.ts +102 -42
  195. package/src/lattice.ts +41 -1
  196. package/src/linalg.ts +3 -3
  197. package/src/magnetic.ts +24 -11
  198. package/src/notation.ts +73 -0
  199. package/src/operations.ts +78 -71
  200. package/src/plane.ts +531 -151
  201. package/src/pointGroups/crystalForms.ts +11 -44
  202. package/src/pointGroups/crystalFormsData.ts +66 -1
  203. package/src/pointGroups/elements.ts +82 -92
  204. package/src/pointGroups/identify.ts +38 -97
  205. package/src/pointGroups/itaOrder.ts +117 -101
  206. package/src/pointGroups/itcData.ts +404 -0
  207. package/src/pointGroups/itcMagneticData.ts +206 -0
  208. package/src/pointGroups/keys.ts +144 -0
  209. package/src/pointGroups/magneticSymbols.ts +18 -17
  210. package/src/pointGroups/orbits.ts +41 -89
  211. package/src/pointGroups/pointGroups.ts +593 -298
  212. package/src/pointGroups/properties.ts +44 -40
  213. package/src/pointGroups/seitzData.ts +147 -0
  214. package/src/pointGroups/shubnikovData.ts +103 -0
  215. package/src/pointGroups/wyckoff.ts +137 -112
  216. package/src/pointGroups/wyckoffData.ts +793 -170
  217. package/src/siteSymmetry.ts +43 -40
  218. package/src/spaceGroups/affine.ts +3 -2
  219. package/src/spaceGroups/cell.ts +227 -116
  220. package/src/spaceGroups/describe.ts +23 -19
  221. package/src/spaceGroups/planeGroupData.ts +28 -9
  222. package/src/spaceGroups/planeGroups.ts +2 -1
  223. package/src/spaceGroups/planeLattice.ts +208 -0
  224. package/src/spaceGroups/planePointGroups.ts +23 -3
  225. package/src/spaceGroups/positions.ts +202 -78
  226. package/src/spaceGroups/rational.ts +59 -0
  227. package/src/tensors/propertyTable.ts +26 -14
  228. package/src/tensors/rowEchelon.ts +4 -3
  229. package/src/tensors/tensorForm.ts +258 -88
  230. package/src/tensors/tensorProperties.ts +34 -14
  231. package/src/tensors/voigt.ts +268 -0
  232. package/src/tolerances.ts +66 -1
  233. package/src/version.ts +1 -1
  234. package/dist/pointGroups/data.d.ts +0 -75
  235. package/dist/pointGroups/data.d.ts.map +0 -1
  236. package/dist/pointGroups/data.js +0 -212
  237. package/dist/pointGroups/data.js.map +0 -1
  238. package/dist/pointGroups/magneticData.d.ts +0 -66
  239. package/dist/pointGroups/magneticData.d.ts.map +0 -1
  240. package/dist/pointGroups/magneticData.js +0 -184
  241. package/dist/pointGroups/magneticData.js.map +0 -1
  242. package/dist/spaceGroups/snap.d.ts +0 -20
  243. package/dist/spaceGroups/snap.d.ts.map +0 -1
  244. package/dist/spaceGroups/snap.js +0 -103
  245. package/dist/spaceGroups/snap.js.map +0 -1
  246. package/src/pointGroups/data.ts +0 -305
  247. package/src/pointGroups/magneticData.ts +0 -328
  248. package/src/spaceGroups/snap.ts +0 -121
@@ -1,32 +1,31 @@
1
1
  /**
2
- * The order of the operations: as ITA numbers them. ITA bases the sequence of the coordinate
2
+ * ITA's selected generators of every point-group setting it lists, the data from which
3
+ * `itcData.ts` builds the operations in ITA's order. ITA bases the sequence of the coordinate
3
4
  * triplets on its "Generators selected" (Vol. A, 5th ed. 2006, § 2.2.11 (iv), p. 27; transcribed
4
5
  * for the symmorphic P group of every setting it lists in references/itc/vol-a-2006-symmetry-operations.md)
5
6
  * and takes the next generator as soon as a power of the current one lies in the group generated
6
- * so far (§ 8.3.5, p. 737). So, starting from the identity, each generator g extends that group H
7
- * by gH, g²H, … until a power of g lies in H. This gives ITA's numbering of the general
8
- * position (ITA 6th ed. Table 3.2.3.2), as `elements.reference.test.ts` checks for all 40 settings.
9
- * The generators are the printed triplets of Table 3.2.3.2, as matrices W in the conventional basis
10
- * (x̃ = W x); docs/conventions.md, "Order of the operations".
7
+ * so far (§ 8.3.5, p. 737). This gives ITA's numbering of the general position (ITA 6th ed. Table
8
+ * 3.2.3.2), as `itcData.reference.test.ts` checks for all 45 entries (5 with rhombohedral axes). The generators are the
9
+ * printed triplets of Table 3.2.3.2, as matrices W in the conventional basis (x̃ = W x);
10
+ * docs/conventions.md, "Order of the operations".
11
11
  */
12
12
 
13
- import { inverse, multiply, snap, type Mat3 } from '../linalg.js';
14
- import { crystalFamily, latticeBasis, type CrystalSystem } from '../lattice.js';
15
- import { IDENTITY_OPERATION, compose, operation, operationsEqual, type Operation } from '../operations.js';
16
-
17
13
  /** An integer matrix W in the conventional basis, rows as printed in a coordinate triplet. */
18
- type IntMat3 = readonly [
14
+ export type IntMat3 = readonly [
19
15
  readonly [number, number, number],
20
16
  readonly [number, number, number],
21
17
  readonly [number, number, number],
22
18
  ];
23
19
 
24
- /** ITA's selected generators per setting (`key#setting`), in printed order (identity and translations left out). */
25
- const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
20
+ /**
21
+ * ITA's selected generators per setting (`key|full ITC symbol of the setting`, with `|rhombohedral`
22
+ * for rhombohedral axes), in printed order (identity and translations left out).
23
+ */
24
+ export const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
26
25
  // 1: P1 (No. 1), p. 113
27
- '1#1': [],
26
+ '1|1': [],
28
27
  // -1: P-1 (No. 2), p. 115
29
- '-1#1': [
28
+ '-1|-1': [
30
29
  /* (2) -x,-y,-z */ [
31
30
  [-1, 0, 0],
32
31
  [0, -1, 0],
@@ -34,7 +33,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
34
33
  ],
35
34
  ],
36
35
  // 2, unique axis b: P121 (No. 3), p. 117
37
- '2#2': [
36
+ '2|1 2 1': [
38
37
  /* (2) -x,y,-z */ [
39
38
  [-1, 0, 0],
40
39
  [0, 1, 0],
@@ -42,7 +41,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
42
41
  ],
43
42
  ],
44
43
  // 2, unique axis c: P112 (No. 3), p. 119
45
- '2#1': [
44
+ '2|1 1 2': [
46
45
  /* (2) -x,-y,z */ [
47
46
  [-1, 0, 0],
48
47
  [0, -1, 0],
@@ -50,7 +49,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
50
49
  ],
51
50
  ],
52
51
  // m, unique axis b: P1m1 (No. 6), p. 133
53
- 'm#2': [
52
+ 'm|1 m 1': [
54
53
  /* (2) x,-y,z */ [
55
54
  [1, 0, 0],
56
55
  [0, -1, 0],
@@ -58,7 +57,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
58
57
  ],
59
58
  ],
60
59
  // m, unique axis c: P11m (No. 6), p. 135
61
- 'm#1': [
60
+ 'm|1 1 m': [
62
61
  /* (2) x,y,-z */ [
63
62
  [1, 0, 0],
64
63
  [0, 1, 0],
@@ -66,7 +65,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
66
65
  ],
67
66
  ],
68
67
  // 2/m, unique axis b: P12/m1 (No. 10), p. 161
69
- '2/m#2': [
68
+ '2/m|1 2/m 1': [
70
69
  /* (2) -x,y,-z */ [
71
70
  [-1, 0, 0],
72
71
  [0, 1, 0],
@@ -79,7 +78,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
79
78
  ],
80
79
  ],
81
80
  // 2/m, unique axis c: P112/m (No. 10), p. 163
82
- '2/m#1': [
81
+ '2/m|1 1 2/m': [
83
82
  /* (2) -x,-y,z */ [
84
83
  [-1, 0, 0],
85
84
  [0, -1, 0],
@@ -92,7 +91,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
92
91
  ],
93
92
  ],
94
93
  // 222: P222 (No. 16), p. 201
95
- '222#1': [
94
+ '222|2 2 2': [
96
95
  /* (2) -x,-y,z */ [
97
96
  [-1, 0, 0],
98
97
  [0, -1, 0],
@@ -105,7 +104,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
105
104
  ],
106
105
  ],
107
106
  // mm2: Pmm2 (No. 25), p. 219
108
- 'mm2#1': [
107
+ 'mm2|m m 2': [
109
108
  /* (2) -x,-y,z */ [
110
109
  [-1, 0, 0],
111
110
  [0, -1, 0],
@@ -118,7 +117,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
118
117
  ],
119
118
  ],
120
119
  // mmm: Pmmm (No. 47), p. 263
121
- 'mmm#1': [
120
+ 'mmm|2/m 2/m 2/m': [
122
121
  /* (2) -x,-y,z */ [
123
122
  [-1, 0, 0],
124
123
  [0, -1, 0],
@@ -136,7 +135,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
136
135
  ],
137
136
  ],
138
137
  // 4: P4 (No. 75), p. 332
139
- '4#1': [
138
+ '4|4': [
140
139
  /* (2) -x,-y,z */ [
141
140
  [-1, 0, 0],
142
141
  [0, -1, 0],
@@ -149,7 +148,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
149
148
  ],
150
149
  ],
151
150
  // -4: P-4 (No. 81), p. 341
152
- '-4#1': [
151
+ '-4|-4': [
153
152
  /* (2) -x,-y,z */ [
154
153
  [-1, 0, 0],
155
154
  [0, -1, 0],
@@ -162,7 +161,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
162
161
  ],
163
162
  ],
164
163
  // 4/m: P4/m (No. 83), p. 345
165
- '4/m#1': [
164
+ '4/m|4/m': [
166
165
  /* (2) -x,-y,z */ [
167
166
  [-1, 0, 0],
168
167
  [0, -1, 0],
@@ -180,7 +179,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
180
179
  ],
181
180
  ],
182
181
  // 422: P422 (No. 89), p. 363
183
- '422#1': [
182
+ '422|4 2 2': [
184
183
  /* (2) -x,-y,z */ [
185
184
  [-1, 0, 0],
186
185
  [0, -1, 0],
@@ -198,7 +197,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
198
197
  ],
199
198
  ],
200
199
  // 4mm: P4mm (No. 99), p. 383
201
- '4mm#1': [
200
+ '4mm|4 m m': [
202
201
  /* (2) -x,-y,z */ [
203
202
  [-1, 0, 0],
204
203
  [0, -1, 0],
@@ -216,7 +215,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
216
215
  ],
217
216
  ],
218
217
  // -42m: P-42m (No. 111), p. 407
219
- '-42m#1': [
218
+ '-42m|-4 2 m': [
220
219
  /* (2) -x,-y,z */ [
221
220
  [-1, 0, 0],
222
221
  [0, -1, 0],
@@ -234,7 +233,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
234
233
  ],
235
234
  ],
236
235
  // -4m2: P-4m2 (No. 115), p. 415
237
- '-42m#2': [
236
+ '-42m|-4 m 2': [
238
237
  /* (2) -x,-y,z */ [
239
238
  [-1, 0, 0],
240
239
  [0, -1, 0],
@@ -252,7 +251,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
252
251
  ],
253
252
  ],
254
253
  // 4/mmm: P4/mmm (No. 123), p. 431
255
- '4/mmm#1': [
254
+ '4/mmm|4/m 2/m 2/m': [
256
255
  /* (2) -x,-y,z */ [
257
256
  [-1, 0, 0],
258
257
  [0, -1, 0],
@@ -275,7 +274,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
275
274
  ],
276
275
  ],
277
276
  // 3: P3 (No. 143), p. 491
278
- '3#1': [
277
+ '3|3': [
279
278
  /* (2) -y,x-y,z */ [
280
279
  [0, -1, 0],
281
280
  [1, -1, 0],
@@ -283,7 +282,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
283
282
  ],
284
283
  ],
285
284
  // -3: P-3 (No. 147), p. 499
286
- '-3#1': [
285
+ '-3|-3': [
287
286
  /* (2) -y,x-y,z */ [
288
287
  [0, -1, 0],
289
288
  [1, -1, 0],
@@ -296,7 +295,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
296
295
  ],
297
296
  ],
298
297
  // 312: P312 (No. 149), p. 505
299
- '32#1': [
298
+ '32|3 1 2': [
300
299
  /* (2) -y,x-y,z */ [
301
300
  [0, -1, 0],
302
301
  [1, -1, 0],
@@ -309,7 +308,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
309
308
  ],
310
309
  ],
311
310
  // 321: P321 (No. 150), p. 507
312
- '32#2': [
311
+ '32|3 2 1': [
313
312
  /* (2) -y,x-y,z */ [
314
313
  [0, -1, 0],
315
314
  [1, -1, 0],
@@ -322,7 +321,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
322
321
  ],
323
322
  ],
324
323
  // 3m1: P3m1 (No. 156), p. 521
325
- '3m#2': [
324
+ '3m|3 m 1': [
326
325
  /* (2) -y,x-y,z */ [
327
326
  [0, -1, 0],
328
327
  [1, -1, 0],
@@ -335,7 +334,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
335
334
  ],
336
335
  ],
337
336
  // 31m: P31m (No. 157), p. 523
338
- '3m#1': [
337
+ '3m|3 1 m': [
339
338
  /* (2) -y,x-y,z */ [
340
339
  [0, -1, 0],
341
340
  [1, -1, 0],
@@ -348,7 +347,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
348
347
  ],
349
348
  ],
350
349
  // -31m: P-31m (No. 162), p. 537
351
- '-3m#1': [
350
+ '-3m|-3 1 2/m': [
352
351
  /* (2) -y,x-y,z */ [
353
352
  [0, -1, 0],
354
353
  [1, -1, 0],
@@ -366,7 +365,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
366
365
  ],
367
366
  ],
368
367
  // -3m1: P-3m1 (No. 164), p. 541
369
- '-3m#2': [
368
+ '-3m|-3 2/m 1': [
370
369
  /* (2) -y,x-y,z */ [
371
370
  [0, -1, 0],
372
371
  [1, -1, 0],
@@ -384,7 +383,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
384
383
  ],
385
384
  ],
386
385
  // 6: P6 (No. 168), p. 553
387
- '6#1': [
386
+ '6|6': [
388
387
  /* (2) -y,x-y,z */ [
389
388
  [0, -1, 0],
390
389
  [1, -1, 0],
@@ -397,7 +396,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
397
396
  ],
398
397
  ],
399
398
  // -6: P-6 (No. 174), p. 561
400
- '-6#1': [
399
+ '-6|-6': [
401
400
  /* (2) -y,x-y,z */ [
402
401
  [0, -1, 0],
403
402
  [1, -1, 0],
@@ -410,7 +409,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
410
409
  ],
411
410
  ],
412
411
  // 6/m: P6/m (No. 175), p. 563
413
- '6/m#1': [
412
+ '6/m|6/m': [
414
413
  /* (2) -y,x-y,z */ [
415
414
  [0, -1, 0],
416
415
  [1, -1, 0],
@@ -428,7 +427,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
428
427
  ],
429
428
  ],
430
429
  // 622: P622 (No. 177), p. 567
431
- '622#1': [
430
+ '622|6 2 2': [
432
431
  /* (2) -y,x-y,z */ [
433
432
  [0, -1, 0],
434
433
  [1, -1, 0],
@@ -446,7 +445,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
446
445
  ],
447
446
  ],
448
447
  // 6mm: P6mm (No. 183), p. 579
449
- '6mm#1': [
448
+ '6mm|6 m m': [
450
449
  /* (2) -y,x-y,z */ [
451
450
  [0, -1, 0],
452
451
  [1, -1, 0],
@@ -464,7 +463,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
464
463
  ],
465
464
  ],
466
465
  // -6m2: P-6m2 (No. 187), p. 587
467
- '-6m2#2': [
466
+ '-6m2|-6 m 2': [
468
467
  /* (2) -y,x-y,z */ [
469
468
  [0, -1, 0],
470
469
  [1, -1, 0],
@@ -482,7 +481,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
482
481
  ],
483
482
  ],
484
483
  // -62m: P-62m (No. 189), p. 591
485
- '-6m2#1': [
484
+ '-6m2|-6 2 m': [
486
485
  /* (2) -y,x-y,z */ [
487
486
  [0, -1, 0],
488
487
  [1, -1, 0],
@@ -500,7 +499,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
500
499
  ],
501
500
  ],
502
501
  // 6/mmm: P6/mmm (No. 191), p. 595
503
- '6/mmm#1': [
502
+ '6/mmm|6/m 2/m 2/m': [
504
503
  /* (2) -y,x-y,z */ [
505
504
  [0, -1, 0],
506
505
  [1, -1, 0],
@@ -523,7 +522,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
523
522
  ],
524
523
  ],
525
524
  // 23: P23 (No. 195), p. 603
526
- '23#1': [
525
+ '23|2 3': [
527
526
  /* (2) -x,-y,z */ [
528
527
  [-1, 0, 0],
529
528
  [0, -1, 0],
@@ -541,7 +540,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
541
540
  ],
542
541
  ],
543
542
  // m-3: Pm-3 (No. 200), p. 615
544
- 'm-3#1': [
543
+ 'm-3|2/m -3': [
545
544
  /* (2) -x,-y,z */ [
546
545
  [-1, 0, 0],
547
546
  [0, -1, 0],
@@ -564,7 +563,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
564
563
  ],
565
564
  ],
566
565
  // 432: P432 (No. 207), p. 635
567
- '432#1': [
566
+ '432|4 3 2': [
568
567
  /* (2) -x,-y,z */ [
569
568
  [-1, 0, 0],
570
569
  [0, -1, 0],
@@ -587,7 +586,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
587
586
  ],
588
587
  ],
589
588
  // -43m: P-43m (No. 215), p. 657
590
- '-43m#1': [
589
+ '-43m|-4 3 m': [
591
590
  /* (2) -x,-y,z */ [
592
591
  [-1, 0, 0],
593
592
  [0, -1, 0],
@@ -610,7 +609,7 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
610
609
  ],
611
610
  ],
612
611
  // m-3m: Pm-3m (No. 221), p. 673
613
- 'm-3m#1': [
612
+ 'm-3m|4/m -3 2/m': [
614
613
  /* (2) -x,-y,z */ [
615
614
  [-1, 0, 0],
616
615
  [0, -1, 0],
@@ -637,52 +636,69 @@ const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>> = {
637
636
  [0, 0, -1],
638
637
  ],
639
638
  ],
639
+ // R3 (No. 146), rhombohedral axes, p. 496
640
+ '3|3|rhombohedral': [
641
+ /* (2) z,x,y */ [
642
+ [0, 0, 1],
643
+ [1, 0, 0],
644
+ [0, 1, 0],
645
+ ],
646
+ ],
647
+ // R-3 (No. 148), rhombohedral axes, p. 502
648
+ '-3|-3|rhombohedral': [
649
+ /* (2) z,x,y */ [
650
+ [0, 0, 1],
651
+ [1, 0, 0],
652
+ [0, 1, 0],
653
+ ],
654
+ /* (4) -x,-y,-z */ [
655
+ [-1, 0, 0],
656
+ [0, -1, 0],
657
+ [0, 0, -1],
658
+ ],
659
+ ],
660
+ // R32 (No. 155), rhombohedral axes, p. 518
661
+ '32|3 2|rhombohedral': [
662
+ /* (2) z,x,y */ [
663
+ [0, 0, 1],
664
+ [1, 0, 0],
665
+ [0, 1, 0],
666
+ ],
667
+ /* (4) -z,-y,-x */ [
668
+ [0, 0, -1],
669
+ [0, -1, 0],
670
+ [-1, 0, 0],
671
+ ],
672
+ ],
673
+ // R3m (No. 160), rhombohedral axes, p. 530
674
+ '3m|3 m|rhombohedral': [
675
+ /* (2) z,x,y */ [
676
+ [0, 0, 1],
677
+ [1, 0, 0],
678
+ [0, 1, 0],
679
+ ],
680
+ /* (4) z,y,x */ [
681
+ [0, 0, 1],
682
+ [0, 1, 0],
683
+ [1, 0, 0],
684
+ ],
685
+ ],
686
+ // R-3m (No. 166), rhombohedral axes, p. 547
687
+ '-3m|-3 2/m|rhombohedral': [
688
+ /* (2) z,x,y */ [
689
+ [0, 0, 1],
690
+ [1, 0, 0],
691
+ [0, 1, 0],
692
+ ],
693
+ /* (4) -z,-y,-x */ [
694
+ [0, 0, -1],
695
+ [0, -1, 0],
696
+ [-1, 0, 0],
697
+ ],
698
+ /* (7) -x,-y,-z */ [
699
+ [-1, 0, 0],
700
+ [0, -1, 0],
701
+ [0, 0, -1],
702
+ ],
703
+ ],
640
704
  };
641
-
642
- /** ITA's selected generators of a setting as matrices in the conventional basis, or undefined if ITA does not list it. */
643
- function itaGenerators(key: string, setting: number): readonly IntMat3[] | undefined {
644
- return ITA_GENERATORS[`${key}#${setting}`];
645
- }
646
-
647
- /**
648
- * W in the conventional basis as a Cartesian matrix B·W·B⁻¹. Monoclinic and triclinic: W itself,
649
- * without a basis (symcrys fixes none for them): their point operations are ±1 on the diagonal,
650
- * and the unique axis (y or z) is perpendicular to the other two axes, so W is the same in every
651
- * Cartesian frame with that axis along y or z.
652
- */
653
- function cartesian(w: IntMat3, system: CrystalSystem): Mat3 {
654
- const family = crystalFamily(system);
655
- if (family === 'monoclinic' || family === 'triclinic') return w as unknown as Mat3;
656
- const b = latticeBasis(family);
657
- return multiply(multiply(b, w as unknown as Mat3), inverse(b));
658
- }
659
-
660
- /** ITA's selected generators of a setting as Cartesian operations, in printed order, or undefined if ITA does not list it. */
661
- export function itaGeneratorOperations(key: string, setting: number, system: CrystalSystem): Operation[] | undefined {
662
- return itaGenerators(key, setting)?.map((w) => operation(snap(cartesian(w, system))));
663
- }
664
-
665
- /**
666
- * The operations of a setting in ITA's order, built coset by coset from ITA's generators, or
667
- * undefined if ITA does not list the setting. `closed` (the closure of the stored generators) only
668
- * bounds the loop; the caller checks that the result is the same set.
669
- */
670
- export function inItaOrder(
671
- key: string,
672
- setting: number,
673
- system: CrystalSystem,
674
- closed: readonly Operation[],
675
- ): Operation[] | undefined {
676
- const gens = itaGeneratorOperations(key, setting, system);
677
- if (!gens) return undefined;
678
- const has = (list: readonly Operation[], op: Operation) => list.some((x) => operationsEqual(x, op));
679
- const list: Operation[] = [IDENTITY_OPERATION];
680
- for (const g of gens) {
681
- const h = list.slice();
682
- for (let power = g; !has(h, power); power = compose(power, g)) {
683
- if (list.length > closed.length) break;
684
- for (const x of h) list.push(compose(power, x));
685
- }
686
- }
687
- return list;
688
- }