symcrys 0.4.0 → 0.6.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 (75) hide show
  1. package/README.md +15 -132
  2. package/dist/crystalClasses.d.ts +211 -0
  3. package/dist/crystalClasses.d.ts.map +1 -0
  4. package/dist/crystalClasses.js +295 -0
  5. package/dist/crystalClasses.js.map +1 -0
  6. package/dist/index.d.ts +11 -9
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +6 -8
  9. package/dist/index.js.map +1 -1
  10. package/dist/magnetic.d.ts +35 -0
  11. package/dist/magnetic.d.ts.map +1 -0
  12. package/dist/magnetic.js +22 -0
  13. package/dist/magnetic.js.map +1 -0
  14. package/dist/operations.d.ts +8 -0
  15. package/dist/operations.d.ts.map +1 -1
  16. package/dist/operations.js +25 -0
  17. package/dist/operations.js.map +1 -1
  18. package/dist/pointGroups/data.d.ts +34 -0
  19. package/dist/pointGroups/data.d.ts.map +1 -1
  20. package/dist/pointGroups/data.js +29 -21
  21. package/dist/pointGroups/data.js.map +1 -1
  22. package/dist/pointGroups/elements.d.ts +12 -5
  23. package/dist/pointGroups/elements.d.ts.map +1 -1
  24. package/dist/pointGroups/elements.js +6 -1
  25. package/dist/pointGroups/elements.js.map +1 -1
  26. package/dist/pointGroups/magneticData.d.ts +61 -0
  27. package/dist/pointGroups/magneticData.d.ts.map +1 -0
  28. package/dist/pointGroups/magneticData.js +180 -0
  29. package/dist/pointGroups/magneticData.js.map +1 -0
  30. package/dist/pointGroups/magneticSymbols.d.ts +22 -0
  31. package/dist/pointGroups/magneticSymbols.d.ts.map +1 -0
  32. package/dist/pointGroups/magneticSymbols.js +103 -0
  33. package/dist/pointGroups/magneticSymbols.js.map +1 -0
  34. package/dist/pointGroups/pointGroups.d.ts +94 -24
  35. package/dist/pointGroups/pointGroups.d.ts.map +1 -1
  36. package/dist/pointGroups/pointGroups.js +293 -47
  37. package/dist/pointGroups/pointGroups.js.map +1 -1
  38. package/dist/pointGroups/properties.d.ts +25 -16
  39. package/dist/pointGroups/properties.d.ts.map +1 -1
  40. package/dist/pointGroups/properties.js +46 -56
  41. package/dist/pointGroups/properties.js.map +1 -1
  42. package/dist/pointGroups/wyckoff.d.ts +2 -1
  43. package/dist/pointGroups/wyckoff.d.ts.map +1 -1
  44. package/dist/pointGroups/wyckoff.js +6 -2
  45. package/dist/pointGroups/wyckoff.js.map +1 -1
  46. package/dist/tensors/propertyTable.d.ts +35 -0
  47. package/dist/tensors/propertyTable.d.ts.map +1 -0
  48. package/dist/tensors/propertyTable.js +32 -0
  49. package/dist/tensors/propertyTable.js.map +1 -0
  50. package/dist/tensors/tensorForm.d.ts +16 -10
  51. package/dist/tensors/tensorForm.d.ts.map +1 -1
  52. package/dist/tensors/tensorForm.js +23 -24
  53. package/dist/tensors/tensorForm.js.map +1 -1
  54. package/dist/tensors/tensorProperties.d.ts +30 -0
  55. package/dist/tensors/tensorProperties.d.ts.map +1 -0
  56. package/dist/tensors/tensorProperties.js +44 -0
  57. package/dist/tensors/tensorProperties.js.map +1 -0
  58. package/dist/version.d.ts +1 -1
  59. package/dist/version.js +1 -1
  60. package/package.json +9 -26
  61. package/src/crystalClasses.ts +436 -0
  62. package/src/index.ts +32 -38
  63. package/src/magnetic.ts +87 -0
  64. package/src/operations.ts +29 -0
  65. package/src/pointGroups/data.ts +29 -21
  66. package/src/pointGroups/elements.ts +23 -7
  67. package/src/pointGroups/magneticData.ts +322 -0
  68. package/src/pointGroups/magneticSymbols.ts +110 -0
  69. package/src/pointGroups/pointGroups.ts +380 -65
  70. package/src/pointGroups/properties.ts +47 -56
  71. package/src/pointGroups/wyckoff.ts +15 -2
  72. package/src/tensors/propertyTable.ts +79 -0
  73. package/src/tensors/tensorForm.ts +34 -28
  74. package/src/tensors/tensorProperties.ts +50 -0
  75. package/src/version.ts +1 -1
