symcrys 0.10.0 → 0.11.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 (218) 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/crystalClasses.d.ts +146 -118
  15. package/dist/crystalClasses.d.ts.map +1 -1
  16. package/dist/crystalClasses.js +163 -124
  17. package/dist/crystalClasses.js.map +1 -1
  18. package/dist/freeze.d.ts +7 -0
  19. package/dist/freeze.d.ts.map +1 -0
  20. package/dist/freeze.js +15 -0
  21. package/dist/freeze.js.map +1 -0
  22. package/dist/index.d.ts +11 -10
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +4 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/indices.d.ts +31 -5
  27. package/dist/indices.d.ts.map +1 -1
  28. package/dist/indices.js +104 -13
  29. package/dist/indices.js.map +1 -1
  30. package/dist/lattice.d.ts +15 -1
  31. package/dist/lattice.d.ts.map +1 -1
  32. package/dist/lattice.js +30 -1
  33. package/dist/lattice.js.map +1 -1
  34. package/dist/linalg.d.ts +2 -2
  35. package/dist/linalg.d.ts.map +1 -1
  36. package/dist/linalg.js +3 -3
  37. package/dist/linalg.js.map +1 -1
  38. package/dist/magnetic.d.ts +12 -10
  39. package/dist/magnetic.d.ts.map +1 -1
  40. package/dist/magnetic.js +8 -6
  41. package/dist/magnetic.js.map +1 -1
  42. package/dist/notation.d.ts +16 -0
  43. package/dist/notation.d.ts.map +1 -0
  44. package/dist/notation.js +66 -0
  45. package/dist/notation.js.map +1 -0
  46. package/dist/operations.d.ts +40 -26
  47. package/dist/operations.d.ts.map +1 -1
  48. package/dist/operations.js +48 -60
  49. package/dist/operations.js.map +1 -1
  50. package/dist/plane.d.ts +141 -79
  51. package/dist/plane.d.ts.map +1 -1
  52. package/dist/plane.js +147 -77
  53. package/dist/plane.js.map +1 -1
  54. package/dist/pointGroups/crystalForms.d.ts +6 -21
  55. package/dist/pointGroups/crystalForms.d.ts.map +1 -1
  56. package/dist/pointGroups/crystalForms.js +9 -16
  57. package/dist/pointGroups/crystalForms.js.map +1 -1
  58. package/dist/pointGroups/crystalFormsData.d.ts +4 -1
  59. package/dist/pointGroups/crystalFormsData.d.ts.map +1 -1
  60. package/dist/pointGroups/crystalFormsData.js +64 -1
  61. package/dist/pointGroups/crystalFormsData.js.map +1 -1
  62. package/dist/pointGroups/elements.d.ts +19 -17
  63. package/dist/pointGroups/elements.d.ts.map +1 -1
  64. package/dist/pointGroups/elements.js +65 -83
  65. package/dist/pointGroups/elements.js.map +1 -1
  66. package/dist/pointGroups/identify.d.ts +10 -18
  67. package/dist/pointGroups/identify.d.ts.map +1 -1
  68. package/dist/pointGroups/identify.js +27 -79
  69. package/dist/pointGroups/identify.js.map +1 -1
  70. package/dist/pointGroups/itaOrder.d.ts +15 -14
  71. package/dist/pointGroups/itaOrder.d.ts.map +1 -1
  72. package/dist/pointGroups/itaOrder.js +116 -94
  73. package/dist/pointGroups/itaOrder.js.map +1 -1
  74. package/dist/pointGroups/itcData.d.ts +96 -0
  75. package/dist/pointGroups/itcData.d.ts.map +1 -0
  76. package/dist/pointGroups/itcData.js +336 -0
  77. package/dist/pointGroups/itcData.js.map +1 -0
  78. package/dist/pointGroups/itcMagneticData.d.ts +55 -0
  79. package/dist/pointGroups/itcMagneticData.d.ts.map +1 -0
  80. package/dist/pointGroups/itcMagneticData.js +172 -0
  81. package/dist/pointGroups/itcMagneticData.js.map +1 -0
  82. package/dist/pointGroups/keys.d.ts +32 -0
  83. package/dist/pointGroups/keys.d.ts.map +1 -0
  84. package/dist/pointGroups/keys.js +120 -0
  85. package/dist/pointGroups/keys.js.map +1 -0
  86. package/dist/pointGroups/magneticSymbols.d.ts +6 -5
  87. package/dist/pointGroups/magneticSymbols.d.ts.map +1 -1
  88. package/dist/pointGroups/magneticSymbols.js +15 -12
  89. package/dist/pointGroups/magneticSymbols.js.map +1 -1
  90. package/dist/pointGroups/orbits.d.ts +23 -42
  91. package/dist/pointGroups/orbits.d.ts.map +1 -1
  92. package/dist/pointGroups/orbits.js +20 -62
  93. package/dist/pointGroups/orbits.js.map +1 -1
  94. package/dist/pointGroups/pointGroups.d.ts +135 -67
  95. package/dist/pointGroups/pointGroups.d.ts.map +1 -1
  96. package/dist/pointGroups/pointGroups.js +409 -244
  97. package/dist/pointGroups/pointGroups.js.map +1 -1
  98. package/dist/pointGroups/properties.d.ts +21 -22
  99. package/dist/pointGroups/properties.d.ts.map +1 -1
  100. package/dist/pointGroups/properties.js +40 -37
  101. package/dist/pointGroups/properties.js.map +1 -1
  102. package/dist/pointGroups/seitzData.d.ts +26 -0
  103. package/dist/pointGroups/seitzData.d.ts.map +1 -0
  104. package/dist/pointGroups/seitzData.js +130 -0
  105. package/dist/pointGroups/seitzData.js.map +1 -0
  106. package/dist/pointGroups/wyckoff.d.ts +70 -40
  107. package/dist/pointGroups/wyckoff.d.ts.map +1 -1
  108. package/dist/pointGroups/wyckoff.js +98 -91
  109. package/dist/pointGroups/wyckoff.js.map +1 -1
  110. package/dist/pointGroups/wyckoffData.d.ts +7 -4
  111. package/dist/pointGroups/wyckoffData.d.ts.map +1 -1
  112. package/dist/pointGroups/wyckoffData.js +789 -168
  113. package/dist/pointGroups/wyckoffData.js.map +1 -1
  114. package/dist/siteSymmetry.d.ts +9 -17
  115. package/dist/siteSymmetry.d.ts.map +1 -1
  116. package/dist/siteSymmetry.js +62 -47
  117. package/dist/siteSymmetry.js.map +1 -1
  118. package/dist/spaceGroups/affine.d.ts.map +1 -1
  119. package/dist/spaceGroups/affine.js +3 -2
  120. package/dist/spaceGroups/affine.js.map +1 -1
  121. package/dist/spaceGroups/cell.d.ts +43 -31
  122. package/dist/spaceGroups/cell.d.ts.map +1 -1
  123. package/dist/spaceGroups/cell.js +173 -85
  124. package/dist/spaceGroups/cell.js.map +1 -1
  125. package/dist/spaceGroups/describe.d.ts +12 -10
  126. package/dist/spaceGroups/describe.d.ts.map +1 -1
  127. package/dist/spaceGroups/describe.js +11 -10
  128. package/dist/spaceGroups/describe.js.map +1 -1
  129. package/dist/spaceGroups/planeGroupData.d.ts +1 -1
  130. package/dist/spaceGroups/planeGroupData.d.ts.map +1 -1
  131. package/dist/spaceGroups/planeGroupData.js +8 -8
  132. package/dist/spaceGroups/planeGroupData.js.map +1 -1
  133. package/dist/spaceGroups/planeGroups.d.ts.map +1 -1
  134. package/dist/spaceGroups/planeGroups.js +2 -1
  135. package/dist/spaceGroups/planeGroups.js.map +1 -1
  136. package/dist/spaceGroups/positions.d.ts +48 -19
  137. package/dist/spaceGroups/positions.d.ts.map +1 -1
  138. package/dist/spaceGroups/positions.js +166 -67
  139. package/dist/spaceGroups/positions.js.map +1 -1
  140. package/dist/tensors/propertyTable.d.ts +3 -1
  141. package/dist/tensors/propertyTable.d.ts.map +1 -1
  142. package/dist/tensors/propertyTable.js +17 -10
  143. package/dist/tensors/propertyTable.js.map +1 -1
  144. package/dist/tensors/rowEchelon.d.ts +12 -4
  145. package/dist/tensors/rowEchelon.d.ts.map +1 -1
  146. package/dist/tensors/rowEchelon.js +24 -11
  147. package/dist/tensors/rowEchelon.js.map +1 -1
  148. package/dist/tensors/tensorForm.d.ts +75 -34
  149. package/dist/tensors/tensorForm.d.ts.map +1 -1
  150. package/dist/tensors/tensorForm.js +173 -68
  151. package/dist/tensors/tensorForm.js.map +1 -1
  152. package/dist/tensors/tensorProperties.d.ts +10 -9
  153. package/dist/tensors/tensorProperties.d.ts.map +1 -1
  154. package/dist/tensors/tensorProperties.js +22 -12
  155. package/dist/tensors/tensorProperties.js.map +1 -1
  156. package/dist/tolerances.d.ts +56 -1
  157. package/dist/tolerances.d.ts.map +1 -1
  158. package/dist/tolerances.js +51 -1
  159. package/dist/tolerances.js.map +1 -1
  160. package/dist/version.d.ts +1 -1
  161. package/dist/version.js +1 -1
  162. package/package.json +1 -1
  163. package/src/cell.ts +78 -51
  164. package/src/checks.ts +84 -0
  165. package/src/closure.ts +214 -0
  166. package/src/crystalClasses.ts +234 -160
  167. package/src/freeze.ts +14 -0
  168. package/src/index.ts +21 -10
  169. package/src/indices.ts +108 -18
  170. package/src/lattice.ts +41 -1
  171. package/src/linalg.ts +3 -3
  172. package/src/magnetic.ts +14 -9
  173. package/src/notation.ts +73 -0
  174. package/src/operations.ts +78 -69
  175. package/src/plane.ts +253 -127
  176. package/src/pointGroups/crystalForms.ts +11 -44
  177. package/src/pointGroups/crystalFormsData.ts +66 -1
  178. package/src/pointGroups/elements.ts +82 -92
  179. package/src/pointGroups/identify.ts +38 -97
  180. package/src/pointGroups/itaOrder.ts +117 -101
  181. package/src/pointGroups/itcData.ts +404 -0
  182. package/src/pointGroups/itcMagneticData.ts +206 -0
  183. package/src/pointGroups/keys.ts +144 -0
  184. package/src/pointGroups/magneticSymbols.ts +18 -17
  185. package/src/pointGroups/orbits.ts +41 -89
  186. package/src/pointGroups/pointGroups.ts +540 -297
  187. package/src/pointGroups/properties.ts +44 -40
  188. package/src/pointGroups/seitzData.ts +147 -0
  189. package/src/pointGroups/wyckoff.ts +137 -112
  190. package/src/pointGroups/wyckoffData.ts +793 -170
  191. package/src/siteSymmetry.ts +71 -64
  192. package/src/spaceGroups/affine.ts +3 -2
  193. package/src/spaceGroups/cell.ts +227 -116
  194. package/src/spaceGroups/describe.ts +22 -19
  195. package/src/spaceGroups/planeGroupData.ts +9 -9
  196. package/src/spaceGroups/planeGroups.ts +2 -1
  197. package/src/spaceGroups/positions.ts +202 -78
  198. package/src/tensors/propertyTable.ts +29 -17
  199. package/src/tensors/rowEchelon.ts +28 -9
  200. package/src/tensors/tensorForm.ts +260 -89
  201. package/src/tensors/tensorProperties.ts +34 -14
  202. package/src/tolerances.ts +66 -1
  203. package/src/version.ts +1 -1
  204. package/dist/pointGroups/data.d.ts +0 -75
  205. package/dist/pointGroups/data.d.ts.map +0 -1
  206. package/dist/pointGroups/data.js +0 -212
  207. package/dist/pointGroups/data.js.map +0 -1
  208. package/dist/pointGroups/magneticData.d.ts +0 -66
  209. package/dist/pointGroups/magneticData.d.ts.map +0 -1
  210. package/dist/pointGroups/magneticData.js +0 -184
  211. package/dist/pointGroups/magneticData.js.map +0 -1
  212. package/dist/spaceGroups/snap.d.ts +0 -20
  213. package/dist/spaceGroups/snap.d.ts.map +0 -1
  214. package/dist/spaceGroups/snap.js +0 -103
  215. package/dist/spaceGroups/snap.js.map +0 -1
  216. package/src/pointGroups/data.ts +0 -305
  217. package/src/pointGroups/magneticData.ts +0 -328
  218. package/src/spaceGroups/snap.ts +0 -121
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.0';
6
+ export const VERSION = '0.11.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,E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,CAAC;AACtE,eAAO,MAAM,eAAe,EAAE,IAAuC,CAAC;AACtE,eAAO,MAAM,OAAO,MAAgB,CAAC;AACrC,eAAO,MAAM,OAAO,MAAgB,CAAC;AAiErC,eAAO,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;AAC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AAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAChE,YAAY,CACV,MAAM,EACN,WAAW,EACX,KAAK,EACL,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,EACxB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EACjC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAClC;IACD,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,CAAC;IAEjF,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;IAC/D,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC;IAC/E,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAClE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC;IAC3E,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,YAAY,CAAC;CACrF,CAAC"}
@@ -1,66 +0,0 @@
1
- /**
2
- * The 90 magnetic point groups with time reversal as data: the 32 grey groups (type II) and the 58
3
- * black-and-white groups (type III). With the 32 crystal classes (type I, data.ts) they are the 122
4
- * magnetic point groups.
5
- *
6
- * A grey group is its crystal class P together with all operations of P combined with time
7
- * reversal (ITC Vol. D, eq. (1.5.2.1)); its data follow from the class. A black-and-white group is
8
- * stored like a class: generators in the stored (Birss) frame, here those of birss-app, and the
9
- * frames of its settings. The symbols of a setting are not stored: they are the symbols of the
10
- * crystal class in that frame with the primes the operations carry (magneticSymbols.ts).
11
- * Print anchors and their tests: docs/conventions.md, "Sources".
12
- */
13
- import { type Mat3 } from '../linalg.js';
14
- import { type Operation } from '../operations.js';
15
- import { type PointGroupKey } from './data.js';
16
- /** Keys of the 32 grey groups: the key of the crystal class followed by `1'`. */
17
- export type GreyPointGroupKey = `${PointGroupKey}1'`;
18
- export declare const GREY_POINT_GROUP_KEYS: readonly GreyPointGroupKey[];
19
- /**
20
- * Keys of the 58 black-and-white groups: the short Hermann–Mauguin symbol of ITC Vol. D
21
- * Table 1.5.2.3, in the order of the table (docs/conventions.md, "Keys").
22
- */
23
- export declare const BLACK_WHITE_POINT_GROUP_KEYS: readonly ["-1'", "2'", "m'", "2'/m'", "2/m'", "2'/m", "2'2'2", "m'm'2", "2'm'm", "mm'm'", "m'm'm'", "mmm'", "4'", "-4'", "4'/m", "4/m'", "4'/m'", "4'22'", "42'2'", "4'mm'", "4m'm'", "-4'2m'", "-4'm2'", "-42'm'", "4'/mmm'", "4/mm'm'", "4/m'm'm'", "4/m'mm", "4'/m'm'm", "-3'", "32'", "3m'", "-3m'", "-3'm'", "-3'm", "6'", "-6'", "6'/m'", "6/m'", "6'/m", "6'22'", "62'2'", "6'mm'", "6m'm'", "-6'2m'", "-6'm2'", "-6m'2'", "6'/m'mm'", "6/mm'm'", "6/m'm'm'", "6/m'mm", "6'/mmm'", "m'-3'", "4'32'", "-4'3m'", "m-3m'", "m'-3'm'", "m'-3'm"];
24
- /** The key of one of the 58 black-and-white magnetic point groups. */
25
- export type BlackWhitePointGroupKey = Extract<(typeof BLACK_WHITE_POINT_GROUP_KEYS)[number], string>;
26
- /** Keys of all 122 magnetic point groups: the 32 crystal classes, the 32 grey groups, the 58 black-and-white groups. */
27
- export type MagneticPointGroupKey = PointGroupKey | GreyPointGroupKey | BlackWhitePointGroupKey;
28
- /**
29
- * Keys of the 122 magnetic point groups: the 32 crystal classes (white groups), the 32 grey groups
30
- * and the 58 black-and-white groups, in this order (docs/conventions.md, "Keys").
31
- */
32
- export declare const MAGNETIC_POINT_GROUP_KEYS: readonly MagneticPointGroupKey[];
33
- /** The frame of a setting of a black-and-white group. */
34
- export interface MagneticFrame {
35
- /** Orthogonal matrix s: the setting's operations are s·W·sᵀ for the stored operations W. */
36
- readonly frame: Mat3;
37
- /** Monoclinic: the unique axis; orthorhombic: the axis the stored z axis is carried to. */
38
- readonly uniqueAxis?: 'a' | 'b' | 'c';
39
- }
40
- export interface BlackWhiteData {
41
- readonly key: BlackWhitePointGroupKey;
42
- /** The crystal class the group becomes when every prime is dropped. */
43
- readonly crystalClass: PointGroupKey;
44
- readonly schoenflies: string;
45
- /** Generators in the stored (Birss) frame, which is setting 1. */
46
- readonly generators: readonly Operation[];
47
- /** Setting 1 first; its frame is the identity. */
48
- readonly settings: readonly MagneticFrame[];
49
- /** The ITC default setting (1-based). The Birss default is always setting 1. */
50
- readonly itcDefault: number;
51
- }
52
- /** Time reversal alone: the identity combined with time reversal (1'). */
53
- export declare const TIME_REVERSAL: Operation;
54
- /**
55
- * The 58 black-and-white groups. The generators are birss-app's (CLAUDE.md, "birss-app is the
56
- * reference where print leaves a choice open"); the group they generate is checked against Birss's
57
- * Table 6 and against ITC Vol. D Table 1.5.2.3. Setting frames as for the classes (data.ts), with three more for `2'm'm`; the
58
- * ITC default is the frame in which the key, read along ITA's symmetry directions, describes the
59
- * group, which is the frame of the operators printed in Table 1.5.2.3.
60
- */
61
- export declare const BLACK_WHITE_DATA: readonly BlackWhiteData[];
62
- /** Schoenflies symbol of a grey group: that of its class with the subscript R (ITC Vol. D, Table 1.5.2.1). */
63
- export declare const greySchoenflies: (classSymbol: string) => string;
64
- /** The data of the crystal class with this key. */
65
- export declare function classData(key: PointGroupKey): import("./data.js").PointGroupData;
66
- //# sourceMappingURL=magneticData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"magneticData.d.ts","sourceRoot":"","sources":["../../src/pointGroups/magneticData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAuB,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAwBL,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AAEnB,iFAAiF;AACjF,MAAM,MAAM,iBAAiB,GAAG,GAAG,aAAa,IAAI,CAAC;AAErD,eAAO,MAAM,qBAAqB,EAAE,SAAS,iBAAiB,EAE7D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,qhBA2D9B,CAAC;AAEZ,sEAAsE;AAEtE,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AAErG,wHAAwH;AACxH,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,iBAAiB,GAAG,uBAAuB,CAAC;AAEhG;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,qBAAqB,EAIpE,CAAC;AAEH,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IACrB,2FAA2F;IAC3F,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CACvC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;IACtC,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,SAA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