symcrys 0.1.0 → 0.2.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 (60) hide show
  1. package/README.md +35 -12
  2. package/dist/index.d.ts +7 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +5 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/lattice.d.ts +22 -0
  7. package/dist/lattice.d.ts.map +1 -0
  8. package/dist/lattice.js +43 -0
  9. package/dist/lattice.js.map +1 -0
  10. package/dist/linalg.d.ts +32 -0
  11. package/dist/linalg.d.ts.map +1 -0
  12. package/dist/linalg.js +120 -0
  13. package/dist/linalg.js.map +1 -0
  14. package/dist/operations.d.ts +30 -0
  15. package/dist/operations.d.ts.map +1 -0
  16. package/dist/operations.js +49 -0
  17. package/dist/operations.js.map +1 -0
  18. package/dist/pointGroups/data.d.ts +40 -0
  19. package/dist/pointGroups/data.d.ts.map +1 -0
  20. package/dist/pointGroups/data.js +204 -0
  21. package/dist/pointGroups/data.js.map +1 -0
  22. package/dist/pointGroups/elements.d.ts +75 -0
  23. package/dist/pointGroups/elements.d.ts.map +1 -0
  24. package/dist/pointGroups/elements.js +181 -0
  25. package/dist/pointGroups/elements.js.map +1 -0
  26. package/dist/pointGroups/itaOrder.d.ts +22 -0
  27. package/dist/pointGroups/itaOrder.d.ts.map +1 -0
  28. package/dist/pointGroups/itaOrder.js +675 -0
  29. package/dist/pointGroups/itaOrder.js.map +1 -0
  30. package/dist/pointGroups/pointGroups.d.ts +84 -0
  31. package/dist/pointGroups/pointGroups.d.ts.map +1 -0
  32. package/dist/pointGroups/pointGroups.js +229 -0
  33. package/dist/pointGroups/pointGroups.js.map +1 -0
  34. package/dist/pointGroups/properties.d.ts +18 -0
  35. package/dist/pointGroups/properties.d.ts.map +1 -0
  36. package/dist/pointGroups/properties.js +60 -0
  37. package/dist/pointGroups/properties.js.map +1 -0
  38. package/dist/symmetryDirections.d.ts +18 -0
  39. package/dist/symmetryDirections.d.ts.map +1 -0
  40. package/dist/symmetryDirections.js +65 -0
  41. package/dist/symmetryDirections.js.map +1 -0
  42. package/dist/tolerances.d.ts +11 -0
  43. package/dist/tolerances.d.ts.map +1 -0
  44. package/dist/tolerances.js +11 -0
  45. package/dist/tolerances.js.map +1 -0
  46. package/dist/version.d.ts +1 -1
  47. package/dist/version.js +1 -1
  48. package/package.json +5 -4
  49. package/src/index.ts +41 -0
  50. package/src/lattice.ts +59 -0
  51. package/src/linalg.ts +138 -0
  52. package/src/operations.ts +63 -0
  53. package/src/pointGroups/data.ts +294 -0
  54. package/src/pointGroups/elements.ts +264 -0
  55. package/src/pointGroups/itaOrder.ts +688 -0
  56. package/src/pointGroups/pointGroups.ts +304 -0
  57. package/src/pointGroups/properties.ts +62 -0
  58. package/src/symmetryDirections.ts +72 -0
  59. package/src/tolerances.ts +12 -0
  60. package/src/version.ts +1 -1