@@ -0,0 +1,295 @@
1
+ /**
2
+ * The crystallographic API: the 32 crystal classes, without time reversal. It is what `index.ts`
3
+ * exports. Nothing here mentions time reversal: an operation is its matrix, a tensor has no time
4
+ * parity, and the named properties are those of time-even tensors. A question that involves time
5
+ * reversal (a magnetic point group, a time-odd tensor or property, an operation combined with time
6
+ * reversal) is a RangeError that names the magnetic API (`magnetic.ts`, `symcrys/magnetic`), where
7
+ * the key `'32'` is the white group and a crystal without magnetic order has the grey group of its
8
+ * class (`"321'"`; docs/conventions.md, "Two entry points").
9
+ *
10
+ * Everything is computed by the modules that serve both entry points; this module checks what
11
+ * comes in and leaves time reversal out of what goes back.
12
+ */
13
+ import * as elements from './pointGroups/elements.js';
14
+ import * as groups from './pointGroups/pointGroups.js';
15
+ import * as properties from './pointGroups/properties.js';
16
+ import * as wyckoff from './pointGroups/wyckoff.js';
17
+ import * as site from './siteSymmetry.js';
18
+ import { TENSOR_PROPERTIES as ALL_TENSOR_PROPERTIES } from './tensors/propertyTable.js';
19
+ import * as tensors from './tensors/tensorForm.js';
20
+ const USE_MAGNETIC = "the crystallographic API has no time reversal; use the magnetic API ('symcrys/magnetic', in Python symcrys.magnetic)";
21
+ /**
22
+ * The named tensor properties of the crystal classes: those of time-even tensors. `'gyrotropic'`
23
+ * is optical activity. The properties of time-odd tensors (`'ferromagnetic'`, …) are in the
24
+ * magnetic API.
25
+ */
26
+ export const TENSOR_PROPERTIES = Object.freeze(Object.fromEntries(Object.entries(ALL_TENSOR_PROPERTIES)
27
+ .filter(([, p]) => p.spec.timeParity === 'i')
28
+ .map(([name, { spec, description, source }]) => [
29
+ name,
30
+ Object.freeze({
31
+ spec: Object.freeze({ rank: spec.rank, parity: spec.parity, intrinsic: spec.intrinsic }),
32
+ description,
33
+ source,
34
+ }),
35
+ ])));
36
+ const TENSOR_PROPERTY_NAMES = Object.freeze(Object.keys(TENSOR_PROPERTIES));
37
+ // --- what comes in ---------------------------------------------------------------------------------
38
+ /** The key of a crystal class, checked. */
39
+ function classKey(key) {
40
+ if (groups.isPointGroupKey(key))
41
+ return key;
42
+ if (groups.isMagneticPointGroupKey(key)) {
43
+ throw new RangeError(`${JSON.stringify(key)} is a magnetic point group, not a crystal class: ${USE_MAGNETIC}`);
44
+ }
45
+ throw new RangeError(`Unknown point group key: ${JSON.stringify(key)}`);
46
+ }
47
+ /** A name of the table of this API, checked. */
48
+ function propertyName(name) {
49
+ if (typeof name === 'string') {
50
+ if (Object.hasOwn(TENSOR_PROPERTIES, name))
51
+ return name;
52
+ if (Object.hasOwn(ALL_TENSOR_PROPERTIES, name)) {
53
+ throw new RangeError(`${JSON.stringify(name)} is the property of a time-odd tensor: ${USE_MAGNETIC}`);
54
+ }
55
+ }
56
+ throw new RangeError(`Unknown tensor property: ${JSON.stringify(name)} (known: ${TENSOR_PROPERTY_NAMES.join(', ')})`);
57
+ }
58
+ /** The time-even tensor of a specification or of a property name, as the shared modules take it. */
59
+ function timeEven(specOrName) {
60
+ if (typeof specOrName === 'string')
61
+ return propertyName(specOrName);
62
+ if (typeof specOrName !== 'object' || specOrName === null) {
63
+ throw new RangeError(`Not a tensor specification: ${JSON.stringify(specOrName)}`);
64
+ }
65
+ const timeParity = specOrName.timeParity;
66
+ if (timeParity === 'c')
67
+ throw new RangeError(`A time-odd tensor (timeParity 'c'): ${USE_MAGNETIC}`);
68
+ if (timeParity !== undefined && timeParity !== 'i') {
69
+ throw new RangeError(`Unknown time parity: ${JSON.stringify(timeParity)}`);
70
+ }
71
+ return { rank: specOrName.rank, parity: specOrName.parity, timeParity: 'i', intrinsic: specOrName.intrinsic };
72
+ }
73
+ /** Checks a list of operations of a caller: an operation with time reversal is an error. */
74
+ function checkUnitary(operations) {
75
+ operations.forEach((op, i) => {
76
+ const timeReversal = op.timeReversal;
77
+ if (timeReversal === true) {
78
+ throw new RangeError(`Operation ${i} is combined with time reversal: ${USE_MAGNETIC}`);
79
+ }
80
+ if (timeReversal !== undefined && timeReversal !== false) {
81
+ throw new RangeError(`Operation ${i}: timeReversal must be false or absent, not ${JSON.stringify(timeReversal)}`);
82
+ }
83
+ });
84
+ }
85
+ /** A list of operations as the shared modules take it. */
86
+ function unitary(operations) {
87
+ checkUnitary(operations);
88
+ return operations.map((op) => ({ matrix: op.matrix, timeReversal: false }));
89
+ }
90
+ // --- what goes back --------------------------------------------------------------------------------
91
+ const withoutTimeCache = new WeakMap();
92
+ /** The operations as their matrices; the shared modules return the same frozen list for the same call. */
93
+ function matricesOnly(ops) {
94
+ let result = withoutTimeCache.get(ops);
95
+ if (!result) {
96
+ result = Object.freeze(ops.map((op) => Object.freeze({ matrix: op.matrix })));
97
+ withoutTimeCache.set(ops, result);
98
+ }
99
+ return result;
100
+ }
101
+ const descriptionCache = new WeakMap();
102
+ // --- point groups ----------------------------------------------------------------------------------
103
+ export { POINT_GROUP_KEYS } from './pointGroups/pointGroups.js';
104
+ /** True if `key` is the key of one of the 32 crystal classes. */
105
+ export function isPointGroupKey(key) {
106
+ return groups.isPointGroupKey(key);
107
+ }
108
+ const groupCache = new Map();
109
+ /** The crystal class with this key. Throws a RangeError for an unknown key. */
110
+ export function pointGroup(key) {
111
+ let g = groupCache.get(classKey(key));
112
+ if (!g) {
113
+ const { crystalSystem, order, centrosymmetric, polar, chiral, laueClass } = groups.pointGroup(key);
114
+ g = Object.freeze({ key, crystalSystem, order, centrosymmetric, polar, chiral, laueClass });
115
+ groupCache.set(key, g);
116
+ }
117
+ return g;
118
+ }
119
+ /** All 32 crystal classes, in the order of `POINT_GROUP_KEYS` (by crystal system, as in ITA). */
120
+ export function pointGroups() {
121
+ return groups.POINT_GROUP_KEYS.map((key) => pointGroup(key));
122
+ }
123
+ /**
124
+ * Finds a crystal class by a Hermann–Mauguin symbol in the given convention (default `'itc'`): the
125
+ * short symbol of a setting, a full symbol, or the key (spaces are ignored). A symbol that names
126
+ * one setting gives that setting; the key, and a short symbol that several settings share (the
127
+ * monoclinic ones: `2` for unique axis b and c), give the default setting of the convention.
128
+ * Returns undefined if nothing matches, also for a value that is not a string and for the
129
+ * symbol of a magnetic group with time reversal. Symbols are written as in this library: `-` for
130
+ * the overbar, also in the Birss convention (`m-3m`, where Birss prints `m3m`; docs/conventions.md,
131
+ * "Where ITC and Birss differ").
132
+ */
133
+ export function findPointGroup(hm, conventionName = 'itc') {
134
+ return groups.findPointGroup(hm, conventionName);
135
+ }
136
+ /** The settings of a crystal class, with symbols and the default of the given convention (default `'itc'`). */
137
+ export function settings(key, conventionName = 'itc') {
138
+ return groups.settings(classKey(key), conventionName);
139
+ }
140
+ /**
141
+ * All operations of the crystal class in the requested setting (default: the convention's default
142
+ * setting). ITC convention: in ITA's order, identity first, then as ITA numbers the general
143
+ * position. Birss convention: in birss-app's order (docs/conventions.md, "Order of the
144
+ * operations"). The matrices are Cartesian (docs/conventions.md, "Cartesian frame").
145
+ */
146
+ export function operations(key, options) {
147
+ return matricesOnly(groups.operations(classKey(key), options));
148
+ }
149
+ /**
150
+ * Generators of the crystal class in the requested setting (docs/conventions.md, "Generators"). ITC
151
+ * convention: ITA's selected generators in printed order, without the identity and ITA's lattice
152
+ * translations, so the list is empty for `1`; for `mm2` settings 2 and 3, which ITA does not list,
153
+ * those of setting 1 carried into their frame. Birss convention: birss-app's generators (for `1`
154
+ * the identity, as in birss-app).
155
+ */
156
+ export function generators(key, options) {
157
+ return matricesOnly(groups.generators(classKey(key), options));
158
+ }
159
+ /** A symbol of the crystal class in the requested convention and setting. */
160
+ export function symbol(key, options) {
161
+ return groups.symbol(classKey(key), options);
162
+ }
163
+ // --- properties that follow from operations ---------------------------------------------------------
164
+ export { holohedry } from './pointGroups/properties.js';
165
+ /**
166
+ * True if the group generated by `operations` contains the inversion, e.g. for the operations of a
167
+ * distorted crystal. A list that is not closed is closed first. For a crystal class, read
168
+ * `pointGroup(key).centrosymmetric`.
169
+ */
170
+ export function isCentrosymmetricOf(operations) {
171
+ return properties.isCentrosymmetricOf(unitary(operations));
172
+ }
173
+ /**
174
+ * True if the group generated by `operations` is chiral: proper rotations only. For a crystal
175
+ * class, read `pointGroup(key).chiral`. Polar is the named property `'pyroelectric'`:
176
+ * `allowsPropertyOf(operations, 'pyroelectric')`.
177
+ */
178
+ export function isChiralOf(operations) {
179
+ return properties.isChiralOf(unitary(operations));
180
+ }
181
+ // --- symmetry elements -----------------------------------------------------------------------------
182
+ /**
183
+ * Each operation of the crystal class described geometrically, in the order of `operations` for
184
+ * the same key and options. Axes are named by the symmetry direction they lie along: in the ITC
185
+ * convention with the sign of ITA Table 2.1.3.1, in the Birss convention signed as birss-app signs
186
+ * them (first non-zero Cartesian component positive); the sign fixes what the sense refers to.
187
+ */
188
+ export function describeOperations(key, options) {
189
+ const described = elements.describeOperations(classKey(key), options);
190
+ let result = descriptionCache.get(described);
191
+ if (!result) {
192
+ result = Object.freeze(described.map(({ kind, order, axis, sense }) => Object.freeze({ kind, order, ...(axis ? { axis } : {}), ...(sense ? { sense } : {}) })));
193
+ descriptionCache.set(described, result);
194
+ }
195
+ return result;
196
+ }
197
+ /**
198
+ * The positions of the full Hermann–Mauguin symbol in the requested convention and setting, each
199
+ * with its symmetry directions (ITA Table 2.1.3.1) and the symmetry elements along them. All
200
+ * positions of the crystal family are listed, also those the symbol of the class leaves out (then
201
+ * without `symbol`); the triclinic family has none. The directions keep the sign of Table 2.1.3.1
202
+ * in both conventions; in the Birss convention an axis of `describeOperations` may be reversed, so
203
+ * match it to a direction by |dot| = 1, not by identity.
204
+ */
205
+ export function symmetryDirections(key, options) {
206
+ return elements.symmetryDirections(classKey(key), options);
207
+ }
208
+ // --- site symmetry and Wyckoff positions -----------------------------------------------------------
209
+ /**
210
+ * The site symmetry of `direction` (any non-zero vector, Cartesian) under `operations`, which may
211
+ * be any list of point operations (for instance those of a distorted crystal). The operations
212
+ * fixing the direction within the tolerance are closed under the products found in the list and
213
+ * the direction is set onto their fixed space, repeated until stable, so that for a group the
214
+ * result is a subgroup and the set direction lies exactly on its elements. For a list that is not a
215
+ * group, `multiplicity` may not be an integer. Throws a RangeError for a zero vector, and if the
216
+ * closed operations fix no common direction (a tolerance far too large, e.g. 0.5).
217
+ */
218
+ export function siteSymmetry(operations, direction, options) {
219
+ checkUnitary(operations);
220
+ // The shared function reads the matrices only, and it keeps the products of a list by the identity
221
+ // of the list, so the list of the caller is passed on as it is.
222
+ return site.siteSymmetry(operations, direction, options);
223
+ }
224
+ /**
225
+ * The Wyckoff positions of a crystal class for directions, as ITA tabulates them (general position
226
+ * first), in the ITC convention only (docs/conventions.md, "Site symmetry and Wyckoff positions").
227
+ */
228
+ export function wyckoffPositions(key, options) {
229
+ return wyckoff.wyckoffPositions(classKey(key), options);
230
+ }
231
+ /**
232
+ * The Wyckoff position of a direction (Cartesian) in a crystal class: the position whose site
233
+ * symmetry is conjugate to that of the direction (ITA's definition). `tolerance` as for
234
+ * `siteSymmetry`.
235
+ */
236
+ export function wyckoffPositionOf(key, direction, options) {
237
+ return wyckoff.wyckoffPositionOf(classKey(key), direction, options);
238
+ }
239
+ // --- tensors ---------------------------------------------------------------------------------------
240
+ /**
241
+ * The form of a tensor under a crystal class in the requested setting (default: the default
242
+ * setting of the convention, `'itc'` unless given). The tensor is given by its specification or by
243
+ * the name of a property in `TENSOR_PROPERTIES` (`'piezoelectric'`). The convention matters only
244
+ * through the setting: the same setting index gives the same form in both conventions
245
+ * (docs/conventions.md, "Tensors").
246
+ */
247
+ export function tensorForm(key, spec, options) {
248
+ return tensors.tensorForm(classKey(key), timeEven(spec), options);
249
+ }
250
+ /**
251
+ * The form of a tensor under the group generated by `operations`, e.g. the site symmetry of a
252
+ * surface normal (`siteSymmetry`) or the operations of a distorted crystal. The tensor is given by
253
+ * its specification or by the name of a property in `TENSOR_PROPERTIES`. The operations are
254
+ * Cartesian and orthogonal; a list that is not closed is closed first.
255
+ */
256
+ export function tensorFormOf(operations, spec) {
257
+ return tensors.tensorFormOf(unitary(operations), timeEven(spec));
258
+ }
259
+ /**
260
+ * The components of `tensor` (length 3^rank, flat index) in a frame rotated by the orthogonal
261
+ * matrix `rotation`: t′_{i…} = f·Σ R_{ia}…R_{…}·t_{a…}, with f = det(R) for an axial tensor and 1
262
+ * for a polar one. To express a tensor in the frame of a surface, pass the matrix whose rows are
263
+ * the new axes in the old frame. The kind of tensor is given by its specification or by the name
264
+ * of a property in `TENSOR_PROPERTIES`.
265
+ */
266
+ export function rotateTensor(tensor, rotation, specOrName) {
267
+ return tensors.rotateTensor(tensor, rotation, timeEven(specOrName));
268
+ }
269
+ /**
270
+ * True if the crystal class allows the named property, e.g. `allowsProperty('-6m2',
271
+ * 'piezoelectric')`: the tensor that describes it (`TENSOR_PROPERTIES`) has a non-zero form under
272
+ * the class. Symmetry only allows a property; whether a crystal shows it is a question of the
273
+ * material. It does not depend on setting or convention. Throws a RangeError for an unknown key or
274
+ * name.
275
+ */
276
+ export function allowsProperty(key, name) {
277
+ return tensors.tensorForm(classKey(key), propertyName(name), { setting: 1 }).basis.length > 0;
278
+ }
279
+ /** The named properties the crystal class allows, in the order of `TENSOR_PROPERTIES`. */
280
+ export function allowedProperties(key) {
281
+ return TENSOR_PROPERTY_NAMES.filter((name) => allowsProperty(key, name));
282
+ }
283
+ /**
284
+ * True if the group generated by `operations` allows the named property, e.g. for the site
285
+ * symmetry of a surface normal or the operations of a distorted crystal.
286
+ */
287
+ export function allowsPropertyOf(operations, name) {
288
+ return tensors.tensorFormOf(unitary(operations), propertyName(name)).basis.length > 0;
289
+ }
290
+ /** The named properties the group generated by `operations` allows. */
291
+ export function allowedPropertiesOf(operations) {
292
+ const ops = unitary(operations);
293
+ return TENSOR_PROPERTY_NAMES.filter((name) => tensors.tensorFormOf(ops, name).basis.length > 0);
294
+ }
295
+ //# sourceMappingURL=crystalClasses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crystalClasses.js","sourceRoot":"","sources":["../src/crystalClasses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,O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,CAAC;AAChG,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,iBAAiB,CAAC,GAAkB;IAClD,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAwC,EAAE,IAAwB;IACjG,OAAO,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACxF,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,mBAAmB,CAAC,UAAwC;IAC1E,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAChC,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAClG,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,16 +1,18 @@
1
1
  /**
2
- * Public API of symcrys. Everything exported here is covered by SemVer (see CLAUDE.md);
3
- * everything else is internal.
2
+ * Public API of symcrys: the crystallographic API, for the 32 crystal classes and without time
3
+ * reversal. The magnetic point groups, time-odd tensors and operations with time reversal are in
4
+ * the magnetic API, `symcrys/magnetic` (`magnetic.ts`), under the same function names
5
+ * (docs/conventions.md, "Two entry points"). Everything exported here and there is covered by
6
+ * SemVer (see CLAUDE.md); everything else is internal.
4
7
  */
