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
@@ -0,0 +1,268 @@
1
+ /**
2
+ * Voigt's two-index notation of tensors with symmetric index pairs, as ITC Vol. D (2013) writes it
3
+ * (§ 1.1.4.10, pp. 24–27; eq. (1.5.7.4), p. 134): an index pair ij becomes one index α = 1…6 for
4
+ * 11, 22, 33, 23, 31, 12 (eq. (1.1.4.6)), and the components with α = 4, 5, 6 carry a factor 1 or 2
5
+ * per pair, as ITC defines the quantity (#137 E3, decided by Thomas on 2026-11-25).
6
+ */
7
+
8
+ import { checkOptions, shown } from '../checks.js';
9
+ import { deepFreeze } from '../freeze.js';
10
+ import { toleranceOf, type ToleranceOptions } from '../tolerances.js';
11
+ import { type TensorPropertyName } from './propertyTable.js';
12
+ import { checkedSpec, type SignedPermutation, type TensorSpec } from './tensorForm.js';
13
+
14
+ /** The factor of the components of a Voigt index α = 4, 5, 6: 2 where ITC sums the two symmetric components (t_ij + t_ji), 1 where it takes one. */
15
+ export type VoigtFactor = 1 | 2;
16
+
17
+ /** The options of `toVoigt` and `fromVoigt`. */
18
+ export interface VoigtOptions extends ToleranceOptions {
19
+ /**
20
+ * The factor of each contracted index pair, in the order of the pairs: 2 where ITC defines the
21
+ * Voigt component as the sum of the two symmetric components, 1 where it is the component itself
22
+ * (ITC Vol. D § 1.1.4.10). So the strain (S₄ = 2S₂₃), the piezoelectric d (d_iα = d_ijk + d_ikj)
23
+ * and the piezomagnetic Λ take `[2]`, the compliances s and the electrostriction Q `[2, 2]`; the
24
+ * stress and the piezoelectric e take `[1]`, the stiffnesses c and the elasto-optic p `[1, 1]`;
25
+ * the piezo-optic π takes `[1, 2]`; the susceptibility of second-harmonic generation, which has
26
+ * the tensor of `'piezoelectric'`, takes `[1]` (§ 1.7.2.2.1.3, p. 185). Required, except for
27
+ * `'piezomagnetic'`, which takes ITC's `[2]` (eq. (1.5.7.4)); `'piezoelectric'` has none, since
28
+ * its tensor serves both d and second-harmonic generation.
29
+ */
30
+ readonly factors?: readonly VoigtFactor[];
31
+ /**
32
+ * The index symmetry of the tensor (or of the tensor of a Voigt array) is checked within this
33
+ * tolerance, relative to its largest component; default `EPSILON` (10⁻⁶).
34
+ */
35
+ readonly tolerance?: number;
36
+ }
37
+
38
+ /** The index pair of α = 1…6, eq. (1.1.4.6): 11, 22, 33, 23, 31, 12. */
39
+ const PAIR: readonly (readonly [number, number])[] = [
40
+ [0, 0],
41
+ [1, 1],
42
+ [2, 2],
43
+ [1, 2],
44
+ [2, 0],
45
+ [0, 1],
46
+ ];
47
+
48
+ /** α (0-based) of an index pair. */
49
+ const ALPHA = [
50
+ [0, 5, 4],
51
+ [5, 1, 3],
52
+ [4, 3, 2],
53
+ ];
54
+
55
+ /**
56
+ * ITC's factors of the named properties that ITC writes in Voigt's notation with one convention
57
+ * only; 'piezoelectric' has none, since its tensor is also that of second-harmonic generation, which
58
+ * ITC contracts without the factor 2 (§ 1.7.2.2.1.3, p. 185).
59
+ */
60
+ const PROPERTY_FACTORS: Partial<Readonly<Record<TensorPropertyName, readonly VoigtFactor[]>>> = {
61
+ piezomagnetic: [2],
62
+ };
63
+
64
+ /** The contracted pairs of a specification: the positions of their first index, and the layout. */
65
+ interface Layout {
66
+ readonly rank: number;
67
+ /** The first index of each contracted pair, in order. */
68
+ readonly pairs: readonly number[];
69
+ /** The shape of the Voigt array: [6], [3, 6], [6, 3] or [6, 6]. */
70
+ readonly shape: readonly number[];
71
+ }
72
+
73
+ function layoutOf(spec: TensorSpec, who: string): Layout {
74
+ const { rank, intrinsic } = spec;
75
+ const symmetric = ['symmetric-first-pair', 'symmetric-last-pair', 'totally-symmetric'];
76
+ if (rank === 2 && symmetric.includes(intrinsic)) return { rank, pairs: [0], shape: [6] };
77
+ if (rank === 3 && (intrinsic === 'symmetric-last-pair' || intrinsic === 'totally-symmetric')) {
78
+ return { rank, pairs: [1], shape: [3, 6] };
79
+ }
80
+ if (rank === 3 && intrinsic === 'symmetric-first-pair') return { rank, pairs: [0], shape: [6, 3] };
81
+ if (rank === 4 && ['symmetric-pairs', 'symmetric-pairs-exchangeable', 'totally-symmetric'].includes(intrinsic)) {
82
+ return { rank, pairs: [0, 2], shape: [6, 6] };
83
+ }
84
+ throw new RangeError(
85
+ `${who}: Voigt's notation needs a symmetric index pair (rank 2 'symmetric-first-pair', 'symmetric-last-pair' ` +
86
+ `or 'totally-symmetric'; rank 3 'symmetric-last-pair', 'symmetric-first-pair' or 'totally-symmetric'; rank 4 ` +
87
+ `'symmetric-pairs', 'symmetric-pairs-exchangeable' or 'totally-symmetric'), not rank ${rank} '${intrinsic}'`,
88
+ );
89
+ }
90
+
91
+ function factorsOf(
92
+ specOrName: TensorSpec | TensorPropertyName,
93
+ layout: Layout,
94
+ options: VoigtOptions | undefined,
95
+ who: string,
96
+ ): readonly VoigtFactor[] {
97
+ const given: unknown = options?.factors;
98
+ const factors =
99
+ given !== undefined ? given : typeof specOrName === 'string' ? PROPERTY_FACTORS[specOrName] : undefined;
100
+ if (factors === undefined) {
101
+ const piezoelectric =
102
+ specOrName === 'piezoelectric'
103
+ ? ': [2] for the piezoelectric d (ITC Vol. D § 1.1.4.10.3), [1] for second-harmonic generation (§ 1.7.2.2.1.3)'
104
+ : ', 2 where ITC sums the two symmetric components (strain, d, s), 1 where it takes one (stress, e, c)';
105
+ throw new RangeError(
106
+ `${who}: give the factors of the ${layout.pairs.length === 1 ? 'index pair' : 'index pairs'} ` +
107
+ `({ factors: [${layout.pairs.map(() => '1 or 2').join(', ')}] })${piezoelectric}`,
108
+ );
109
+ }
110
+ if (!Array.isArray(factors) || factors.length !== layout.pairs.length || !factors.every((f) => f === 1 || f === 2)) {
111
+ throw new RangeError(
112
+ `${who}: factors must be ${layout.pairs.length} of 1 or 2, one per contracted index pair, not ${shown(factors)}`,
113
+ );
114
+ }
115
+ return factors as readonly VoigtFactor[];
116
+ }
117
+
118
+ const flatOf = (digits: readonly number[]): number => digits.reduce((s, d) => s * 3 + d, 0);
119
+ const digitsOf = (flat: number, rank: number): number[] =>
120
+ Array.from({ length: rank }, (_, k) => Math.floor(flat / 3 ** (rank - 1 - k)) % 3);
121
+
122
+ /** Checks that a tensor has its intrinsic symmetry, within the tolerance relative to its largest component. */
123
+ function checkSymmetry(
124
+ t: readonly number[],
125
+ rank: number,
126
+ perms: readonly SignedPermutation[],
127
+ tolerance: number,
128
+ who: string,
129
+ ): void {
130
+ const scale = Math.max(...t.map(Math.abs));
131
+ for (let o = 0; o < t.length; o++) {
132
+ const d = digitsOf(o, rank);
133
+ for (const { perm, sign } of perms) {
134
+ const other = flatOf(perm.map((k) => d[k]));
135
+ if (Math.abs(t[o] - sign * t[other]) > tolerance * scale) {
136
+ throw new RangeError(
137
+ `${who}: the tensor lacks the index symmetry of its specification (component ${o} is ${t[o]}, ` +
138
+ `its partner ${other} ${t[other]})`,
139
+ );
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ /** The Voigt indices (0-based) of a flat tensor index, and the product of the factors of its pairs. */
146
+ function voigtIndex(
147
+ flat: number,
148
+ layout: Layout,
149
+ factors: readonly VoigtFactor[],
150
+ ): { index: number[]; factor: number } {
151
+ const d = digitsOf(flat, layout.rank);
152
+ const index: number[] = [];
153
+ let factor = 1;
154
+ let k = 0;
155
+ layout.pairs.forEach((first, p) => {
156
+ while (k < first) index.push(d[k++]);
157
+ const alpha = ALPHA[d[first]][d[first + 1]];
158
+ index.push(alpha);
159
+ if (alpha >= 3) factor *= factors[p];
160
+ k = first + 2;
161
+ });
162
+ while (k < layout.rank) index.push(d[k++]);
163
+ return { index, factor };
164
+ }
165
+
166
+ function resolve(specOrName: TensorSpec | TensorPropertyName, options: VoigtOptions | undefined, who: string) {
167
+ checkOptions(options, ['factors', 'tolerance'], who);
168
+ const { spec, perms } = checkedSpec(specOrName);
169
+ const layout = layoutOf(spec, who);
170
+ const factors = factorsOf(specOrName, layout, options, who);
171
+ const tolerance = toleranceOf(options, 'metric');
172
+ return { spec, perms, layout, factors, tolerance };
173
+ }
174
+
175
+ /**
176
+ * A tensor in Voigt's two-index notation (ITC Vol. D (2013) § 1.1.4.10, pp. 24–27): each contracted
177
+ * index pair ij becomes α = 1…6 for 11, 22, 33, 23, 31, 12 (eq. (1.1.4.6)), and a component with
178
+ * α = 4, 5, 6 is the tensor component times the factor of its pair (`factors`). A symmetric tensor of
179
+ * rank 2 gives 6 components, one of rank 3 symmetric in its last pair a 3 × 6 matrix (d_iα), in its
180
+ * first pair a 6 × 3 matrix (e_αk), one of rank 4 a 6 × 6 matrix (s_αβ, c_αβ). Throws a RangeError for a specification
181
+ * without a symmetric index pair, factors that are missing or not one 1 or 2 per pair, and a tensor
182
+ * that lacks the index symmetry of its specification (within the tolerance, relative to its largest
183
+ * component).
184
+ *
185
+ * @remarks The tensor is flat, 3^rank components, as `tensorForm` gives a basis tensor.
186
+ */
187
+ export function toVoigt(
188
+ tensor: readonly number[],
189
+ specOrName: TensorSpec | TensorPropertyName,
190
+ options?: VoigtOptions,
191
+ ): readonly number[] | readonly (readonly number[])[] {
192
+ const who = 'toVoigt';
193
+ const { spec, perms, layout, factors, tolerance } = resolve(specOrName, options, who);
194
+ const dim = 3 ** spec.rank;
195
+ if (
196
+ !Array.isArray(tensor) ||
197
+ tensor.length !== dim ||
198
+ !tensor.every((x) => typeof x === 'number' && Number.isFinite(x))
199
+ ) {
200
+ throw new RangeError(`${who}: a tensor of rank ${spec.rank} is ${dim} finite numbers, not ${shown(tensor)}`);
201
+ }
202
+ checkSymmetry(tensor, spec.rank, perms, tolerance, who);
203
+ const out =
204
+ layout.shape.length === 1
205
+ ? new Array<number>(6).fill(0)
206
+ : Array.from({ length: layout.shape[0] }, () => new Array<number>(layout.shape[1]).fill(0));
207
+ for (let o = 0; o < dim; o++) {
208
+ const { index, factor } = voigtIndex(o, layout, factors);
209
+ // The representative index of each Voigt cell: the pair in the order of PAIR.
210
+ const d = digitsOf(o, spec.rank);
211
+ const canonical = layout.pairs.every((first) => {
212
+ const alpha = ALPHA[d[first]][d[first + 1]];
213
+ return PAIR[alpha][0] === d[first] && PAIR[alpha][1] === d[first + 1];
214
+ });
215
+ if (!canonical) continue;
216
+ const value = factor * tensor[o] + 0;
217
+ if (index.length === 1) (out as number[])[index[0]] = value;
218
+ else (out as number[][])[index[0]][index[1]] = value;
219
+ }
220
+ return deepFreeze(out);
221
+ }
222
+
223
+ /**
224
+ * The tensor of a Voigt array (`toVoigt` in reverse): each tensor component is the Voigt component
225
+ * of its index pairs over the factors of the pairs, so that the tensor has the index symmetry of its
226
+ * specification. Throws a RangeError for a Voigt array of
227
+ * the wrong shape, and for one that is no tensor of the specification (for rank 4 with interchangeable
228
+ * pairs a 6 × 6 matrix that is not symmetric, for a totally symmetric tensor one whose
229
+ * components do not agree), within the tolerance relative to its largest component.
230
+ *
231
+ * @remarks The tensor is flat, 3^rank components, as `tensorForm` gives a basis tensor.
232
+ */
233
+ export function fromVoigt(
234
+ voigt: readonly number[] | readonly (readonly number[])[],
235
+ specOrName: TensorSpec | TensorPropertyName,
236
+ options?: VoigtOptions,
237
+ ): readonly number[] {
238
+ const who = 'fromVoigt';
239
+ const { spec, perms, layout, factors, tolerance } = resolve(specOrName, options, who);
240
+ const shapeOk =
241
+ layout.shape.length === 1
242
+ ? Array.isArray(voigt) && voigt.length === 6 && voigt.every((x) => typeof x === 'number' && Number.isFinite(x))
243
+ : Array.isArray(voigt) &&
244
+ voigt.length === layout.shape[0] &&
245
+ voigt.every(
246
+ (row) =>
247
+ Array.isArray(row) &&
248
+ row.length === layout.shape[1] &&
249
+ row.every((x: unknown) => typeof x === 'number' && Number.isFinite(x)),
250
+ );
251
+ if (!shapeOk) {
252
+ throw new RangeError(
253
+ `${who}: a Voigt array of shape ${layout.shape.join(' × ')} of finite numbers, not ${shown(voigt)}`,
254
+ );
255
+ }
256
+ const dim = 3 ** spec.rank;
257
+ const out = new Array<number>(dim);
258
+ for (let o = 0; o < dim; o++) {
259
+ const { index, factor } = voigtIndex(o, layout, factors);
260
+ const v =
261
+ index.length === 1
262
+ ? (voigt as readonly number[])[index[0]]
263
+ : (voigt as readonly (readonly number[])[])[index[0]][index[1]];
264
+ out[o] = v / factor + 0;
265
+ }
266
+ checkSymmetry(out, spec.rank, perms, tolerance, who);
267
+ return deepFreeze(out);
268
+ }
package/src/tolerances.ts CHANGED
@@ -1,8 +1,16 @@
1
1
  /**
2
2
  * Numeric tolerances, in one place. The values differ on purpose: each gates a different quantity.
3
+ * The tolerance a caller passes is one contract for every function (docs/conventions.md,
4
+ * "Tolerances"): one option, one metric per kind of object, one check.
3
5
  */
4
6
 
5
- /** Two matrix entries (or vector components) closer than this are equal. */
7
+ import { shown } from './checks.js';
8
+
9
+ /**
10
+ * The default tolerance of every function that compares numbers a caller passes in (operations,
11
+ * directions, points): two numbers closer than this count as equal, in the metric of their kind
12
+ * (docs/conventions.md, "Tolerances").
13
+ */
6
14
  export const EPSILON = 1e-6;
7
15
 
8
16
  /**
@@ -10,3 +18,60 @@ export const EPSILON = 1e-6;
10
18
  * (linalg.ts) is replaced by it, so rounding errors cannot accumulate over repeated products.
11
19
  */
12
20
  export const SNAP_EPSILON = 1e-9;
21
+
22
+ /** The tolerance of a function that compares numbers a caller passes in. */
23
+ export interface ToleranceOptions {
24
+ /**
25
+ * Two numbers closer than this count as equal; default `EPSILON` (10⁻⁶). It is measured per
26
+ * matrix entry for operations, as the distance of unit vectors for directions and per coordinate
27
+ * modulo the lattice for points (docs/conventions.md, "Tolerances").
28
+ */
29
+ readonly tolerance?: number;
30
+ }
31
+
32
+ /**
33
+ * The upper bound of the tolerance per kind of object, above which it says nothing: two distinct
34
+ * operations A, B of a crystallographic point group differ in some entry by at least √2/3 ≈ 0.47 in
35
+ * any orthonormal frame (‖A − B‖ = ‖1 − A⁻¹B‖ ≥ √2 in the Frobenius norm, the least for a sixfold
36
+ * rotation), so 0.1 keeps them apart; two unit vectors are at most 2 apart; two points modulo the
37
+ * lattice at most 1/2 per coordinate; a relative deviation of the metric tensor is at most of the
38
+ * order of 1.
39
+ */
40
+ export const TOLERANCE_BOUND = Object.freeze({ operations: 0.1, directions: 1, points: 0.5, metric: 1 });
41
+
42
+ /**
43
+ * The tolerance of the options, checked: a finite number above 0 and below the bound of the kind
44
+ * of object it measures; the default `EPSILON`.
45
+ */
46
+ export function toleranceOf(options: ToleranceOptions | undefined, kind: keyof typeof TOLERANCE_BOUND): number {
47
+ // Only a missing tolerance takes the default; null is a wrong value, not a missing one.
48
+ const t: unknown = options?.tolerance === undefined ? EPSILON : options.tolerance;
49
+ const bound = TOLERANCE_BOUND[kind];
50
+ if (!(typeof t === 'number' && t > 0 && t < bound)) {
51
+ throw new RangeError(`The tolerance must be a number above 0 and below ${bound}, not ${shown(t)}`);
52
+ }
53
+ return t;
54
+ }
55
+
56
+ /**
57
+ * Making a group of a caller exact (`idealGroup`, closure.ts): a product is matched to the nearest
58
+ * element of the group, which must lie closer than `PRODUCT_MATCH` per entry (distinct operations
59
+ * of a point group differ by at least √2/3 ≈ 0.47 in some entry, so a nearer one is the product);
60
+ * the averaging has settled when no entry changes by `IDEAL_SETTLED` or more in a pass, and fails
61
+ * if after `IDEAL_PASSES` passes an entry still changes by `IDEAL_UNSETTLED` (it settles in one to
62
+ * six passes for every point group, exact or rounded); entries within `IDEAL_SNAP` of an exact value
63
+ * are set to it, which catches the rounding of the last bits but not a group turned by a small
64
+ * angle.
65
+ */
66
+ export const PRODUCT_MATCH = 0.25;
67
+ export const IDEAL_SETTLED = 1e-15;
68
+ export const IDEAL_UNSETTLED = 1e-12;
69
+ export const IDEAL_PASSES = 50;
70
+ export const IDEAL_SNAP = 1e-12;
71
+
72
+ /**
73
+ * The largest pivot threshold of a tensor form (tensorForm.ts, `reduce`): the threshold is raised
74
+ * up to this only in a general orientation, when components of the order of 10⁻⁷ would otherwise be
75
+ * taken for independent ones; a genuine pivot of a form of a point group is far larger.
76
+ */
77
+ export const MAX_PIVOT_THRESHOLD = 1e-2;
package/src/version.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @remarks Kept equal to `version` in package.json (checked by version.test.ts).
5
5
  */
6
- export const VERSION = '0.10.1';
6
+ export const VERSION = '0.12.0';
@@ -1,75 +0,0 @@
1
- /**
2
- * The 32 crystallographic point groups (crystal classes) as data: generators, settings and symbols.
3
- * The 90 magnetic point groups built on them are in magneticData.ts.
4
- *
5
- * Generators are stored in the Birss frame (docs/conventions.md); every setting is a rotation of
6
- * that frame, and the ITC settings are among them. The print anchors and their tests are listed in
7
- * docs/conventions.md, "Sources"; never derive data here from symcrys output.
8
- */
9
- import { type Mat3 } from '../linalg.js';
10
- import { type Operation } from '../operations.js';
11
- import type { CrystalSystem } from '../lattice.js';
12
- /** Keys of the 32 crystal classes: the ITC short symbol of the class (docs/conventions.md, "Keys"). */
13
- export declare const POINT_GROUP_KEYS: readonly ["1", "-1", "2", "m", "2/m", "222", "mm2", "mmm", "4", "-4", "4/m", "422", "4mm", "-42m", "4/mmm", "3", "-3", "32", "3m", "-3m", "6", "-6", "6/m", "622", "6mm", "-6m2", "6/mmm", "23", "m-3", "432", "-43m", "m-3m"];
14
- /** The key of one of the 32 crystal classes (`POINT_GROUP_KEYS`). */
15
- export type PointGroupKey = Extract<(typeof POINT_GROUP_KEYS)[number], string>;
16
- /** A symbol in one convention: the short symbol of the setting and the full symbol, positions separated by spaces. */
17
- interface SymbolForms {
18
- readonly short: string;
19
- readonly full: string;
20
- }
21
- export interface SettingData {
22
- /** Orthogonal matrix s: the setting's operations are s·W·sᵀ for the stored operations W. */
23
- readonly frame: Mat3;
24
- /** Monoclinic: the unique axis; orthorhombic mm2: the axis of the twofold rotation. */
25
- readonly uniqueAxis?: 'a' | 'b' | 'c';
26
- readonly itc: SymbolForms;
27
- readonly birss: SymbolForms;
28
- }
29
- export interface PointGroupData {
30
- readonly key: PointGroupKey;
31
- readonly crystalSystem: CrystalSystem;
32
- readonly schoenflies: string;
33
- /** Generators in the stored (Birss) frame, which is setting 1. */
34
- readonly generators: readonly Operation[];
35
- /** Setting 1 first; its frame is the identity. */
36
- readonly settings: readonly SettingData[];
37
- /** The ITC default setting (1-based). The Birss default is always setting 1. */
38
- readonly itcDefault: number;
39
- }
40
- export declare const ROT2_Z: Mat3;
41
- export declare const ROT2_X: Mat3;
42
- export declare const ROT2_Y: Mat3;
43
- export declare const ROT4_Z: Mat3;
44
- export declare const ROT3_Z: Mat3;
45
- export declare const ROT6_Z: Mat3;
46
- export declare const ROT4_X: Mat3;
47
- export declare const ROTINV4_Z: Mat3;
48
- export declare const ROTINV3_Z: Mat3;
49
- export declare const ROTINV6_Z: Mat3;
50
- export declare const MIRROR_X: Mat3;
51
- export declare const MIRROR_Y: Mat3;
52
- export declare const MIRROR_Z: Mat3;
53
- /** Mirror with normal [1-10] (swaps x and y). */
54
- export declare const MIRROR_XY: Mat3;
55
- /** Threefold rotation about [111], mapping the vector x to y, y to z, z to x. */
56
- export declare const ROT3_111: Mat3;
57
- export declare const SAME: Mat3;
58
- /** Monoclinic, c-unique (stored) → b-unique: z → y. Proper rotation. */
59
- export declare const MONOCLINIC_B: Mat3;
60
- /** Orthorhombic: the axis along z (stored) moves to x (cyclic x → y → z → x). */
61
- export declare const ORTHO_TO_A: Mat3;
62
- /** Orthorhombic: the axis along z (stored) moves to y (cyclic x → z → y → x). */
63
- export declare const ORTHO_TO_B: Mat3;
64
- /**
65
- * Orthorhombic, for a group whose three elements all differ: the frames above after exchanging the
66
- * other two axes (a rotation by 90° about the stored z axis), so the same axis stays unique.
67
- */
68
- export declare const ORTHO_SWAP: Mat3;
69
- export declare const ORTHO_TO_A_SWAP: Mat3;
70
- export declare const ORTHO_TO_B_SWAP: Mat3;
71
- export declare const ROT45_Z: Mat3;
72
- export declare const ROT30_Z: Mat3;
73
- export declare const POINT_GROUP_DATA: readonly PointGroupData[];
74
- export {};
75
- //# sourceMappingURL=data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/pointGroups/data.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AACzG,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,uGAAuG;AACvG,eAAO,MAAM,gBAAgB,gOAiClB,CAAC;AAEZ,qEAAqE;AAGrE,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AAE/E,sHAAsH;AACtH,UAAU,WAAW;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kEAAkE;IAClE,QAAQ,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AAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAqFrD,CAAC"}
@@ -1,212 +0,0 @@
1
- /**
2
- * The 32 crystallographic point groups (crystal classes) as data: generators, settings and symbols.
3
- * The 90 magnetic point groups built on them are in magneticData.ts.
4
- *
5
- * Generators are stored in the Birss frame (docs/conventions.md); every setting is a rotation of
6
- * that frame, and the ITC settings are among them. The print anchors and their tests are listed in
7
- * docs/conventions.md, "Sources"; never derive data here from symcrys output.
8
- */
9
- import { IDENTITY, INVERSION, multiply, rotationX, rotationY, rotationZ } from '../linalg.js';
10
- import { operation } from '../operations.js';
11
- /** Keys of the 32 crystal classes: the ITC short symbol of the class (docs/conventions.md, "Keys"). */
12
- export const POINT_GROUP_KEYS = Object.freeze([
13
- '1',
14
- '-1',
15
- '2',
16
- 'm',
17
- '2/m',
18
- '222',
19
- 'mm2',
20
- 'mmm',
21
- '4',
22
- '-4',
23
- '4/m',
24
- '422',
25
- '4mm',
26
- '-42m',
27
- '4/mmm',
28
- '3',
29
- '-3',
30
- '32',
31
- '3m',
32
- '-3m',
33
- '6',
34
- '-6',
35
- '6/m',
36
- '622',
37
- '6mm',
38
- '-6m2',
39
- '6/mmm',
40
- '23',
41
- 'm-3',
42
- '432',
43
- '-43m',
44
- 'm-3m',
45
- ]);
46
- // --- Matrices in the stored (Birss) frame ---------------------------------------------------------
47
- export const ROT2_Z = rotationZ(180);
48
- export const ROT2_X = rotationX(180);
49
- export const ROT2_Y = rotationY(180);
50
- export const ROT4_Z = rotationZ(90);
51
- export const ROT3_Z = rotationZ(120);
52
- export const ROT6_Z = rotationZ(60);
53
- export const ROT4_X = rotationX(90);
54
- export const ROTINV4_Z = multiply(ROT4_Z, INVERSION);
55
- export const ROTINV3_Z = multiply(ROT3_Z, INVERSION);
56
- export const ROTINV6_Z = multiply(ROT6_Z, INVERSION);
57
- export const MIRROR_X = [
58
- [-1, 0, 0],
59
- [0, 1, 0],
60
- [0, 0, 1],
61
- ];
62
- export const MIRROR_Y = [
63
- [1, 0, 0],
64
- [0, -1, 0],
65
- [0, 0, 1],
66
- ];
67
- export const MIRROR_Z = [
68
- [1, 0, 0],
69
- [0, 1, 0],
70
- [0, 0, -1],
71
- ];
72
- /** Mirror with normal [1-10] (swaps x and y). */
73
- export const MIRROR_XY = [
74
- [0, 1, 0],
75
- [1, 0, 0],
76
- [0, 0, 1],
77
- ];
78
- /** Threefold rotation about [111], mapping the vector x to y, y to z, z to x. */
79
- export const ROT3_111 = [
80
- [0, 0, 1],
81
- [1, 0, 0],
82
- [0, 1, 0],
83
- ];
84
- // --- Setting frames -------------------------------------------------------------------------------
85
- export const SAME = [
86
- [1, 0, 0],
87
- [0, 1, 0],
88
- [0, 0, 1],
89
- ];
90
- /** Monoclinic, c-unique (stored) → b-unique: z → y. Proper rotation. */
91
- export const MONOCLINIC_B = [
92
- [-1, 0, 0],
93
- [0, 0, 1],
94
- [0, 1, 0],
95
- ];
96
- /** Orthorhombic: the axis along z (stored) moves to x (cyclic x → y → z → x). */
97
- export const ORTHO_TO_A = [
98
- [0, 0, 1],
99
- [1, 0, 0],
100
- [0, 1, 0],
101
- ];
102
- /** Orthorhombic: the axis along z (stored) moves to y (cyclic x → z → y → x). */
103
- export const ORTHO_TO_B = [
104
- [0, 1, 0],
105
- [0, 0, 1],
106
- [1, 0, 0],
107
- ];
108
- /**
109
- * Orthorhombic, for a group whose three elements all differ: the frames above after exchanging the
110
- * other two axes (a rotation by 90° about the stored z axis), so the same axis stays unique.
111
- */
112
- export const ORTHO_SWAP = rotationZ(90);
113
- export const ORTHO_TO_A_SWAP = multiply(ORTHO_TO_A, ORTHO_SWAP);
114
- export const ORTHO_TO_B_SWAP = multiply(ORTHO_TO_B, ORTHO_SWAP);
115
- export const ROT45_Z = rotationZ(45);
116
- export const ROT30_Z = rotationZ(30);
117
- // --- Helpers ---------------------------------------------------------------------------------------
118
- const ops = (...matrices) => matrices.map(operation);
119
- /** A setting whose symbols are the same in both conventions. */
120
- function setting(frame, short, full, uniqueAxis) {
121
- const forms = { short, full };
122
- return uniqueAxis ? { frame, uniqueAxis, itc: forms, birss: forms } : { frame, itc: forms, birss: forms };
123
- }
124
- /** A group with one setting whose symbols agree in both conventions. */
125
- function group(key, crystalSystem, schoenflies, generators, full = key) {
126
- return { key, crystalSystem, schoenflies, generators, settings: [setting(SAME, key, full)], itcDefault: 1 };
127
- }
128
- /**
129
- * Trigonal and hexagonal groups whose two settings differ by 30° about z. Symbol position 2 means
130
- * the a direction (x) in ITC and the y direction in Birss, so each frame carries, in one
131
- * convention, the symbol the other convention gives to the other frame (docs/conventions.md).
132
- * `secondary` is the ITC symbol with the lateral elements in the a direction; ITC's default is
133
- * that frame, setting 2. Birss's default, setting 1, carries Birss's printed short symbol, the key.
134
- */
135
- function trigonalPair(key, crystalSystem, schoenflies, generators, secondary, tertiary) {
136
- return {
137
- key,
138
- crystalSystem,
139
- schoenflies,
140
- generators,
141
- settings: [
142
- { frame: SAME, itc: tertiary, birss: { short: key, full: secondary.full } },
143
- { frame: ROT30_Z, itc: secondary, birss: tertiary },
144
- ],
145
- itcDefault: 2,
146
- };
147
- }
148
- function monoclinic(key, schoenflies, generators, full) {
149
- const data = {
150
- key,
151
- crystalSystem: 'monoclinic',
152
- schoenflies,
153
- generators,
154
- settings: [setting(SAME, key, full('c'), 'c'), setting(MONOCLINIC_B, key, full('b'), 'b')],
155
- itcDefault: 2,
156
- };
157
- return data;
158
- }
159
- // --- The 32 crystal classes -----------------------------------------------------------------------
160
- export const POINT_GROUP_DATA = [
161
- group('1', 'triclinic', 'C1', ops(IDENTITY)),
162
- group('-1', 'triclinic', 'Ci', ops(INVERSION)),
163
- monoclinic('2', 'C2', ops(ROT2_Z), (u) => (u === 'c' ? '1 1 2' : '1 2 1')),
164
- monoclinic('m', 'Cs', ops(MIRROR_Z), (u) => (u === 'c' ? '1 1 m' : '1 m 1')),
165
- monoclinic('2/m', 'C2h', ops(ROT2_Z, INVERSION), (u) => (u === 'c' ? '1 1 2/m' : '1 2/m 1')),
166
- group('222', 'orthorhombic', 'D2', ops(ROT2_Z, ROT2_X), '2 2 2'),
167
- {
168
- key: 'mm2',
169
- crystalSystem: 'orthorhombic',
170
- schoenflies: 'C2v',
171
- generators: ops(ROT2_Z, MIRROR_X),
172
- settings: [
173
- setting(SAME, 'mm2', 'm m 2', 'c'),
174
- setting(ORTHO_TO_A, '2mm', '2 m m', 'a'),
175
- setting(ORTHO_TO_B, 'm2m', 'm 2 m', 'b'),
176
- ],
177
- itcDefault: 1,
178
- },
179
- group('mmm', 'orthorhombic', 'D2h', ops(ROT2_Z, ROT2_X, INVERSION), '2/m 2/m 2/m'),
180
- group('4', 'tetragonal', 'C4', ops(ROT4_Z)),
181
- group('-4', 'tetragonal', 'S4', ops(ROTINV4_Z)),
182
- group('4/m', 'tetragonal', 'C4h', ops(ROT4_Z, INVERSION)),
183
- group('422', 'tetragonal', 'D4', ops(ROT4_Z, ROT2_X), '4 2 2'),
184
- group('4mm', 'tetragonal', 'C4v', ops(ROT4_Z, MIRROR_X), '4 m m'),
185
- {
186
- key: '-42m',
187
- crystalSystem: 'tetragonal',
188
- schoenflies: 'D2d',
189
- generators: ops(ROTINV4_Z, ROT2_X),
190
- settings: [setting(SAME, '-42m', '-4 2 m'), setting(ROT45_Z, '-4m2', '-4 m 2')],
191
- itcDefault: 1,
192
- },
193
- group('4/mmm', 'tetragonal', 'D4h', ops(ROT4_Z, ROT2_X, INVERSION), '4/m 2/m 2/m'),
194
- group('3', 'trigonal', 'C3', ops(ROT3_Z)),
195
- group('-3', 'trigonal', 'C3i', ops(ROTINV3_Z)),
196
- trigonalPair('32', 'trigonal', 'D3', ops(ROT3_Z, ROT2_Y), { short: '321', full: '3 2 1' }, { short: '312', full: '3 1 2' }),
197
- trigonalPair('3m', 'trigonal', 'C3v', ops(ROT3_Z, MIRROR_Y), { short: '3m1', full: '3 m 1' }, { short: '31m', full: '3 1 m' }),
198
- trigonalPair('-3m', 'trigonal', 'D3d', ops(ROT3_Z, ROT2_Y, INVERSION), { short: '-3m1', full: '-3 2/m 1' }, { short: '-31m', full: '-3 1 2/m' }),
199
- group('6', 'hexagonal', 'C6', ops(ROT6_Z)),
200
- group('-6', 'hexagonal', 'C3h', ops(ROTINV6_Z)),
201
- group('6/m', 'hexagonal', 'C6h', ops(ROT6_Z, INVERSION)),
202
- group('622', 'hexagonal', 'D6', ops(ROT6_Z, ROT2_Y), '6 2 2'),
203
- group('6mm', 'hexagonal', 'C6v', ops(ROT6_Z, MIRROR_Y), '6 m m'),
204
- trigonalPair('-6m2', 'hexagonal', 'D3h', ops(ROTINV6_Z, MIRROR_Y), { short: '-6m2', full: '-6 m 2' }, { short: '-62m', full: '-6 2 m' }),
205
- group('6/mmm', 'hexagonal', 'D6h', ops(ROT6_Z, ROT2_Y, INVERSION), '6/m 2/m 2/m'),
206
- group('23', 'cubic', 'T', ops(ROT2_Z, ROT2_X, ROT3_111), '2 3'),
207
- group('m-3', 'cubic', 'Th', ops(ROT2_Z, ROT2_X, ROT3_111, INVERSION), '2/m -3'),
208
- group('432', 'cubic', 'O', ops(ROT4_Z, ROT4_X, ROT3_111), '4 3 2'),
209
- group('-43m', 'cubic', 'Td', ops(ROTINV4_Z, ROT3_111, MIRROR_XY), '-4 3 m'),
210
- group('m-3m', 'cubic', 'Oh', ops(ROT4_Z, ROT4_X, ROT3_111, INVERSION), '4/m -3 2/m'),
211
- ];
212
- //# sourceMappingURL=data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/pointGroups/data.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AACzG,OAAO,EAAE,SAAS,EAAkB,MAAM,kBAAkB,CAAC;AAG7D,uGAAuG;AACvG,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C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