symcrys 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/cell.d.ts +19 -16
- package/dist/cell.d.ts.map +1 -1
- package/dist/cell.js +63 -35
- package/dist/cell.js.map +1 -1
- package/dist/checks.d.ts +29 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +79 -0
- package/dist/checks.js.map +1 -0
- package/dist/closure.d.ts +43 -0
- package/dist/closure.d.ts.map +1 -0
- package/dist/closure.js +201 -0
- package/dist/closure.js.map +1 -0
- package/dist/coordinates.d.ts +143 -0
- package/dist/coordinates.d.ts.map +1 -0
- package/dist/coordinates.js +198 -0
- package/dist/coordinates.js.map +1 -0
- package/dist/crystalClasses.d.ts +170 -117
- package/dist/crystalClasses.d.ts.map +1 -1
- package/dist/crystalClasses.js +190 -121
- package/dist/crystalClasses.js.map +1 -1
- package/dist/freeze.d.ts +7 -0
- package/dist/freeze.d.ts.map +1 -0
- package/dist/freeze.js +15 -0
- package/dist/freeze.js.map +1 -0
- package/dist/index.d.ts +13 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/indices.d.ts +30 -20
- package/dist/indices.d.ts.map +1 -1
- package/dist/indices.js +101 -31
- package/dist/indices.js.map +1 -1
- package/dist/lattice.d.ts +15 -1
- package/dist/lattice.d.ts.map +1 -1
- package/dist/lattice.js +30 -1
- package/dist/lattice.js.map +1 -1
- package/dist/linalg.d.ts +2 -2
- package/dist/linalg.d.ts.map +1 -1
- package/dist/linalg.js +3 -3
- package/dist/linalg.js.map +1 -1
- package/dist/magnetic.d.ts +14 -10
- package/dist/magnetic.d.ts.map +1 -1
- package/dist/magnetic.js +10 -6
- package/dist/magnetic.js.map +1 -1
- package/dist/notation.d.ts +16 -0
- package/dist/notation.d.ts.map +1 -0
- package/dist/notation.js +66 -0
- package/dist/notation.js.map +1 -0
- package/dist/operations.d.ts +40 -26
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +48 -60
- package/dist/operations.js.map +1 -1
- package/dist/plane.d.ts +297 -80
- package/dist/plane.d.ts.map +1 -1
- package/dist/plane.js +289 -94
- package/dist/plane.js.map +1 -1
- package/dist/pointGroups/crystalForms.d.ts +6 -21
- package/dist/pointGroups/crystalForms.d.ts.map +1 -1
- package/dist/pointGroups/crystalForms.js +9 -16
- package/dist/pointGroups/crystalForms.js.map +1 -1
- package/dist/pointGroups/crystalFormsData.d.ts +4 -1
- package/dist/pointGroups/crystalFormsData.d.ts.map +1 -1
- package/dist/pointGroups/crystalFormsData.js +64 -1
- package/dist/pointGroups/crystalFormsData.js.map +1 -1
- package/dist/pointGroups/elements.d.ts +19 -17
- package/dist/pointGroups/elements.d.ts.map +1 -1
- package/dist/pointGroups/elements.js +65 -83
- package/dist/pointGroups/elements.js.map +1 -1
- package/dist/pointGroups/identify.d.ts +10 -18
- package/dist/pointGroups/identify.d.ts.map +1 -1
- package/dist/pointGroups/identify.js +27 -79
- package/dist/pointGroups/identify.js.map +1 -1
- package/dist/pointGroups/itaOrder.d.ts +15 -14
- package/dist/pointGroups/itaOrder.d.ts.map +1 -1
- package/dist/pointGroups/itaOrder.js +116 -94
- package/dist/pointGroups/itaOrder.js.map +1 -1
- package/dist/pointGroups/itcData.d.ts +96 -0
- package/dist/pointGroups/itcData.d.ts.map +1 -0
- package/dist/pointGroups/itcData.js +336 -0
- package/dist/pointGroups/itcData.js.map +1 -0
- package/dist/pointGroups/itcMagneticData.d.ts +55 -0
- package/dist/pointGroups/itcMagneticData.d.ts.map +1 -0
- package/dist/pointGroups/itcMagneticData.js +172 -0
- package/dist/pointGroups/itcMagneticData.js.map +1 -0
- package/dist/pointGroups/keys.d.ts +32 -0
- package/dist/pointGroups/keys.d.ts.map +1 -0
- package/dist/pointGroups/keys.js +120 -0
- package/dist/pointGroups/keys.js.map +1 -0
- package/dist/pointGroups/magneticSymbols.d.ts +6 -5
- package/dist/pointGroups/magneticSymbols.d.ts.map +1 -1
- package/dist/pointGroups/magneticSymbols.js +15 -12
- package/dist/pointGroups/magneticSymbols.js.map +1 -1
- package/dist/pointGroups/orbits.d.ts +23 -42
- package/dist/pointGroups/orbits.d.ts.map +1 -1
- package/dist/pointGroups/orbits.js +20 -62
- package/dist/pointGroups/orbits.js.map +1 -1
- package/dist/pointGroups/pointGroups.d.ts +145 -68
- package/dist/pointGroups/pointGroups.d.ts.map +1 -1
- package/dist/pointGroups/pointGroups.js +455 -243
- package/dist/pointGroups/pointGroups.js.map +1 -1
- package/dist/pointGroups/properties.d.ts +21 -22
- package/dist/pointGroups/properties.d.ts.map +1 -1
- package/dist/pointGroups/properties.js +40 -37
- package/dist/pointGroups/properties.js.map +1 -1
- package/dist/pointGroups/seitzData.d.ts +26 -0
- package/dist/pointGroups/seitzData.d.ts.map +1 -0
- package/dist/pointGroups/seitzData.js +130 -0
- package/dist/pointGroups/seitzData.js.map +1 -0
- package/dist/pointGroups/shubnikovData.d.ts +11 -0
- package/dist/pointGroups/shubnikovData.d.ts.map +1 -0
- package/dist/pointGroups/shubnikovData.js +101 -0
- package/dist/pointGroups/shubnikovData.js.map +1 -0
- package/dist/pointGroups/wyckoff.d.ts +70 -40
- package/dist/pointGroups/wyckoff.d.ts.map +1 -1
- package/dist/pointGroups/wyckoff.js +98 -91
- package/dist/pointGroups/wyckoff.js.map +1 -1
- package/dist/pointGroups/wyckoffData.d.ts +7 -4
- package/dist/pointGroups/wyckoffData.d.ts.map +1 -1
- package/dist/pointGroups/wyckoffData.js +789 -168
- package/dist/pointGroups/wyckoffData.js.map +1 -1
- package/dist/siteSymmetry.d.ts +8 -16
- package/dist/siteSymmetry.d.ts.map +1 -1
- package/dist/siteSymmetry.js +34 -24
- package/dist/siteSymmetry.js.map +1 -1
- package/dist/spaceGroups/affine.d.ts.map +1 -1
- package/dist/spaceGroups/affine.js +3 -2
- package/dist/spaceGroups/affine.js.map +1 -1
- package/dist/spaceGroups/cell.d.ts +43 -31
- package/dist/spaceGroups/cell.d.ts.map +1 -1
- package/dist/spaceGroups/cell.js +173 -85
- package/dist/spaceGroups/cell.js.map +1 -1
- package/dist/spaceGroups/describe.d.ts +13 -10
- package/dist/spaceGroups/describe.d.ts.map +1 -1
- package/dist/spaceGroups/describe.js +11 -10
- package/dist/spaceGroups/describe.js.map +1 -1
- package/dist/spaceGroups/planeGroupData.d.ts +3 -1
- package/dist/spaceGroups/planeGroupData.d.ts.map +1 -1
- package/dist/spaceGroups/planeGroupData.js +25 -8
- package/dist/spaceGroups/planeGroupData.js.map +1 -1
- package/dist/spaceGroups/planeGroups.d.ts.map +1 -1
- package/dist/spaceGroups/planeGroups.js +2 -1
- package/dist/spaceGroups/planeGroups.js.map +1 -1
- package/dist/spaceGroups/planeLattice.d.ts +78 -0
- package/dist/spaceGroups/planeLattice.d.ts.map +1 -0
- package/dist/spaceGroups/planeLattice.js +143 -0
- package/dist/spaceGroups/planeLattice.js.map +1 -0
- package/dist/spaceGroups/planePointGroups.d.ts +6 -2
- package/dist/spaceGroups/planePointGroups.d.ts.map +1 -1
- package/dist/spaceGroups/planePointGroups.js +14 -2
- package/dist/spaceGroups/planePointGroups.js.map +1 -1
- package/dist/spaceGroups/positions.d.ts +48 -19
- package/dist/spaceGroups/positions.d.ts.map +1 -1
- package/dist/spaceGroups/positions.js +166 -67
- package/dist/spaceGroups/positions.js.map +1 -1
- package/dist/spaceGroups/rational.d.ts +18 -0
- package/dist/spaceGroups/rational.d.ts.map +1 -1
- package/dist/spaceGroups/rational.js +58 -0
- package/dist/spaceGroups/rational.js.map +1 -1
- package/dist/tensors/propertyTable.d.ts +3 -1
- package/dist/tensors/propertyTable.d.ts.map +1 -1
- package/dist/tensors/propertyTable.js +17 -10
- package/dist/tensors/propertyTable.js.map +1 -1
- package/dist/tensors/rowEchelon.d.ts +3 -3
- package/dist/tensors/rowEchelon.d.ts.map +1 -1
- package/dist/tensors/rowEchelon.js +4 -4
- package/dist/tensors/rowEchelon.js.map +1 -1
- package/dist/tensors/tensorForm.d.ts +75 -34
- package/dist/tensors/tensorForm.d.ts.map +1 -1
- package/dist/tensors/tensorForm.js +171 -67
- package/dist/tensors/tensorForm.js.map +1 -1
- package/dist/tensors/tensorProperties.d.ts +10 -9
- package/dist/tensors/tensorProperties.d.ts.map +1 -1
- package/dist/tensors/tensorProperties.js +22 -12
- package/dist/tensors/tensorProperties.js.map +1 -1
- package/dist/tensors/voigt.d.ts +56 -0
- package/dist/tensors/voigt.d.ts.map +1 -0
- package/dist/tensors/voigt.js +188 -0
- package/dist/tensors/voigt.js.map +1 -0
- package/dist/tolerances.d.ts +56 -1
- package/dist/tolerances.d.ts.map +1 -1
- package/dist/tolerances.js +51 -1
- package/dist/tolerances.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/cell.ts +78 -51
- package/src/checks.ts +84 -0
- package/src/closure.ts +214 -0
- package/src/coordinates.ts +370 -0
- package/src/crystalClasses.ts +271 -157
- package/src/freeze.ts +14 -0
- package/src/index.ts +33 -12
- package/src/indices.ts +102 -42
- package/src/lattice.ts +41 -1
- package/src/linalg.ts +3 -3
- package/src/magnetic.ts +24 -11
- package/src/notation.ts +73 -0
- package/src/operations.ts +78 -71
- package/src/plane.ts +531 -151
- package/src/pointGroups/crystalForms.ts +11 -44
- package/src/pointGroups/crystalFormsData.ts +66 -1
- package/src/pointGroups/elements.ts +82 -92
- package/src/pointGroups/identify.ts +38 -97
- package/src/pointGroups/itaOrder.ts +117 -101
- package/src/pointGroups/itcData.ts +404 -0
- package/src/pointGroups/itcMagneticData.ts +206 -0
- package/src/pointGroups/keys.ts +144 -0
- package/src/pointGroups/magneticSymbols.ts +18 -17
- package/src/pointGroups/orbits.ts +41 -89
- package/src/pointGroups/pointGroups.ts +593 -298
- package/src/pointGroups/properties.ts +44 -40
- package/src/pointGroups/seitzData.ts +147 -0
- package/src/pointGroups/shubnikovData.ts +103 -0
- package/src/pointGroups/wyckoff.ts +137 -112
- package/src/pointGroups/wyckoffData.ts +793 -170
- package/src/siteSymmetry.ts +43 -40
- package/src/spaceGroups/affine.ts +3 -2
- package/src/spaceGroups/cell.ts +227 -116
- package/src/spaceGroups/describe.ts +23 -19
- package/src/spaceGroups/planeGroupData.ts +28 -9
- package/src/spaceGroups/planeGroups.ts +2 -1
- package/src/spaceGroups/planeLattice.ts +208 -0
- package/src/spaceGroups/planePointGroups.ts +23 -3
- package/src/spaceGroups/positions.ts +202 -78
- package/src/spaceGroups/rational.ts +59 -0
- package/src/tensors/propertyTable.ts +26 -14
- package/src/tensors/rowEchelon.ts +4 -3
- package/src/tensors/tensorForm.ts +258 -88
- package/src/tensors/tensorProperties.ts +34 -14
- package/src/tensors/voigt.ts +268 -0
- package/src/tolerances.ts +66 -1
- package/src/version.ts +1 -1
- package/dist/pointGroups/data.d.ts +0 -75
- package/dist/pointGroups/data.d.ts.map +0 -1
- package/dist/pointGroups/data.js +0 -212
- package/dist/pointGroups/data.js.map +0 -1
- package/dist/pointGroups/magneticData.d.ts +0 -66
- package/dist/pointGroups/magneticData.d.ts.map +0 -1
- package/dist/pointGroups/magneticData.js +0 -184
- package/dist/pointGroups/magneticData.js.map +0 -1
- package/dist/spaceGroups/snap.d.ts +0 -20
- package/dist/spaceGroups/snap.d.ts.map +0 -1
- package/dist/spaceGroups/snap.js +0 -103
- package/dist/spaceGroups/snap.js.map +0 -1
- package/src/pointGroups/data.ts +0 -305
- package/src/pointGroups/magneticData.ts +0 -328
- package/src/spaceGroups/snap.ts +0 -121
|
@@ -4,32 +4,20 @@
|
|
|
4
4
|
* the full Hermann–Mauguin symbol. Structured data only; symbols such as `3⁺ x,x,x` or `2_z` are
|
|
5
5
|
* left to the applications (docs/conventions.md, "Symmetry directions and elements").
|
|
6
6
|
*/
|
|
7
|
+
import { SETTING_KEYS, checkOptions } from '../checks.js';
|
|
7
8
|
import { det, trace } from '../linalg.js';
|
|
8
|
-
import { crystalFamily
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { crystalFamily } from '../lattice.js';
|
|
10
|
+
import { itcBasis, itcSetting, itcSymmetryDirections } from './itcData.js';
|
|
11
|
+
import { seitzOf } from './seitzData.js';
|
|
12
|
+
import { classSettingOf, operations, pointGroup, settingIndexOf, symbol, } from './pointGroups.js';
|
|
11
13
|
const AXIS_TOLERANCE = 1e-6;
|
|
12
14
|
function normalize(v) {
|
|
13
15
|
const n = Math.hypot(v[0], v[1], v[2]);
|
|
14
16
|
return [v[0] / n, v[1] / n, v[2] / n];
|
|
15
17
|
}
|
|
16
18
|
const dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
17
|
-
/**
|
|
18
|
-
|
|
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);
|
|
19
|
+
/** [uvw] in the basis `b` (columns a, b, c) as a Cartesian unit vector, with the direction itself. */
|
|
20
|
+
function axisOf(b, uvw) {
|
|
33
21
|
const v = [
|
|
34
22
|
b[0][0] * uvw[0] + b[0][1] * uvw[1] + b[0][2] * uvw[2],
|
|
35
23
|
b[1][0] * uvw[0] + b[1][1] * uvw[1] + b[1][2] * uvw[2],
|
|
@@ -37,15 +25,6 @@ function axisOf(family, uvw) {
|
|
|
37
25
|
];
|
|
38
26
|
return Object.freeze({ lattice: uvw, cartesian: Object.freeze(normalize(v)) });
|
|
39
27
|
}
|
|
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
28
|
/** The proper rotation part of a matrix and its order n (1 for the identity). */
|
|
50
29
|
function rotationPart(m) {
|
|
51
30
|
const r = det(m) > 0 ? m : m.map((row) => row.map((v) => -v));
|
|
@@ -86,33 +65,61 @@ function findAxis(axes, u, what) {
|
|
|
86
65
|
throw new Error(`${what}: axis [${u.map((v) => v.toFixed(4)).join(', ')}] is not a symmetry direction`);
|
|
87
66
|
return a;
|
|
88
67
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
68
|
+
const parallel = (a, b) => Math.abs(Math.abs(dot(a, b)) - 1) < AXIS_TOLERANCE;
|
|
69
|
+
/**
|
|
70
|
+
* An operation described geometrically. Its axis lies along a symmetry direction of the setting and
|
|
71
|
+
* carries the sign of the operation's Seitz symbol (ITA 2016 Tables 1.4.2.1–1.4.2.3; "Pure ITC",
|
|
72
|
+
* #114), which for n ≥ 3 fixes what the sense refers to; the sense, computed from the matrix, is
|
|
73
|
+
* checked against the printed one.
|
|
74
|
+
*/
|
|
75
|
+
function describe(op, axes, basis, table, what) {
|
|
76
|
+
const proper = det(op.cartesian) > 0;
|
|
77
|
+
const { r, n } = rotationPart(op.cartesian);
|
|
92
78
|
const timeReversal = op.timeReversal;
|
|
93
79
|
if (n === 1)
|
|
94
|
-
return Object.freeze({ kind: proper ? 'identity' : 'inversion',
|
|
95
|
-
const
|
|
96
|
-
const
|
|
80
|
+
return Object.freeze({ kind: proper ? 'identity' : 'inversion', n: 1, timeReversal });
|
|
81
|
+
const direction = findAxis(axes, rotationAxis(r, n), what);
|
|
82
|
+
const seitz = seitzOf(table, op.matrix);
|
|
83
|
+
if (!seitz?.axis)
|
|
84
|
+
throw new Error(`${what}: no Seitz symbol for the matrix ${JSON.stringify(op.matrix)}`);
|
|
85
|
+
// A frozen copy: the result must not share the table's array (every result frozen, #137 C4).
|
|
86
|
+
const signed = axisOf(basis, Object.freeze([...seitz.axis]));
|
|
87
|
+
if (!parallel(signed.cartesian, direction.cartesian)) {
|
|
88
|
+
throw new Error(`${what}: the Seitz direction [${seitz.axis.join(',')}] is not along the axis of the operation`);
|
|
89
|
+
}
|
|
90
|
+
// The object of the symmetry direction where the signs agree, so that the two match by identity there.
|
|
91
|
+
const axis = dot(signed.cartesian, direction.cartesian) > 0 ? direction : signed;
|
|
92
|
+
const kind = proper ? 'rotation' : n === 2 ? 'reflection' : 'rotoinversion';
|
|
97
93
|
if (n === 2)
|
|
98
|
-
return Object.freeze({ kind,
|
|
94
|
+
return Object.freeze({ kind, n: 2, axis, timeReversal });
|
|
99
95
|
const sense = dot(axialVector(r), axis.cartesian) > 0 ? '+' : '-';
|
|
100
|
-
|
|
96
|
+
if (sense !== seitz.sense)
|
|
97
|
+
throw new Error(`${what}: the sense ${sense} differs from the Seitz symbol's`);
|
|
98
|
+
return Object.freeze({ kind, n, axis, sense, timeReversal });
|
|
101
99
|
}
|
|
102
100
|
const cache = new Map();
|
|
103
101
|
function analysis(key, options) {
|
|
104
|
-
const ops = operations(key, options); // checks key
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
const cacheKey = `${key}#${setting}#${c}`;
|
|
102
|
+
const ops = operations(key, options); // checks key and setting
|
|
103
|
+
const setting = settingIndexOf(key, options);
|
|
104
|
+
const cacheKey = `${key}#${setting}`;
|
|
108
105
|
const hit = cache.get(cacheKey);
|
|
109
106
|
if (hit)
|
|
110
107
|
return hit;
|
|
111
108
|
const family = crystalFamily(pointGroup(key).crystalSystem);
|
|
112
|
-
|
|
109
|
+
// The basis and the symmetry directions of the setting: for rhombohedral axes those of ITA Table
|
|
110
|
+
// 2.1.3.1 for rhombohedral axes; monoclinic and triclinic a, b, c along x, y, z, exact for the
|
|
111
|
+
// unique axis, the only symmetry direction that carries an element (itcData.ts, `itcBasis`).
|
|
112
|
+
const c = classSettingOf(key, options);
|
|
113
|
+
const basis = itcBasis(c.key, c.index);
|
|
114
|
+
const positions = itcSymmetryDirections(c.key, c.index).map((dirs) => dirs.map((d) => axisOf(basis, d)));
|
|
113
115
|
const all = positions.flat();
|
|
114
116
|
const what = `Point group ${key}`;
|
|
115
|
-
const
|
|
117
|
+
const table = family !== 'hexagonal'
|
|
118
|
+
? 'cubic'
|
|
119
|
+
: itcSetting(c.key, c.index).axes === 'rhombohedral'
|
|
120
|
+
? 'rhombohedral'
|
|
121
|
+
: 'hexagonal';
|
|
122
|
+
const descriptions = Object.freeze(ops.map((op) => describe(op, all, basis, table, what)));
|
|
116
123
|
// The full symbol of a grey group ends in 1', which is no position of the symbol.
|
|
117
124
|
const tokens = family === 'triclinic'
|
|
118
125
|
? []
|
|
@@ -121,13 +128,13 @@ function analysis(key, options) {
|
|
|
121
128
|
.filter((t) => t !== "1'");
|
|
122
129
|
const directions = Object.freeze(positions.map((axes, i) => {
|
|
123
130
|
const elements = axes.map((a) => {
|
|
124
|
-
const on = descriptions.filter((d) => d.axis
|
|
125
|
-
const max = (kind, none) => on.filter((d) => d.kind === kind).reduce((m, d) => Math.max(m, d.
|
|
131
|
+
const on = descriptions.filter((d) => d.axis !== undefined && parallel(d.axis.cartesian, a.cartesian));
|
|
132
|
+
const max = (kind, none) => on.filter((d) => d.kind === kind).reduce((m, d) => Math.max(m, d.n), none);
|
|
126
133
|
return Object.freeze({
|
|
127
134
|
...a,
|
|
128
135
|
rotation: max('rotation', 1),
|
|
129
136
|
rotoinversion: max('rotoinversion', 0),
|
|
130
|
-
mirror: on.some((d) => d.kind === '
|
|
137
|
+
mirror: on.some((d) => d.kind === 'reflection'),
|
|
131
138
|
});
|
|
132
139
|
});
|
|
133
140
|
const position = tokens[i] === undefined
|
|
@@ -135,56 +142,31 @@ function analysis(key, options) {
|
|
|
135
142
|
: { position: i + 1, symbol: tokens[i], directions: Object.freeze(elements) };
|
|
136
143
|
return Object.freeze(position);
|
|
137
144
|
}));
|
|
138
|
-
const result = {
|
|
139
|
-
descriptions: c === 'birss' ? Object.freeze(descriptions.map(birssSigned)) : descriptions,
|
|
140
|
-
directions,
|
|
141
|
-
};
|
|
145
|
+
const result = { descriptions, directions };
|
|
142
146
|
cache.set(cacheKey, result);
|
|
143
147
|
return result;
|
|
144
148
|
}
|
|
145
|
-
const flipped = new Map();
|
|
146
|
-
/**
|
|
147
|
-
* The description with the axis signed as in birss-app (docs/conventions.md, "Birss convention and
|
|
148
|
-
* birss-app"): its first non-zero Cartesian component, in the order x, y, z, is positive. If the
|
|
149
|
-
* axis of ITA Table 2.1.3.1 points the other way, axis and sense are reversed; the rotation stays
|
|
150
|
-
* the same.
|
|
151
|
-
*/
|
|
152
|
-
function birssSigned(d) {
|
|
153
|
-
const a = d.axis;
|
|
154
|
-
if (!a)
|
|
155
|
-
return d;
|
|
156
|
-
const first = a.cartesian.find((x) => Math.abs(x) > 1e-9) ?? 0;
|
|
157
|
-
if (first > 0)
|
|
158
|
-
return d;
|
|
159
|
-
let axis = flipped.get(a);
|
|
160
|
-
if (!axis) {
|
|
161
|
-
axis = Object.freeze({
|
|
162
|
-
lattice: Object.freeze(a.lattice.map((x) => (x === 0 ? 0 : -x))),
|
|
163
|
-
cartesian: Object.freeze(a.cartesian.map((x) => (x === 0 ? 0 : -x))),
|
|
164
|
-
});
|
|
165
|
-
flipped.set(a, axis);
|
|
166
|
-
}
|
|
167
|
-
const sense = d.sense === '+' ? '-' : d.sense === '-' ? '+' : undefined;
|
|
168
|
-
return Object.freeze({ ...d, axis, ...(sense ? { sense } : {}) });
|
|
169
|
-
}
|
|
170
149
|
/**
|
|
171
150
|
* Each operation of the point group described geometrically, in the order of `operations` for
|
|
172
|
-
* the same key and options.
|
|
173
|
-
*
|
|
174
|
-
*
|
|
151
|
+
* the same key and options. An axis lies along a symmetry direction and has the sign of the
|
|
152
|
+
* operation's Seitz symbol (ITA 6th ed., Tables 1.4.2.1–1.4.2.3, p. 52), e.g. [1, 1, 0] for 2₁₁₀ in
|
|
153
|
+
* the hexagonal family, where ITA Table 2.1.3.1 lists [1̄, 1̄, 0]; for n ≥ 3 the sign fixes what the
|
|
154
|
+
* sense refers to.
|
|
175
155
|
*/
|
|
176
156
|
export function describeOperations(key, options) {
|
|
157
|
+
checkOptions(options, SETTING_KEYS, 'describeOperations');
|
|
177
158
|
return analysis(key, options).descriptions;
|
|
178
159
|
}
|
|
179
160
|
/**
|
|
180
|
-
* The positions of the full Hermann–Mauguin symbol in the requested
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* without `symbol`); the triclinic family has none.
|
|
184
|
-
*
|
|
185
|
-
*
|
|
161
|
+
* The positions of the full Hermann–Mauguin symbol in the requested setting, each with its
|
|
162
|
+
* symmetry directions (ITA Table 2.1.3.1) and the symmetry elements along them. All positions of the
|
|
163
|
+
* crystal family are listed (for rhombohedral axes the two of that row of the table), also those the
|
|
164
|
+
* symbol of the class leaves out (then without `symbol`); the triclinic family has none. A direction
|
|
165
|
+
* has the sign of ITA Table 2.1.3.1, the axis of an operation along it that of its Seitz symbol, so
|
|
166
|
+
* the two are parallel and may be opposite: match them by direction, up to sign.
|
|
186
167
|
*/
|
|
187
168
|
export function symmetryDirections(key, options) {
|
|
169
|
+
checkOptions(options, SETTING_KEYS, 'symmetryDirections');
|
|
188
170
|
return analysis(key, options).directions;
|
|
189
171
|
}
|
|
190
172
|
//# sourceMappingURL=elements.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/pointGroups/elements.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,KAAK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CAAC,GAA0B,EAAE,OAAwB;IACrF,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IAC1D,OAAO,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC;AAC3C,CAAC"}
|
|
@@ -4,18 +4,10 @@
|
|
|
4
4
|
* group of a list of operations"). Shared by both entry points.
|
|
5
5
|
*/
|
|
6
6
|
import { type Vec3 } from '../linalg.js';
|
|
7
|
-
import { type
|
|
7
|
+
import { type CartesianOperation } from '../operations.js';
|
|
8
|
+
import { type ToleranceOptions } from '../tolerances.js';
|
|
8
9
|
import { type OperationKind } from './elements.js';
|
|
9
10
|
import { type MagneticPointGroupKey } from './pointGroups.js';
|
|
10
|
-
/** Options of `pointGroupOf` and `describeOperationsOf`. */
|
|
11
|
-
export interface PointGroupOfOptions {
|
|
12
|
-
/**
|
|
13
|
-
* Two matrices are the same operation if no entry differs by this much or more, and a matrix
|
|
14
|
-
* counts as orthogonal and crystallographic within it. Default `EPSILON` (10⁻⁶); a caller whose
|
|
15
|
-
* matrices carry rounding errors passes a larger value, below 0.1.
|
|
16
|
-
*/
|
|
17
|
-
readonly tolerance?: number;
|
|
18
|
-
}
|
|
19
11
|
/** The point group of a list of operations: its key, and the setting if the operations are exactly those of one. */
|
|
20
12
|
export interface IdentifiedPointGroup {
|
|
21
13
|
/** The key of the point group the operations generate. */
|
|
@@ -36,11 +28,11 @@ export interface CartesianOperationDescription {
|
|
|
36
28
|
/** What the operation is, without time reversal. */
|
|
37
29
|
readonly kind: OperationKind;
|
|
38
30
|
/**
|
|
39
|
-
* The n of the symbol n or n
|
|
40
|
-
* otherwise the order of the rotation part.
|
|
31
|
+
* The n of the symbol n or n̄ (ITA 2016 § 1.2.1, p. 12: an n-fold rotation): 1 for the identity and the
|
|
32
|
+
* inversion, 2 for a reflection (m = 2̄), otherwise the order of the rotation part.
|
|
41
33
|
*/
|
|
42
|
-
readonly
|
|
43
|
-
/** Rotation axis, rotoinversion axis or mirror
|
|
34
|
+
readonly n: number;
|
|
35
|
+
/** Rotation axis, rotoinversion axis or the normal of the mirror plane; absent for the identity and the inversion. */
|
|
44
36
|
readonly axis?: CartesianAxis;
|
|
45
37
|
/**
|
|
46
38
|
* For n ≥ 3: `'+'` if the rotation part turns by +360°/n about `axis` (counter-clockwise seen
|
|
@@ -57,21 +49,21 @@ export interface CartesianOperationDescription {
|
|
|
57
49
|
* first, two matrices being equal when no entry differs by `tolerance` (default `EPSILON`) or more.
|
|
58
50
|
* Time reversal counts: a list with time reversal gives a magnetic point group. Returns undefined
|
|
59
51
|
* if the operations generate no point group (an operation of order 5, a group larger than 96).
|
|
60
|
-
* Throws a RangeError for
|
|
52
|
+
* Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`; within `tolerance`, at least
|
|
61
53
|
* `EPSILON`) and for an operation that does not say whether it is combined with time reversal.
|
|
62
54
|
* The classes `1` and `-1` have one setting and no orientation, so they always have
|
|
63
55
|
* setting 1.
|
|
64
56
|
*/
|
|
65
|
-
export declare function pointGroupOf(operations: readonly
|
|
57
|
+
export declare function pointGroupOf(operations: readonly CartesianOperation[], options?: ToleranceOptions): IdentifiedPointGroup | undefined;
|
|
66
58
|
/**
|
|
67
59
|
* Each operation of a list described geometrically, in the order of the list: kind, n, the
|
|
68
60
|
* Cartesian axis (rotation or rotoinversion axis, mirror normal) with its first non-zero component,
|
|
69
61
|
* in the order x, y, z, positive, and for n ≥ 3 the sense about that axis. The axes are not named
|
|
70
62
|
* by lattice directions, since the list need not belong to a setting; for a point group given by its
|
|
71
|
-
* key, `describeOperations` names them. Throws a RangeError for
|
|
63
|
+
* key, `describeOperations` names them. Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`) or
|
|
72
64
|
* not a crystallographic operation (a rotation part by an angle other than 360°/n, n = 1, 2, 3, 4,
|
|
73
65
|
* 6), both within `tolerance` (default `EPSILON`, as for `pointGroupOf`), and for an operation that
|
|
74
66
|
* does not say whether it is combined with time reversal.
|
|
75
67
|
*/
|
|
76
|
-
export declare function describeOperationsOf(operations: readonly
|
|
68
|
+
export declare function describeOperationsOf(operations: readonly CartesianOperation[], options?: ToleranceOptions): readonly CartesianOperationDescription[];
|
|
77
69
|
//# sourceMappingURL=identify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identify.d.ts","sourceRoot":"","sources":["../../src/pointGroups/identify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"identify.d.ts","sourceRoot":"","sources":["../../src/pointGroups/identify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,EAA+C,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAC;AAE1B,oHAAoH;AACpH,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,QAAQ,CAAC,GAAG,EAAE,qBAAqB,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,0FAA0F;AAC1F,MAAM,WAAW,aAAa;IAC5B,oFAAoF;IACpF,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B;AAED,kFAAkF;AAClF,MAAM,WAAW,6BAA6B;IAC5C,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,sHAAsH;IACtH,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IAC3B,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AA4CD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,SAAS,kBAAkB,EAAE,EACzC,OAAO,CAAC,EAAE,gBAAgB,GACzB,oBAAoB,GAAG,SAAS,CAgBlC;AAiCD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,SAAS,kBAAkB,EAAE,EACzC,OAAO,CAAC,EAAE,gBAAgB,GACzB,SAAS,6BAA6B,EAAE,CAM1C"}
|
|
@@ -3,77 +3,23 @@
|
|
|
3
3
|
* list (for instance the operations left after distorting a crystal; docs/conventions.md, "Point
|
|
4
4
|
* group of a list of operations"). Shared by both entry points.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { TOLERANCE_KEYS, checkOptions } from '../checks.js';
|
|
7
|
+
import { det, trace } from '../linalg.js';
|
|
8
|
+
import { closeWithin, sameWithin } from '../closure.js';
|
|
9
|
+
import { checkCartesianOperations, checkTimeReversal } from '../operations.js';
|
|
10
|
+
import { EPSILON, toleranceOf } from '../tolerances.js';
|
|
9
11
|
import { axialVector, rotationAxis } from './elements.js';
|
|
10
12
|
import { MAGNETIC_POINT_GROUP_KEYS, operations as groupOperations, settings, } from './pointGroups.js';
|
|
11
13
|
/** No point group has more than 96 operations (m-3m1'). */
|
|
12
14
|
const MAX_ORDER = 96;
|
|
13
|
-
function toleranceOf(options) {
|
|
14
|
-
const t = options?.tolerance ?? EPSILON;
|
|
15
|
-
if (!(typeof t === 'number' && t > 0 && t < 0.1))
|
|
16
|
-
throw new RangeError(`Invalid tolerance: ${String(t)}`);
|
|
17
|
-
return t;
|
|
18
|
-
}
|
|
19
15
|
/**
|
|
20
16
|
* How far the trace of a matrix with entries within `tolerance` may lie from an integer: three
|
|
21
17
|
* diagonal entries, so three times the tolerance (at least that of `EPSILON`).
|
|
22
18
|
*/
|
|
23
19
|
const traceTolerance = (tolerance) => 3 * Math.max(tolerance, EPSILON);
|
|
24
|
-
const same =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const kindOf = (op) => `${Math.round(trace(op.matrix))}${det(op.matrix) > 0 ? '+' : '-'}${op.timeReversal ? "'" : ''}`;
|
|
28
|
-
/**
|
|
29
|
-
* The group the operations generate, or undefined if it is larger than any point group. The
|
|
30
|
-
* operations of the list that are not yet in the group are taken as generators, and the group is
|
|
31
|
-
* grown by multiplying each element by each generator until nothing new appears; a new operation
|
|
32
|
-
* is compared only with the operations of its kind.
|
|
33
|
-
*/
|
|
34
|
-
function close(ops, tolerance) {
|
|
35
|
-
const identity = {
|
|
36
|
-
matrix: [
|
|
37
|
-
[1, 0, 0],
|
|
38
|
-
[0, 1, 0],
|
|
39
|
-
[0, 0, 1],
|
|
40
|
-
],
|
|
41
|
-
timeReversal: false,
|
|
42
|
-
};
|
|
43
|
-
const group = [];
|
|
44
|
-
const byKind = new Map();
|
|
45
|
-
const has = (op) => (byKind.get(kindOf(op)) ?? []).some((g) => same(g, op, tolerance));
|
|
46
|
-
const push = (op) => {
|
|
47
|
-
group.push(op);
|
|
48
|
-
const k = kindOf(op);
|
|
49
|
-
const list = byKind.get(k);
|
|
50
|
-
if (list)
|
|
51
|
-
list.push(op);
|
|
52
|
-
else
|
|
53
|
-
byKind.set(k, [op]);
|
|
54
|
-
};
|
|
55
|
-
push(identity);
|
|
56
|
-
const generators = [];
|
|
57
|
-
for (const s of ops) {
|
|
58
|
-
if (has(s))
|
|
59
|
-
continue;
|
|
60
|
-
generators.push(s);
|
|
61
|
-
for (let i = 0; i < group.length; i++) {
|
|
62
|
-
for (const t of generators) {
|
|
63
|
-
const product = {
|
|
64
|
-
matrix: multiply(group[i].matrix, t.matrix),
|
|
65
|
-
timeReversal: group[i].timeReversal !== t.timeReversal,
|
|
66
|
-
};
|
|
67
|
-
if (has(product))
|
|
68
|
-
continue;
|
|
69
|
-
if (group.length >= MAX_ORDER)
|
|
70
|
-
return undefined;
|
|
71
|
-
push(product);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return group;
|
|
76
|
-
}
|
|
20
|
+
const same = sameWithin;
|
|
21
|
+
/** The group the operations generate within the tolerance, or undefined if it is larger than any point group. */
|
|
22
|
+
const close = (ops, tolerance) => closeWithin(ops, tolerance, MAX_ORDER);
|
|
77
23
|
/**
|
|
78
24
|
* How many operations of each kind a group has: determinant, trace and time reversal of each. For
|
|
79
25
|
* the 122 point groups these counts are all different (a test checks it), and since the 122 are
|
|
@@ -82,11 +28,11 @@ function close(ops, tolerance) {
|
|
|
82
28
|
*/
|
|
83
29
|
const signature = (ops, tolerance = EPSILON) => ops
|
|
84
30
|
.map((op) => {
|
|
85
|
-
const t = trace(op.
|
|
31
|
+
const t = trace(op.cartesian);
|
|
86
32
|
const rounded = Math.round(t);
|
|
87
33
|
if (Math.abs(t - rounded) > traceTolerance(tolerance))
|
|
88
34
|
return 'x'; // not a crystallographic operation
|
|
89
|
-
return `${Math.round(det(op.
|
|
35
|
+
return `${Math.round(det(op.cartesian))}:${rounded}${op.timeReversal ? "'" : ''}`;
|
|
90
36
|
})
|
|
91
37
|
.sort()
|
|
92
38
|
.join(' ');
|
|
@@ -106,15 +52,16 @@ function keyOfSignature(s) {
|
|
|
106
52
|
* first, two matrices being equal when no entry differs by `tolerance` (default `EPSILON`) or more.
|
|
107
53
|
* Time reversal counts: a list with time reversal gives a magnetic point group. Returns undefined
|
|
108
54
|
* if the operations generate no point group (an operation of order 5, a group larger than 96).
|
|
109
|
-
* Throws a RangeError for
|
|
55
|
+
* Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`; within `tolerance`, at least
|
|
110
56
|
* `EPSILON`) and for an operation that does not say whether it is combined with time reversal.
|
|
111
57
|
* The classes `1` and `-1` have one setting and no orientation, so they always have
|
|
112
58
|
* setting 1.
|
|
113
59
|
*/
|
|
114
60
|
export function pointGroupOf(operations, options) {
|
|
115
|
-
|
|
61
|
+
checkOptions(options, TOLERANCE_KEYS, 'pointGroupOf');
|
|
62
|
+
const tolerance = toleranceOf(options, 'operations');
|
|
63
|
+
checkCartesianOperations(operations, tolerance);
|
|
116
64
|
checkTimeReversal(operations);
|
|
117
|
-
operations.forEach((op, i) => checkOrthogonalWithin(op.matrix, `Operation ${i}`, tolerance));
|
|
118
65
|
const group = close(operations, tolerance);
|
|
119
66
|
if (!group)
|
|
120
67
|
return undefined;
|
|
@@ -123,8 +70,8 @@ export function pointGroupOf(operations, options) {
|
|
|
123
70
|
return undefined;
|
|
124
71
|
// The operations passed in generate the group; if each is an operation of a setting of the same
|
|
125
72
|
// order, the group is that setting. Products are not compared, since their errors add up.
|
|
126
|
-
const setting = settings(key
|
|
127
|
-
const ops = groupOperations(key, {
|
|
73
|
+
const setting = settings(key).find((s) => {
|
|
74
|
+
const ops = groupOperations(key, { setting: s.index });
|
|
128
75
|
return ops.length === group.length && operations.every((g) => ops.some((op) => same(g, op, tolerance)));
|
|
129
76
|
});
|
|
130
77
|
return Object.freeze(setting ? { key, setting: setting.index } : { key });
|
|
@@ -139,41 +86,42 @@ function signed(v, tolerance) {
|
|
|
139
86
|
}
|
|
140
87
|
const dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
141
88
|
function describe(op, i, tolerance) {
|
|
142
|
-
checkOrthogonalWithin(op.matrix, `Operation ${i}`, tolerance);
|
|
143
89
|
const notCrystallographic = `Operation ${i} is not a crystallographic point operation`;
|
|
144
90
|
// The trace of the rotation part is an integer exactly for the angles 360°/n, n = 1, 2, 3, 4, 6.
|
|
145
|
-
const t = det(op.
|
|
91
|
+
const t = det(op.cartesian) > 0 ? trace(op.cartesian) : -trace(op.cartesian);
|
|
146
92
|
if (Math.abs(t - Math.round(t)) > traceTolerance(tolerance))
|
|
147
93
|
throw new RangeError(notCrystallographic);
|
|
148
94
|
// The order from the trace of the rotation part, 1 + 2 cos(360°/n): 3, −1, 0, 1, 2 for n = 1, 2, 3, 4, 6.
|
|
149
95
|
const n = { 3: 1, [-1]: 2, 0: 3, 1: 4, 2: 6 }[Math.round(t)];
|
|
150
96
|
if (n === undefined)
|
|
151
97
|
throw new RangeError(notCrystallographic);
|
|
152
|
-
const r = (det(op.
|
|
153
|
-
const proper = det(op.
|
|
98
|
+
const r = (det(op.cartesian) > 0 ? op.cartesian : op.cartesian.map((row) => row.map((v) => -v)));
|
|
99
|
+
const proper = det(op.cartesian) > 0;
|
|
154
100
|
const timeReversal = op.timeReversal;
|
|
155
101
|
if (n === 1)
|
|
156
|
-
return Object.freeze({ kind: proper ? 'identity' : 'inversion',
|
|
102
|
+
return Object.freeze({ kind: proper ? 'identity' : 'inversion', n: 1, timeReversal });
|
|
157
103
|
const { axis } = signed(rotationAxis(r, n), tolerance);
|
|
158
104
|
const frozenAxis = Object.freeze({ cartesian: Object.freeze(axis) });
|
|
159
|
-
const kind = proper ? 'rotation' : n === 2 ? '
|
|
105
|
+
const kind = proper ? 'rotation' : n === 2 ? 'reflection' : 'rotoinversion';
|
|
160
106
|
if (n === 2)
|
|
161
|
-
return Object.freeze({ kind,
|
|
107
|
+
return Object.freeze({ kind, n: 2, axis: frozenAxis, timeReversal });
|
|
162
108
|
const sense = dot(axialVector(r), axis) > 0 ? '+' : '-';
|
|
163
|
-
return Object.freeze({ kind,
|
|
109
|
+
return Object.freeze({ kind, n, axis: frozenAxis, sense, timeReversal });
|
|
164
110
|
}
|
|
165
111
|
/**
|
|
166
112
|
* Each operation of a list described geometrically, in the order of the list: kind, n, the
|
|
167
113
|
* Cartesian axis (rotation or rotoinversion axis, mirror normal) with its first non-zero component,
|
|
168
114
|
* in the order x, y, z, positive, and for n ≥ 3 the sense about that axis. The axes are not named
|
|
169
115
|
* by lattice directions, since the list need not belong to a setting; for a point group given by its
|
|
170
|
-
* key, `describeOperations` names them. Throws a RangeError for
|
|
116
|
+
* key, `describeOperations` names them. Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`) or
|
|
171
117
|
* not a crystallographic operation (a rotation part by an angle other than 360°/n, n = 1, 2, 3, 4,
|
|
172
118
|
* 6), both within `tolerance` (default `EPSILON`, as for `pointGroupOf`), and for an operation that
|
|
173
119
|
* does not say whether it is combined with time reversal.
|
|
174
120
|
*/
|
|
175
121
|
export function describeOperationsOf(operations, options) {
|
|
176
|
-
|
|
122
|
+
checkOptions(options, TOLERANCE_KEYS, 'describeOperationsOf');
|
|
123
|
+
const tolerance = toleranceOf(options, 'operations');
|
|
124
|
+
checkCartesianOperations(operations, tolerance);
|
|
177
125
|
checkTimeReversal(operations);
|
|
178
126
|
return Object.freeze(operations.map((op, i) => describe(op, i, tolerance)));
|
|
179
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identify.js","sourceRoot":"","sources":["../../src/pointGroups/identify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"identify.js","sourceRoot":"","sources":["../../src/pointGroups/identify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,KAAK,EAAwB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAA2B,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAE,OAAO,EAAE,WAAW,EAAyB,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAsB,MAAM,eAAe,CAAC;AAC9E,OAAO,EACL,yBAAyB,EACzB,UAAU,IAAI,eAAe,EAC7B,QAAQ,GAET,MAAM,kBAAkB,CAAC;AAuC1B,2DAA2D;AAC3D,MAAM,SAAS,GAAG,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lists, the data from which
|
|
3
|
+
* `itcData.ts` builds the operations in ITA's order. ITA bases the sequence of the coordinate
|
|
3
4
|
* triplets on its "Generators selected" (Vol. A, 5th ed. 2006, § 2.2.11 (iv), p. 27; transcribed
|
|
4
5
|
* for the symmorphic P group of every setting it lists in references/itc/vol-a-2006-symmetry-operations.md)
|
|
5
6
|
* and takes the next generator as soon as a power of the current one lies in the group generated
|
|
6
|
-
* so far (§ 8.3.5, p. 737).
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* (x̃ = W x); docs/conventions.md, "Order of the operations".
|
|
7
|
+
* so far (§ 8.3.5, p. 737). This gives ITA's numbering of the general position (ITA 6th ed. Table
|
|
8
|
+
* 3.2.3.2), as `itcData.reference.test.ts` checks for all 45 entries (5 with rhombohedral axes). The generators are the
|
|
9
|
+
* printed triplets of Table 3.2.3.2, as matrices W in the conventional basis (x̃ = W x);
|
|
10
|
+
* docs/conventions.md, "Order of the operations".
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/** An integer matrix W in the conventional basis, rows as printed in a coordinate triplet. */
|
|
13
|
+
export type IntMat3 = readonly [
|
|
14
|
+
readonly [number, number, number],
|
|
15
|
+
readonly [number, number, number],
|
|
16
|
+
readonly [number, number, number]
|
|
17
|
+
];
|
|
16
18
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* bounds the loop; the caller checks that the result is the same set.
|
|
19
|
+
* ITA's selected generators per setting (`key|full ITC symbol of the setting`, with `|rhombohedral`
|
|
20
|
+
* for rhombohedral axes), in printed order (identity and translations left out).
|
|
20
21
|
*/
|
|
21
|
-
export declare
|
|
22
|
+
export declare const ITA_GENERATORS: Readonly<Record<string, readonly IntMat3[]>>;
|
|
22
23
|
//# sourceMappingURL=itaOrder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"itaOrder.d.ts","sourceRoot":"","sources":["../../src/pointGroups/itaOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"itaOrder.d.ts","sourceRoot":"","sources":["../../src/pointGroups/itaOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,8FAA8F;AAC9F,MAAM,MAAM,OAAO,GAAG,SAAS;IAC7B,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAwqBvE,CAAC"}
|