5
8
  export { VERSION } from './version.js';
6
9
  export type { Mat3, Vec3 } from './linalg.js';
7
- export type { Operation } from './operations.js';
8
10
  export { crystalFamily, latticeBasis, type CrystalFamily, type CrystalSystem, type FixedAngleFamily, } from './lattice.js';
9
- export { POINT_GROUP_KEYS, findPointGroup, generators, isPointGroupKey, operations, pointGroup, pointGroups, settings, symbol, type Convention, type PointGroup, type PointGroupInSetting, type PointGroupKey, type PointGroupType, type Setting, type SettingOptions, type SymbolOptions, } from './pointGroups/pointGroups.js';
10
- export { isCentrosymmetric, isChiral, isPiezoelectric, isPolar, laueClass } from './pointGroups/properties.js';
11
+ export type { Convention, PointGroupKey, Setting, SettingOptions, SymbolOptions } from './pointGroups/pointGroups.js';
11
12
  export { LATTICE_SYMMETRY_DIRECTIONS, type Uvw } from './symmetryDirections.js';
12
- export { describeOperations, symmetryDirections, type Axis, type DirectionElements, type OperationDescription, type OperationKind, type SymmetryDirection, } from './pointGroups/elements.js';
13
- export { siteSymmetry, type SiteSymmetry, type SiteSymmetryOptions } from './siteSymmetry.js';
14
- export { wyckoffPositionOf, wyckoffPositions, type Hkl, type WyckoffOptions, type WyckoffPosition, } from './pointGroups/wyckoff.js';
15
- export { rotateTensor, tensorForm, tensorFormOf, type IntrinsicSymmetry, type TensorForm, type TensorParity, type TensorRank, type TensorSpec, type TimeParity, } from './tensors/tensorForm.js';
13
+ export type { Axis, DirectionElements, OperationKind, SymmetryDirection } from './pointGroups/elements.js';
14
+ export type { SiteSymmetry, SiteSymmetryOptions } from './siteSymmetry.js';
15
+ export type { Hkl, WyckoffOptions, WyckoffPosition } from './pointGroups/wyckoff.js';
16
+ export type { IntrinsicSymmetry, TensorForm, TensorParity, TensorRank } from './tensors/tensorForm.js';
17
+ export { POINT_GROUP_KEYS, TENSOR_PROPERTIES, allowedProperties, allowedPropertiesOf, allowsProperty, allowsPropertyOf, describeOperations, findPointGroup, generators, holohedry, isCentrosymmetricOf, isChiralOf, isPointGroupKey, operations, pointGroup, pointGroups, rotateTensor, settings, siteSymmetry, symbol, symmetryDirections, tensorForm, tensorFormOf, wyckoffPositionOf, wyckoffPositions, type Operation, type OperationDescription, type PointGroup, type PointGroupInSetting, type TensorProperty, type TensorPropertyName, type TensorSpec, } from './crystalClasses.js';
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -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YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -1,14 +1,12 @@
1
1
  /**
2
- * Public API of symcrys. Everything exported here is covered by SemVer (see CLAUDE.md);
3
- * everything else is internal.
2
+ * Public API of symcrys: the crystallographic API, for the 32 crystal classes and without time
3
+ * reversal. The magnetic point groups, time-odd tensors and operations with time reversal are in
4
+ * the magnetic API, `symcrys/magnetic` (`magnetic.ts`), under the same function names
5
+ * (docs/conventions.md, "Two entry points"). Everything exported here and there is covered by
6
+ * SemVer (see CLAUDE.md); everything else is internal.
4
7
  */