@@ -0,0 +1,204 @@
1
+ /**
2
+ * The 32 crystallographic point groups (crystal classes) as data: generators, settings and symbols.
3
+ *
4
+ * Generators are stored in the Birss frame (docs/conventions.md); every setting is a rotation of
5
+ * that frame, and the ITC settings are among them. The print anchors and their tests are listed in
6
+ * docs/conventions.md, "Sources"; never derive data here from symcrys output.
7
+ */
8
+ import { IDENTITY, INVERSION, multiply, rotationX, rotationY, rotationZ } from '../linalg.js';
9
+ import { operation } from '../operations.js';
10
+ /** Keys of the 32 crystal classes: the ITC short symbol of the class (docs/conventions.md, "Keys"). */
11
+ export const POINT_GROUP_KEYS = Object.freeze([
12
+ '1',
13
+ '-1',
14
+ '2',
15
+ 'm',
16
+ '2/m',
17
+ '222',
18
+ 'mm2',
19
+ 'mmm',
20
+ '4',
21
+ '-4',
22
+ '4/m',
23
+ '422',
24
+ '4mm',
25
+ '-42m',
26
+ '4/mmm',
27
+ '3',
28
+ '-3',
29
+ '32',
30
+ '3m',
31
+ '-3m',
32
+ '6',
33
+ '-6',
34
+ '6/m',
35
+ '622',
36
+ '6mm',
37
+ '-6m2',
38
+ '6/mmm',
39
+ '23',
40
+ 'm-3',
41
+ '432',
42
+ '-43m',
43
+ 'm-3m',
44
+ ]);
45
+ // --- Matrices in the stored (Birss) frame ---------------------------------------------------------
46
+ const ROT2_Z = rotationZ(180);
47
+ const ROT2_X = rotationX(180);
48
+ const ROT2_Y = rotationY(180);
49
+ const ROT4_Z = rotationZ(90);
50
+ const ROT3_Z = rotationZ(120);
51
+ const ROT6_Z = rotationZ(60);
52
+ const ROT4_X = rotationX(90);
53
+ const ROTINV4_Z = multiply(ROT4_Z, INVERSION);
54
+ const ROTINV3_Z = multiply(ROT3_Z, INVERSION);
55
+ const ROTINV6_Z = multiply(ROT6_Z, INVERSION);
56
+ const MIRROR_X = [
57
+ [-1, 0, 0],
58
+ [0, 1, 0],
59
+ [0, 0, 1],
60
+ ];
61
+ const MIRROR_Y = [
62
+ [1, 0, 0],
63
+ [0, -1, 0],
64
+ [0, 0, 1],
65
+ ];
66
+ const MIRROR_Z = [
67
+ [1, 0, 0],
68
+ [0, 1, 0],
69
+ [0, 0, -1],
70
+ ];
71
+ /** Mirror with normal [1-10] (swaps x and y). */
72
+ const MIRROR_XY = [
73
+ [0, 1, 0],
74
+ [1, 0, 0],
75
+ [0, 0, 1],
76
+ ];
77
+ /** Threefold rotation about [111], mapping the vector x to y, y to z, z to x. */
78
+ const ROT3_111 = [
79
+ [0, 0, 1],
80
+ [1, 0, 0],
81
+ [0, 1, 0],
82
+ ];
83
+ // --- Setting frames -------------------------------------------------------------------------------
84
+ const SAME = [
85
+ [1, 0, 0],
86
+ [0, 1, 0],
87
+ [0, 0, 1],
88
+ ];
89
+ /** Monoclinic, c-unique (stored) → b-unique: z → y. Proper rotation. */
90
+ const MONOCLINIC_B = [
91
+ [-1, 0, 0],
92
+ [0, 0, 1],
93
+ [0, 1, 0],
94
+ ];
95
+ /** Orthorhombic: the axis along z (stored) moves to x (cyclic x → y → z → x). */
96
+ const ORTHO_TO_A = [
97
+ [0, 0, 1],
98
+ [1, 0, 0],
99
+ [0, 1, 0],
100
+ ];
101
+ /** Orthorhombic: the axis along z (stored) moves to y (cyclic x → z → y → x). */
102
+ const ORTHO_TO_B = [
103
+ [0, 1, 0],
104
+ [0, 0, 1],
105
+ [1, 0, 0],
106
+ ];
107
+ const ROT45_Z = rotationZ(45);
108
+ const ROT30_Z = rotationZ(30);
109
+ // --- Helpers ---------------------------------------------------------------------------------------
110
+ const ops = (...matrices) => matrices.map(operation);
111
+ /** A setting whose symbols are the same in both conventions. */
112
+ function setting(frame, short, full, uniqueAxis) {
113
+ const forms = { short, full };
114
+ return uniqueAxis ? { frame, uniqueAxis, itc: forms, birss: forms } : { frame, itc: forms, birss: forms };
115
+ }
116
+ /** A group with one setting whose symbols agree in both conventions. */
117
+ function group(key, crystalSystem, schoenflies, generators, full = key) {
118
+ return { key, crystalSystem, schoenflies, generators, settings: [setting(SAME, key, full)], itcDefault: 1 };
119
+ }
120
+ /**
121
+ * Trigonal and hexagonal groups whose two settings differ by 30° about z. Symbol position 2 means
122
+ * the a direction (x) in ITC and the y direction in Birss, so each frame carries, in one
123
+ * convention, the symbol the other convention gives to the other frame (docs/conventions.md).
124
+ * `secondary` is the ITC symbol with the lateral elements in the a direction; ITC's default is
125
+ * that frame, setting 2. Birss's default, setting 1, carries Birss's printed short symbol, the key.
126
+ */
127
+ function trigonalPair(key, crystalSystem, schoenflies, generators, secondary, tertiary) {
128
+ return {
129
+ key,
130
+ crystalSystem,
131
+ schoenflies,
132
+ generators,
133
+ settings: [
134
+ { frame: SAME, itc: tertiary, birss: { short: key, full: secondary.full } },
135
+ { frame: ROT30_Z, itc: secondary, birss: tertiary },
136
+ ],
137
+ itcDefault: 2,
138
+ };
139
+ }
140
+ function monoclinic(key, schoenflies, generators, full) {
141
+ const data = {
142
+ key,
143
+ crystalSystem: 'monoclinic',
144
+ schoenflies,
145
+ generators,
146
+ settings: [setting(SAME, key, full('c'), 'c'), setting(MONOCLINIC_B, key, full('b'), 'b')],
147
+ itcDefault: 2,
148
+ };
149
+ return data;
150
+ }
151
+ // --- The 32 crystal classes -----------------------------------------------------------------------
152
+ export const POINT_GROUP_DATA = [
153
+ group('1', 'triclinic', 'C1', ops(IDENTITY)),
154
+ group('-1', 'triclinic', 'Ci', ops(INVERSION)),
155
+ monoclinic('2', 'C2', ops(ROT2_Z), (u) => (u === 'c' ? '1 1 2' : '1 2 1')),
156
+ monoclinic('m', 'Cs', ops(MIRROR_Z), (u) => (u === 'c' ? '1 1 m' : '1 m 1')),
157
+ monoclinic('2/m', 'C2h', ops(ROT2_Z, INVERSION), (u) => (u === 'c' ? '1 1 2/m' : '1 2/m 1')),
158
+ group('222', 'orthorhombic', 'D2', ops(ROT2_Z, ROT2_X), '2 2 2'),
159
+ {
160
+ key: 'mm2',
161
+ crystalSystem: 'orthorhombic',
162
+ schoenflies: 'C2v',
163
+ generators: ops(ROT2_Z, MIRROR_X),
164
+ settings: [
165
+ setting(SAME, 'mm2', 'm m 2', 'c'),
166
+ setting(ORTHO_TO_A, '2mm', '2 m m', 'a'),
167
+ setting(ORTHO_TO_B, 'm2m', 'm 2 m', 'b'),
168
+ ],
169
+ itcDefault: 1,
170
+ },
171
+ group('mmm', 'orthorhombic', 'D2h', ops(ROT2_Z, ROT2_X, INVERSION), '2/m 2/m 2/m'),
172
+ group('4', 'tetragonal', 'C4', ops(ROT4_Z)),
173
+ group('-4', 'tetragonal', 'S4', ops(ROTINV4_Z)),
174
+ group('4/m', 'tetragonal', 'C4h', ops(ROT4_Z, INVERSION)),
175
+ group('422', 'tetragonal', 'D4', ops(ROT4_Z, ROT2_X), '4 2 2'),
176
+ group('4mm', 'tetragonal', 'C4v', ops(ROT4_Z, MIRROR_X), '4 m m'),
177
+ {
178
+ key: '-42m',
179
+ crystalSystem: 'tetragonal',
180
+ schoenflies: 'D2d',
181
+ generators: ops(ROTINV4_Z, ROT2_X),
182
+ settings: [setting(SAME, '-42m', '-4 2 m'), setting(ROT45_Z, '-4m2', '-4 m 2')],
183
+ itcDefault: 1,
184
+ },
185
+ group('4/mmm', 'tetragonal', 'D4h', ops(ROT4_Z, ROT2_X, INVERSION), '4/m 2/m 2/m'),
186
+ group('3', 'trigonal', 'C3', ops(ROT3_Z)),
187
+ group('-3', 'trigonal', 'C3i', ops(ROTINV3_Z)),
188
+ trigonalPair('32', 'trigonal', 'D3', ops(ROT3_Z, ROT2_Y), { short: '321', full: '3 2 1' }, { short: '312', full: '3 1 2' }),
189
+ trigonalPair('3m', 'trigonal', 'C3v', ops(ROT3_Z, MIRROR_Y), { short: '3m1', full: '3 m 1' }, { short: '31m', full: '3 1 m' }),
190
+ trigonalPair('-3m', 'trigonal', 'D3d', ops(ROT3_Z, ROT2_Y, INVERSION), { short: '-3m1', full: '-3 2/m 1' }, { short: '-31m', full: '-3 1 2/m' }),
191
+ group('6', 'hexagonal', 'C6', ops(ROT6_Z)),
192
+ group('-6', 'hexagonal', 'C3h', ops(ROTINV6_Z)),
193
+ group('6/m', 'hexagonal', 'C6h', ops(ROT6_Z, INVERSION)),
194
+ group('622', 'hexagonal', 'D6', ops(ROT6_Z, ROT2_Y), '6 2 2'),
195
+ group('6mm', 'hexagonal', 'C6v', ops(ROT6_Z, MIRROR_Y), '6 m m'),
196
+ trigonalPair('-6m2', 'hexagonal', 'D3h', ops(ROTINV6_Z, MIRROR_Y), { short: '-6m2', full: '-6 m 2' }, { short: '-62m', full: '-6 2 m' }),
197
+ group('6/mmm', 'hexagonal', 'D6h', ops(ROT6_Z, ROT2_Y, INVERSION), '6/m 2/m 2/m'),
198
+ group('23', 'cubic', 'T', ops(ROT2_Z, ROT2_X, ROT3_111), '2 3'),
199
+ group('m-3', 'cubic', 'Th', ops(ROT2_Z, ROT2_X, ROT3_111, INVERSION), '2/m -3'),
200
+ group('432', 'cubic', 'O', ops(ROT4_Z, ROT4_X, ROT3_111), '4 3 2'),
201
+ group('-43m', 'cubic', 'Td', ops(ROTINV4_Z, ROT3_111, MIRROR_XY), '-4 3 m'),
202
+ group('m-3m', 'cubic', 'Oh', ops(ROT4_Z, ROT4_X, ROT3_111, INVERSION), '4/m -3 2/m'),
203
+ ];
204
+ //# sourceMappingURL=data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/pointGroups/data.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;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,GAAG;IACH,IAAI;IACJ,GAAG;IACH,GAAG;IACH,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,GAAG;IACH,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,GAAG;IACH,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,IAAI;IACJ,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;CACE,CAAC,CAAC;AA+BZ,qGAAqG;AAErG,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7B,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7B,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7B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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"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * The geometry of a point group's operations: what each operation is (rotation, mirror, …), about
3
+ * which axis and in which sense, and which symmetry elements lie along each symmetry direction of
4
+ * the full Hermann–Mauguin symbol. Structured data only; symbols such as `3⁺ x,x,x` or `2_z` are
5
+ * left to the applications (docs/conventions.md, "Symmetry directions and elements").
6
+ */
7
+ import { type Vec3 } from '../linalg.js';
8
+ import { type Uvw } from '../symmetryDirections.js';
9
+ import { type PointGroupKey, type SettingOptions } from './pointGroups.js';
10
+ /** What a point operation is; a rotoinversion n̄ is the inversion times the rotation n (n = 3, 4, 6). */
11
+ export type OperationKind = 'identity' | 'inversion' | 'rotation' | 'rotoinversion' | 'mirror';
12
+ /** A symmetry direction: as a lattice direction [uvw] and as a Cartesian unit vector. */
13
+ export interface Axis {
14
+ /**
15
+ * Integer coordinates in the conventional basis. ITC convention: sign as in ITA Table 2.1.3.1;
16
+ * Birss convention, in `describeOperations`: first non-zero Cartesian component positive.
17
+ */
18
+ readonly lattice: Uvw;
19
+ /**
20
+ * Unit vector in the Cartesian frame of symcrys. Monoclinic: a, b, c taken along x, y, z, exact for
21
+ * the unique axis only (docs/conventions.md, "Symmetry directions and elements").
22
+ */
23
+ readonly cartesian: Vec3;
24
+ }
25
+ /** One point operation described geometrically. */
26
+ export interface OperationDescription {
27
+ readonly kind: OperationKind;
28
+ /**
29
+ * The n of the symbol n or n̄: 1 for the identity and the inversion, 2 for a mirror (m = 2̄),
30
+ * otherwise the order of the rotation part.
31
+ */
32
+ readonly order: number;
33
+ /** Rotation axis, rotoinversion axis or mirror normal; absent for the identity and the inversion. */
34
+ readonly axis?: Axis;
35
+ /**
36
+ * For n ≥ 3: `'+'` if the rotation part turns by +360°/n about `axis` (counter-clockwise seen
37
+ * from the tip of `axis` looking towards the origin), `'-'` if by −360°/n.
38
+ */
39
+ readonly sense?: '+' | '-';
40
+ readonly timeReversal: boolean;
41
+ }
42
+ /** The symmetry elements along one symmetry direction. */
43
+ export interface DirectionElements extends Axis {
44
+ /** Highest n of a rotation n about this direction; 1 if there is none. */
45
+ readonly rotation: number;
46
+ /** Highest n of a rotoinversion n̄ (n = 3, 4, 6) about this direction; 0 if there is none. */
47
+ readonly rotoinversion: number;
48
+ /** True if a mirror plane is perpendicular to this direction. */
49
+ readonly mirror: boolean;
50
+ }
51
+ /** One position of the full Hermann–Mauguin symbol: its symbol and its symmetry directions. */
52
+ export interface SymmetryDirection {
53
+ /** 1-based position in the full symbol. */
54
+ readonly position: number;
55
+ /** The symbol at this position of the full symbol, if the full symbol has this position. */
56
+ readonly symbol?: string;
57
+ readonly directions: readonly DirectionElements[];
58
+ }
59
+ /**
60
+ * Each operation of the point group described geometrically, in the order of `operations` for
61
+ * the same key and options. Axes are named by the symmetry direction they lie along: in the ITC
62
+ * convention with the sign of ITA Table 2.1.3.1, in the Birss convention signed as birss-app signs
63
+ * them (first non-zero Cartesian component positive); the sign fixes what the sense refers to.
64
+ */
65
+ export declare function describeOperations(key: PointGroupKey, options?: SettingOptions): readonly OperationDescription[];
66
+ /**
67
+ * The positions of the full Hermann–Mauguin symbol in the requested convention and setting, each
68
+ * with its symmetry directions (ITA Table 2.1.3.1) and the symmetry elements along them. All
69
+ * positions of the crystal family are listed, also those the symbol of the class leaves out (then
70
+ * without `symbol`); the triclinic family has none. The directions keep the sign of Table 2.1.3.1
71
+ * in both conventions; in the Birss convention an axis of `describeOperations` may be reversed, so
72
+ * match it to a direction by |dot| = 1, not by identity.
73
+ */
74
+ export declare function symmetryDirections(key: PointGroupKey, options?: SettingOptions): readonly SymmetryDirection[];
75
+ //# sourceMappingURL=elements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/pointGroups/elements.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,EAA+B,KAAK,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,yGAAyG;AACzG,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,GAAG,QAAQ,CAAC;AAE/F,yFAAyF;AACzF,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B;AAED,mDAAmD;AACnD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qGAAqG;IACrG,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED,0DAA0D;AAC1D,MAAM,WAAW,iBAAkB,SAAQ,IAAI;IAC7C,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8FAA8F;IAC9F,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,+FAA+F;AAC/F,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4FAA4F;IAC5F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACnD;AA2KD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,oBAAoB,EAAE,CAEhH;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,iBAAiB,EAAE,CAE7G"}
@@ -0,0 +1,181 @@
1
+ /**
2
+ * The geometry of a point group's operations: what each operation is (rotation, mirror, …), about
3
+ * which axis and in which sense, and which symmetry elements lie along each symmetry direction of
4
+ * the full Hermann–Mauguin symbol. Structured data only; symbols such as `3⁺ x,x,x` or `2_z` are
5
+ * left to the applications (docs/conventions.md, "Symmetry directions and elements").
6
+ */
7
+ import { det, trace } from '../linalg.js';
8
+ import { crystalFamily, latticeBasis } from '../lattice.js';
9
+ import { LATTICE_SYMMETRY_DIRECTIONS } from '../symmetryDirections.js';
10
+ import { operations, pointGroup, symbol, } from './pointGroups.js';
11
+ const AXIS_TOLERANCE = 1e-6;
12
+ function normalize(v) {
13
+ const n = Math.hypot(v[0], v[1], v[2]);
14
+ return [v[0] / n, v[1] / n, v[2] / n];
15
+ }
16
+ const dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
17
+ /**
18
+ * The basis used to turn [uvw] into a Cartesian direction. Monoclinic and triclinic have no fixed
19
+ * basis (`latticeBasis`); there the axes a, b, c are taken along x, y, z, which is exact for the
20
+ * monoclinic unique axis, the only symmetry direction that carries an element in a symcrys frame.
21
+ */
22
+ function basisOf(family) {
23
+ if (family === 'monoclinic' || family === 'triclinic')
24
+ return [
25
+ [1, 0, 0],
26
+ [0, 1, 0],
27
+ [0, 0, 1],
28
+ ];
29
+ return latticeBasis(family);
30
+ }
31
+ function axisOf(family, uvw) {
32
+ const b = basisOf(family);
33
+ const v = [
34
+ b[0][0] * uvw[0] + b[0][1] * uvw[1] + b[0][2] * uvw[2],
35
+ b[1][0] * uvw[0] + b[1][1] * uvw[1] + b[1][2] * uvw[2],
36
+ b[2][0] * uvw[0] + b[2][1] * uvw[1] + b[2][2] * uvw[2],
37
+ ];
38
+ return Object.freeze({ lattice: uvw, cartesian: Object.freeze(normalize(v)) });
39
+ }
40
+ /**
41
+ * The symmetry directions of a family, per position of the full symbol, in the reading of a
42
+ * convention. Birss reads position 2 of the hexagonal family along y, a tertiary direction, and
43
+ * position 3 along x, a secondary one (docs/conventions.md, "Where ITC and Birss differ").
44
+ */
45
+ function positionsOf(family, c) {
46
+ const p = LATTICE_SYMMETRY_DIRECTIONS[family];
47
+ return c === 'birss' && family === 'hexagonal' ? [p[0], p[2], p[1]] : p;
48
+ }
49
+ /** The proper rotation part of a matrix and its order n (1 for the identity). */
50
+ function rotationPart(m) {
51
+ const r = det(m) > 0 ? m : m.map((row) => row.map((v) => -v));
52
+ const cos = Math.max(-1, Math.min(1, (trace(r) - 1) / 2));
53
+ const angle = Math.acos(cos);
54
+ const n = angle < 1e-6 ? 1 : Math.round((2 * Math.PI) / angle);
55
+ if (![1, 2, 3, 4, 6].includes(n))
56
+ throw new Error(`Not a crystallographic operation (rotation order ${n})`);
57
+ return { r, n };
58
+ }
59
+ /** The axis of a proper rotation of order n ≥ 2 (sign arbitrary for n = 2). */
60
+ function rotationAxis(r, n) {
61
+ if (n === 2) {
62
+ // r + 1 has rank 1; its columns are parallel to the axis.
63
+ let best = [0, 0, 0];
64
+ let size = 0;
65
+ for (let j = 0; j < 3; j++) {
66
+ const col = [r[0][j] + (j === 0 ? 1 : 0), r[1][j] + (j === 1 ? 1 : 0), r[2][j] + (j === 2 ? 1 : 0)];
67
+ const l = Math.hypot(col[0], col[1], col[2]);
68
+ if (l > size) {
69
+ size = l;
70
+ best = col;
71
+ }
72
+ }
73
+ return normalize(best);
74
+ }
75
+ return normalize(axialVector(r));
76
+ }
77
+ /** (r − rᵀ)/2 as a vector: sin θ times the unit axis for a rotation by θ. */
78
+ const axialVector = (r) => [(r[2][1] - r[1][2]) / 2, (r[0][2] - r[2][0]) / 2, (r[1][0] - r[0][1]) / 2];
79
+ function findAxis(axes, u, what) {
80
+ const a = axes.find((x) => Math.abs(Math.abs(dot(x.cartesian, u)) - 1) < AXIS_TOLERANCE);
81
+ if (!a)
82
+ throw new Error(`${what}: axis [${u.map((v) => v.toFixed(4)).join(', ')}] is not a symmetry direction`);
83
+ return a;
84
+ }
85
+ function describe(op, axes, what) {
86
+ const proper = det(op.matrix) > 0;
87
+ const { r, n } = rotationPart(op.matrix);
88
+ const timeReversal = op.timeReversal;
89
+ if (n === 1)
90
+ return Object.freeze({ kind: proper ? 'identity' : 'inversion', order: 1, timeReversal });
91
+ const axis = findAxis(axes, rotationAxis(r, n), what);
92
+ const kind = proper ? 'rotation' : n === 2 ? 'mirror' : 'rotoinversion';
93
+ if (n === 2)
94
+ return Object.freeze({ kind, order: 2, axis, timeReversal });
95
+ const sense = dot(axialVector(r), axis.cartesian) > 0 ? '+' : '-';
96
+ return Object.freeze({ kind, order: n, axis, sense, timeReversal });
97
+ }
98
+ const cache = new Map();
99
+ function analysis(key, options) {
100
+ const ops = operations(key, options); // checks key, convention and setting
101
+ const c = options?.convention ?? 'itc';
102
+ const setting = options?.setting ?? 0;
103
+ const cacheKey = `${key}#${setting}#${c}`;
104
+ const hit = cache.get(cacheKey);
105
+ if (hit)
106
+ return hit;
107
+ const family = crystalFamily(pointGroup(key).crystalSystem);
108
+ const positions = positionsOf(family, c).map((dirs) => dirs.map((d) => axisOf(family, d)));
109
+ const all = positions.flat();
110
+ const what = `Point group ${key}`;
111
+ const descriptions = Object.freeze(ops.map((op) => describe(op, all, what)));
112
+ const tokens = family === 'triclinic' ? [] : symbol(key, { ...options, form: 'full' }).split(' ');
113
+ const directions = Object.freeze(positions.map((axes, i) => {
114
+ const elements = axes.map((a) => {
115
+ const on = descriptions.filter((d) => d.axis === a);
116
+ const max = (kind, none) => on.filter((d) => d.kind === kind).reduce((m, d) => Math.max(m, d.order), none);
117
+ return Object.freeze({
118
+ ...a,
119
+ rotation: max('rotation', 1),
120
+ rotoinversion: max('rotoinversion', 0),
121
+ mirror: on.some((d) => d.kind === 'mirror'),
122
+ });
123
+ });
124
+ const position = tokens[i] === undefined
125
+ ? { position: i + 1, directions: Object.freeze(elements) }
126
+ : { position: i + 1, symbol: tokens[i], directions: Object.freeze(elements) };
127
+ return Object.freeze(position);
128
+ }));
129
+ const result = {
130
+ descriptions: c === 'birss' ? Object.freeze(descriptions.map(birssSigned)) : descriptions,
131
+ directions,
132
+ };
133
+ cache.set(cacheKey, result);
134
+ return result;
135
+ }
136
+ const flipped = new Map();
137
+ /**
138
+ * The description with the axis signed as in birss-app (docs/conventions.md, "Birss convention and
139
+ * birss-app"): its first non-zero Cartesian component, in the order x, y, z, is positive. If the
140
+ * axis of ITA Table 2.1.3.1 points the other way, axis and sense are reversed; the rotation stays
141
+ * the same.
142
+ */
143
+ function birssSigned(d) {
144
+ const a = d.axis;
145
+ if (!a)
146
+ return d;
147
+ const first = a.cartesian.find((x) => Math.abs(x) > 1e-9) ?? 0;
148
+ if (first > 0)
149
+ return d;
150
+ let axis = flipped.get(a);
151
+ if (!axis) {
152
+ axis = Object.freeze({
153
+ lattice: Object.freeze(a.lattice.map((x) => (x === 0 ? 0 : -x))),
154
+ cartesian: Object.freeze(a.cartesian.map((x) => (x === 0 ? 0 : -x))),
155
+ });
156
+ flipped.set(a, axis);
157
+ }
158
+ const sense = d.sense === '+' ? '-' : d.sense === '-' ? '+' : undefined;
159
+ return Object.freeze({ ...d, axis, ...(sense ? { sense } : {}) });
160
+ }
161
+ /**
162
+ * Each operation of the point group described geometrically, in the order of `operations` for
163
+ * the same key and options. Axes are named by the symmetry direction they lie along: in the ITC
164
+ * convention with the sign of ITA Table 2.1.3.1, in the Birss convention signed as birss-app signs
165
+ * them (first non-zero Cartesian component positive); the sign fixes what the sense refers to.
166
+ */
167
+ export function describeOperations(key, options) {
168
+ return analysis(key, options).descriptions;
169
+ }
170
+ /**
171
+ * The positions of the full Hermann–Mauguin symbol in the requested convention and setting, each
172
+ * with its symmetry directions (ITA Table 2.1.3.1) and the symmetry elements along them. All
173
+ * positions of the crystal family are listed, also those the symbol of the class leaves out (then
174
+ * without `symbol`); the triclinic family has none. The directions keep the sign of Table 2.1.3.1
175
+ * in both conventions; in the Birss convention an axis of `describeOperations` may be reversed, so
176
+ * match it to a direction by |dot| = 1, not by identity.
177
+ */
178
+ export function symmetryDirections(key, options) {
179
+ return analysis(key, options).directions;
180
+ }
181
+ //# sourceMappingURL=elements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/pointGroups/elements.ts"],"names":[],"mappings":"AAAA;;;;;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KG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAkB,EAAE,OAAwB;IAC7E,OAAO,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC;AAC7C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAkB,EAAE,OAAwB;IAC7E,OAAO,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The order of the operations: as ITA numbers them. ITA bases the sequence of the coordinate
3
+ * triplets on its "Generators selected" (Vol. A, 5th ed. 2006, § 2.2.11 (iv), p. 27; transcribed
4
+ * for the symmorphic P group of every setting it lists in references/itc/vol-a-2006-symmetry-operations.md)
5
+ * 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".
11
+ */
12
+ import { type CrystalSystem } from '../lattice.js';
13
+ import { type Operation } from '../operations.js';
14
+ /** ITA's selected generators of a setting as Cartesian operations, in printed order, or undefined if ITA does not list it. */
15
+ export declare function itaGeneratorOperations(key: string, setting: number, system: CrystalSystem): Operation[] | undefined;
16
+ /**
17
+ * The operations of a setting in ITA's order, built coset by coset from ITA's generators, or
18
+ * undefined if ITA does not list the setting. `closed` (the closure of the stored generators) only
19
+ * bounds the loop; the caller checks that the result is the same set.
20
+ */
21
+ export declare function inItaOrder(key: string, setting: number, system: CrystalSystem, closed: readonly Operation[]): Operation[] | undefined;
22
+ //# sourceMappingURL=itaOrder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itaOrder.d.ts","sourceRoot":"","sources":["../../src/pointGroups/itaOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqoB3G,8HAA8H;AAC9H,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,SAAS,EAAE,GAAG,SAAS,CAEnH;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,SAAS,SAAS,EAAE,GAC3B,SAAS,EAAE,GAAG,SAAS,CAazB"}