5
8
  export { VERSION } from './version.js';
6
9
  export { crystalFamily, latticeBasis, } from './lattice.js';
7
- export { POINT_GROUP_KEYS, findPointGroup, generators, isPointGroupKey, operations, pointGroup, pointGroups, settings, symbol, } from './pointGroups/pointGroups.js';
8
- export { isCentrosymmetric, isChiral, isPiezoelectric, isPolar, laueClass } from './pointGroups/properties.js';
9
10
  export { LATTICE_SYMMETRY_DIRECTIONS } from './symmetryDirections.js';
10
- export { describeOperations, symmetryDirections, } from './pointGroups/elements.js';
11
- export { siteSymmetry } from './siteSymmetry.js';
12
- export { wyckoffPositionOf, wyckoffPositions, } from './pointGroups/wyckoff.js';
13
- export { rotateTensor, tensorForm, tensorFormOf, } from './tensors/tensorForm.js';
11
+ export { POINT_GROUP_KEYS, TENSOR_PROPERTIES, allowedProperties, allowedPropertiesOf, allowsProperty, allowsPropertyOf, describeOperations, findPointGroup, generators, holohedry, isCentrosymmetricOf, isChiralOf, isPointGroupKey, operations, pointGroup, pointGroups, rotateTensor, settings, siteSymmetry, symbol, symmetryDirections, tensorForm, tensorFormOf, wyckoffPositionOf, wyckoffPositions, } from './crystalClasses.js';
14
12
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EACL,aAAa,EACb,YAAY,GAIb,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,MAAM,GASP,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/G,OAAO,EAAE,2BAA2B,EAAY,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAMnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAA+C,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GAIjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,GAOb,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EACL,aAAa,EACb,YAAY,GAIb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,2BAA2B,EAAY,MAAM,yBAAyB,CAAC;AAMhF,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,GAQjB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The magnetic API of symcrys (`symcrys/magnetic`): the 122 magnetic point groups, with time
3
+ * reversal. Everything exported here is covered by SemVer (see CLAUDE.md), like the exports of
4
+ * `index.ts`.
5
+ *
6
+ * The functions have the names they have in the crystallographic API (`index.ts`); the import
7
+ * decides which reading a key has. Here a key of type `'I'` (`'32'`) is a white (colourless)
8
+ * group: the symmetry of a magnetically ordered crystal in which time reversal does not occur at
9
+ * all. A crystal without magnetic order has the grey group of its class (quartz: `"321'"`), which
10
+ * allows no time-odd property (docs/conventions.md, "Two entry points").
11
+ */
12
+ export { VERSION } from './version.js';
13
+ export type { Mat3, Vec3 } from './linalg.js';
14
+ export type { Operation } from './operations.js';
15
+ export { crystalFamily, latticeBasis, type CrystalFamily, type CrystalSystem, type FixedAngleFamily, } from './lattice.js';
16
+ import type { PointGroupKey as ClassKey, MagneticPointGroupKey, PointGroup as PointGroupOf, PointGroupInSetting as PointGroupInSettingOf } from './pointGroups/pointGroups.js';
17
+ /**
18
+ * The key of a crystal class, one of the 32: the type of `crystalClass` and `laueClass` of a point
19
+ * group and of `holohedry()`. In the crystallographic API this is `PointGroupKey`.
20
+ */
21
+ export type CrystalClassKey = ClassKey;
22
+ /** The key of a magnetic point group: a crystal class (white group), a grey or a black-and-white group. */
23
+ export type PointGroupKey = MagneticPointGroupKey;
24
+ export type PointGroup<K extends PointGroupKey = PointGroupKey> = PointGroupOf<K>;
25
+ /** A point group in a given setting. */
26
+ export type PointGroupInSetting = PointGroupInSettingOf<PointGroupKey>;
27
+ export { MAGNETIC_POINT_GROUP_KEYS as POINT_GROUP_KEYS, findMagneticPointGroup as findPointGroup, generators, isMagneticPointGroupKey as isPointGroupKey, magneticPointGroups as pointGroups, operations, pointGroup, settings, symbol, type Convention, type PointGroupType, type Setting, type SettingOptions, type SymbolOptions, } from './pointGroups/pointGroups.js';
28
+ export { holohedry, isCentrosymmetricOf, isChiralOf } from './pointGroups/properties.js';
29
+ export { LATTICE_SYMMETRY_DIRECTIONS, type Uvw } from './symmetryDirections.js';
30
+ export { describeOperations, symmetryDirections, type Axis, type DirectionElements, type OperationDescription, type OperationKind, type SymmetryDirection, } from './pointGroups/elements.js';
31
+ export { siteSymmetry, type SiteSymmetry, type SiteSymmetryOptions } from './siteSymmetry.js';
32
+ export { rotateTensor, tensorForm, tensorFormOf, type IntrinsicSymmetry, type TensorForm, type TensorParity, type TensorRank, type TensorSpec, type TimeParity, } from './tensors/tensorForm.js';
33
+ export { TENSOR_PROPERTIES, type TensorProperty, type TensorPropertyName } from './tensors/propertyTable.js';
34
+ export { allowedProperties, allowedPropertiesOf, allowsProperty, allowsPropertyOf, } from './tensors/tensorProperties.js';
35
+ //# sourceMappingURL=magnetic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"magnetic.d.ts","sourceRoot":"","sources":["../src/magnetic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,aAAa,IAAI,QAAQ,EACzB,qBAAqB,EACrB,UAAU,IAAI,YAAY,EAC1B,mBAAmB,IAAI,qBAAqB,EAC7C,MAAM,8BAA8B,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AACvC,2GAA2G;AAC3G,MAAM,MAAM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B,GACjB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The magnetic API of symcrys (`symcrys/magnetic`): the 122 magnetic point groups, with time
3
+ * reversal. Everything exported here is covered by SemVer (see CLAUDE.md), like the exports of
4
+ * `index.ts`.
5
+ *
6
+ * The functions have the names they have in the crystallographic API (`index.ts`); the import
7
+ * decides which reading a key has. Here a key of type `'I'` (`'32'`) is a white (colourless)
8
+ * group: the symmetry of a magnetically ordered crystal in which time reversal does not occur at
9
+ * all. A crystal without magnetic order has the grey group of its class (quartz: `"321'"`), which
10
+ * allows no time-odd property (docs/conventions.md, "Two entry points").
11
+ */
12
+ export { VERSION } from './version.js';
13
+ export { crystalFamily, latticeBasis, } from './lattice.js';
14
+ export { MAGNETIC_POINT_GROUP_KEYS as POINT_GROUP_KEYS, findMagneticPointGroup as findPointGroup, generators, isMagneticPointGroupKey as isPointGroupKey, magneticPointGroups as pointGroups, operations, pointGroup, settings, symbol, } from './pointGroups/pointGroups.js';
15
+ export { holohedry, isCentrosymmetricOf, isChiralOf } from './pointGroups/properties.js';
16
+ export { LATTICE_SYMMETRY_DIRECTIONS } from './symmetryDirections.js';
17
+ export { describeOperations, symmetryDirections, } from './pointGroups/elements.js';
18
+ export { siteSymmetry } from './siteSymmetry.js';
19
+ export { rotateTensor, tensorForm, tensorFormOf, } from './tensors/tensorForm.js';
20
+ export { TENSOR_PROPERTIES } from './tensors/propertyTable.js';
21
+ export { allowedProperties, allowedPropertiesOf, allowsProperty, allowsPropertyOf, } from './tensors/tensorProperties.js';
22
+ //# sourceMappingURL=magnetic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"magnetic.js","sourceRoot":"","sources":["../src/magnetic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EACL,aAAa,EACb,YAAY,GAIb,MAAM,cAAc,CAAC;AAoBtB,OAAO,EACL,yBAAyB,IAAI,gBAAgB,EAC7C,sBAAsB,IAAI,cAAc,EACxC,UAAU,EACV,uBAAuB,IAAI,eAAe,EAC1C,mBAAmB,IAAI,WAAW,EAClC,UAAU,EACV,UAAU,EACV,QAAQ,EACR,MAAM,GAMP,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,2BAA2B,EAAY,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAMnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAA+C,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,GAOb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAgD,MAAM,4BAA4B,CAAC;AAC7G,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,GACjB,MAAM,+BAA+B,CAAC"}
@@ -16,6 +16,14 @@ export declare const MAX_GROUP_ORDER = 200;
16
16
  export declare const IDENTITY_OPERATION: Operation;
17
17
  /** A unitary operation (no time reversal). */
18
18
  export declare function operation(matrix: Mat3): Operation;
19
+ /** Throws unless `m` is orthogonal (mᵀm = 1 within `EPSILON`): the code assumes Cartesian matrices. */
20
+ export declare function checkOrthogonal(m: Mat3, what: string): void;
21
+ /**
22
+ * Checks operations that a caller passes in: each must say whether it is combined with time
23
+ * reversal. Without this, an operation that lacks `timeReversal` (as the crystallographic API
24
+ * returns them) would be composed as if it had it in every second product.
25
+ */
26
+ export declare function checkTimeReversal(operations: readonly Operation[]): void;
19
27
  /** The product a·b: first b, then a. */
20
28
  export declare function compose(a: Operation, b: Operation): Operation;
21
29
  export declare function operationsEqual(a: Operation, b: Operation): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],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G;AACvG,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,CAQxE;AAED,wCAAwC;AACxC,wBAAgB,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,SAAS,CAE7D;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAEnE;AAED,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,GAAG,SAAS,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,EAAE,CAiBxE"}
@@ -3,6 +3,7 @@
3
3
  * a set of generators into a group.
4
4
  */
5
5
  import { IDENTITY, conjugate, matricesEqual, multiply, snap } from './linalg.js';
6
+ import { EPSILON } from './tolerances.js';
6
7
  /** No point group has more than 48 operations (96 with time reversal); a closure beyond this is a data error. */
7
8
  export const MAX_GROUP_ORDER = 200;
8
9
  export const IDENTITY_OPERATION = { matrix: IDENTITY, timeReversal: false };
@@ -10,6 +11,30 @@ export const IDENTITY_OPERATION = { matrix: IDENTITY, timeReversal: false };
10
11
  export function operation(matrix) {
11
12
  return { matrix, timeReversal: false };
12
13
  }
14
+ /** Throws unless `m` is orthogonal (mᵀm = 1 within `EPSILON`): the code assumes Cartesian matrices. */
15
+ export function checkOrthogonal(m, what) {
16
+ for (let i = 0; i < 3; i++) {
17
+ for (let j = 0; j < 3; j++) {
18
+ const dot = m[0][i] * m[0][j] + m[1][i] * m[1][j] + m[2][i] * m[2][j];
19
+ // A comparison that is false for NaN, so that a matrix with NaN is refused as well.
20
+ if (!(Math.abs(dot - (i === j ? 1 : 0)) <= EPSILON)) {
21
+ throw new RangeError(`${what} is not an orthogonal (Cartesian) matrix: ${JSON.stringify(m)}`);
22
+ }
23
+ }
24
+ }
25
+ }
26
+ /**
27
+ * Checks operations that a caller passes in: each must say whether it is combined with time
28
+ * reversal. Without this, an operation that lacks `timeReversal` (as the crystallographic API
29
+ * returns them) would be composed as if it had it in every second product.
30
+ */
31
+ export function checkTimeReversal(operations) {
32
+ operations.forEach((op, i) => {
33
+ if (typeof op.timeReversal !== 'boolean') {
34
+ throw new RangeError(`Operation ${i}: timeReversal must be true or false, not ${JSON.stringify(op.timeReversal)}; an operation of the magnetic API says whether it is combined with time reversal`);
35
+ }
36
+ });
37
+ }
13
38
  /** The product a·b: first b, then a. */
14
39
  export function compose(a, b) {
15
40
  return { matrix: snap(multiply(a.matrix, b.matrix)), timeReversal: a.timeReversal !== b.timeReversal };
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAa,MAAM,aAAa,CAAC;AAW5F,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAEnC,MAAM,CAAC,MAAM,kBAAkB,GAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;AAEvF,8CAA8C;AAC9C,MAAM,UAAU,SAAS,CAAC,MAAY;IACpC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;AACzC,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,OAAO,CAAC,CAAY,EAAE,CAAY;IAChD,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,YAAY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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
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.
3
4
  *
4
5
  * Generators are stored in the Birss frame (docs/conventions.md); every setting is a rotation of
5
6
  * that frame, and the ITC settings are among them. The print anchors and their tests are listed in
@@ -35,6 +36,39 @@ export interface PointGroupData {
35
36
  /** The ITC default setting (1-based). The Birss default is always setting 1. */
36
37
  readonly itcDefault: number;
37
38
  }
39
+ export declare const ROT2_Z: Mat3;
40
+ export declare const ROT2_X: Mat3;
41
+ export declare const ROT2_Y: Mat3;
42
+ export declare const ROT4_Z: Mat3;
43
+ export declare const ROT3_Z: Mat3;
44
+ export declare const ROT6_Z: Mat3;
45
+ export declare const ROT4_X: Mat3;
46
+ export declare const ROTINV4_Z: Mat3;
47
+ export declare const ROTINV3_Z: Mat3;
48
+ export declare const ROTINV6_Z: Mat3;
49
+ export declare const MIRROR_X: Mat3;
50
+ export declare const MIRROR_Y: Mat3;
51
+ export declare const MIRROR_Z: Mat3;
52
+ /** Mirror with normal [1-10] (swaps x and y). */
53
+ export declare const MIRROR_XY: Mat3;
54
+ /** Threefold rotation about [111], mapping the vector x to y, y to z, z to x. */
55
+ export declare const ROT3_111: Mat3;
56
+ export declare const SAME: Mat3;
57
+ /** Monoclinic, c-unique (stored) → b-unique: z → y. Proper rotation. */
58
+ export declare const MONOCLINIC_B: Mat3;
59
+ /** Orthorhombic: the axis along z (stored) moves to x (cyclic x → y → z → x). */
60
+ export declare const ORTHO_TO_A: Mat3;
61
+ /** Orthorhombic: the axis along z (stored) moves to y (cyclic x → z → y → x). */
62
+ export declare const ORTHO_TO_B: Mat3;
63
+ /**
64
+ * Orthorhombic, for a group whose three elements all differ: the frames above after exchanging the
65
+ * other two axes (a rotation by 90° about the stored z axis), so the same axis stays unique.
66
+ */
67
+ export declare const ORTHO_SWAP: Mat3;
68
+ export declare const ORTHO_TO_A_SWAP: Mat3;
69
+ export declare const ORTHO_TO_B_SWAP: Mat3;
70
+ export declare const ROT45_Z: Mat3;
71
+ export declare const ROT30_Z: Mat3;
38
72
  export declare const POINT_GROUP_DATA: readonly PointGroupData[];
39
73
  export {};
40
74
  //# sourceMappingURL=data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/pointGroups/data.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;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,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,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;I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