symcrys 0.7.0 → 0.8.1

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 (69) hide show
  1. package/dist/cell.d.ts +112 -0
  2. package/dist/cell.d.ts.map +1 -0
  3. package/dist/cell.js +193 -0
  4. package/dist/cell.js.map +1 -0
  5. package/dist/crystalClasses.d.ts +22 -8
  6. package/dist/crystalClasses.d.ts.map +1 -1
  7. package/dist/crystalClasses.js +25 -8
  8. package/dist/crystalClasses.js.map +1 -1
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/indices.d.ts +42 -0
  14. package/dist/indices.d.ts.map +1 -0
  15. package/dist/indices.js +101 -0
  16. package/dist/indices.js.map +1 -0
  17. package/dist/linalg.d.ts +7 -1
  18. package/dist/linalg.d.ts.map +1 -1
  19. package/dist/linalg.js +20 -3
  20. package/dist/linalg.js.map +1 -1
  21. package/dist/magnetic.d.ts +3 -0
  22. package/dist/magnetic.d.ts.map +1 -1
  23. package/dist/magnetic.js +3 -0
  24. package/dist/magnetic.js.map +1 -1
  25. package/dist/operations.d.ts +6 -0
  26. package/dist/operations.d.ts.map +1 -1
  27. package/dist/operations.js +19 -0
  28. package/dist/operations.js.map +1 -1
  29. package/dist/pointGroups/identify.d.ts +4 -2
  30. package/dist/pointGroups/identify.d.ts.map +1 -1
  31. package/dist/pointGroups/identify.js +5 -18
  32. package/dist/pointGroups/identify.js.map +1 -1
  33. package/dist/pointGroups/orbits.d.ts +1 -1
  34. package/dist/pointGroups/orbits.d.ts.map +1 -1
  35. package/dist/pointGroups/orbits.js +3 -3
  36. package/dist/pointGroups/orbits.js.map +1 -1
  37. package/dist/pointGroups/properties.d.ts +6 -2
  38. package/dist/pointGroups/properties.d.ts.map +1 -1
  39. package/dist/pointGroups/properties.js +6 -2
  40. package/dist/pointGroups/properties.js.map +1 -1
  41. package/dist/siteSymmetry.d.ts +5 -3
  42. package/dist/siteSymmetry.d.ts.map +1 -1
  43. package/dist/siteSymmetry.js +6 -2
  44. package/dist/siteSymmetry.js.map +1 -1
  45. package/dist/tensors/tensorForm.d.ts +3 -1
  46. package/dist/tensors/tensorForm.d.ts.map +1 -1
  47. package/dist/tensors/tensorForm.js +3 -1
  48. package/dist/tensors/tensorForm.js.map +1 -1
  49. package/dist/tensors/tensorProperties.d.ts +4 -2
  50. package/dist/tensors/tensorProperties.d.ts.map +1 -1
  51. package/dist/tensors/tensorProperties.js +4 -2
  52. package/dist/tensors/tensorProperties.js.map +1 -1
  53. package/dist/version.d.ts +1 -1
  54. package/dist/version.js +1 -1
  55. package/package.json +1 -1
  56. package/src/cell.ts +272 -0
  57. package/src/crystalClasses.ts +30 -8
  58. package/src/index.ts +26 -0
  59. package/src/indices.ts +117 -0
  60. package/src/linalg.ts +21 -2
  61. package/src/magnetic.ts +26 -0
  62. package/src/operations.ts +20 -0
  63. package/src/pointGroups/identify.ts +5 -19
  64. package/src/pointGroups/orbits.ts +3 -3
  65. package/src/pointGroups/properties.ts +6 -2
  66. package/src/siteSymmetry.ts +6 -3
  67. package/src/tensors/tensorForm.ts +3 -1
  68. package/src/tensors/tensorProperties.ts +4 -2
  69. package/src/version.ts +1 -1
package/dist/cell.d.ts ADDED
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Unit cell, metric and angles, for any cell (docs/conventions.md, "Cell, metric and indices").
3
+ * Plain data in and out: a basis is a 3×3 matrix whose columns are a, b, c in Cartesian
4
+ * coordinates, as `latticeBasis` gives it; lengths in any unit, angles in degrees.
5
+ */
6
+ import { type Mat3, type Vec3 } from './linalg.js';
7
+ /** The lattice parameters of a cell: edge lengths and angles in degrees (α between b and c, β between a and c, γ between a and b). */
8
+ export interface LatticeParameters {
9
+ /** Edge length a. */
10
+ readonly a: number;
11
+ /** Edge length b. */
12
+ readonly b: number;
13
+ /** Edge length c. */
14
+ readonly c: number;
15
+ /** Angle α between b and c, in degrees. */
16
+ readonly alpha: number;
17
+ /** Angle β between a and c, in degrees. */
18
+ readonly beta: number;
19
+ /** Angle γ between a and b, in degrees. */
20
+ readonly gamma: number;
21
+ }
22
+ /** The three cell angles in degrees. */
23
+ export interface CellAngles {
24
+ /** Angle α between b and c, in degrees. */
25
+ readonly alpha: number;
26
+ /** Angle β between a and c, in degrees. */
27
+ readonly beta: number;
28
+ /** Angle γ between a and b, in degrees. */
29
+ readonly gamma: number;
30
+ }
31
+ /** An operation of a list given to `residualOperations`: at least its matrix; other fields are kept. */
32
+ export interface CellOperation {
33
+ /** The 3×3 matrix W acting on lattice coordinates. */
34
+ readonly matrix: Mat3;
35
+ }
36
+ /** Options of `isValidCell`. */
37
+ export interface IsValidCellOptions {
38
+ /**
39
+ * The smallest accepted ratio V/(abc) of the cell volume to the volume of the box of its edge
40
+ * lengths, from 0 to 1 (1 only for orthogonal axes); default 0, which accepts every cell that
41
+ * `isValidCell` otherwise accepts. A ratio near 0 is a nearly flat cell.
42
+ */
43
+ readonly minVolumeRatio?: number;
44
+ }
45
+ /** Options of `residualOperations`. */
46
+ export interface ResidualOperationsOptions {
47
+ /** The largest accepted deviation of WᵀGW from G, relative to the largest entry of G; default `EPSILON`. */
48
+ readonly tolerance?: number;
49
+ }
50
+ /**
51
+ * Whether three angles (degrees) belong to a cell: each between 0° and 180°, and the three axes not
52
+ * in one plane (the volume radicand 1 − cos²α − cos²β − cos²γ + 2 cos α cos β cos γ exceeds 10⁻¹², i.e.
53
+ * V/(abc) > 10⁻⁶: a cell that is flat within rounding is refused). With
54
+ * `minVolumeRatio` (from 0 to 1, default 0) also refuses nearly flat cells, whose ratio V/(abc), the
55
+ * square root of the radicand, is smaller. Throws a RangeError for a `minVolumeRatio` that is not a
56
+ * number from 0 to 1.
57
+ */
58
+ export declare function isValidCell(angles: CellAngles, options?: IsValidCellOptions): boolean;
59
+ /**
60
+ * The Cartesian basis of a cell as the columns of a 3×3 matrix, in the frame of this library for a
61
+ * general cell: a along x, b in the xy plane (y > 0 for γ < 180°), c towards +z. It is the frame of
62
+ * `latticeBasis` where that exists (hexagonal axes: x ∥ a, z ∥ c), so a cell with the angles of a
63
+ * family has that family's basis scaled by the edge lengths. For the monoclinic family with unique
64
+ * axis b, b lies along y (docs/conventions.md, "Cell, metric and indices"). The basis is
65
+ * right-handed. Throws a RangeError for an edge that is not positive and for angles that give no cell.
66
+ */
67
+ export declare function latticeFromParameters(p: LatticeParameters): Mat3;
68
+ /**
69
+ * The lattice parameters of a basis given as the columns of a Cartesian matrix: the edge lengths and
70
+ * the angles in degrees. Independent of the orientation of the basis in the Cartesian frame (and
71
+ * of its handedness). Throws a RangeError for a singular matrix.
72
+ */
73
+ export declare function latticeParameters(basis: Mat3): LatticeParameters;
74
+ /** The metric tensor G = AᵀA of a basis A (columns a, b, c): g_ij = a_i · a_j, in the unit of the edge lengths squared. */
75
+ export declare function metricTensor(basis: Mat3): Mat3;
76
+ /**
77
+ * The reciprocal basis B = A⁻ᵀ of a basis A (columns a, b, c) as the columns a*, b*, c*, with
78
+ * a_i · a*_j = δ_ij (no factor 2π), in the inverse unit of the edge lengths.
79
+ */
80
+ export declare function reciprocalBasis(basis: Mat3): Mat3;
81
+ /** The angle in degrees between two lattice directions [uvw] (coordinates in the basis, columns a, b, c), 0° to 180°. Throws a RangeError for a zero vector. */
82
+ export declare function angleBetweenDirections(basis: Mat3, u: Vec3, v: Vec3): number;
83
+ /**
84
+ * The angle in degrees between the normals of two planes (hkl), 0° to 180°: the angle between the
85
+ * reciprocal vectors h·a* + k·b* + l·c*. For two faces this is 180° minus the interior dihedral
86
+ * angle. Throws a RangeError for a zero vector.
87
+ */
88
+ export declare function angleBetweenPlanes(basis: Mat3, h: Vec3, k: Vec3): number;
89
+ /**
90
+ * The operations that leave the metric of a cell unchanged: those W (integer matrices on the
91
+ * coordinates of a lattice direction, as `latticeOperations` gives them) with WᵀGW = G, G the metric
92
+ * tensor of `basis`. It is the point symmetry of a distorted lattice among the operations of a group;
93
+ * the list is taken as it is, not closed into a group, and the kept operations are the ones of the
94
+ * list, in its order. The deviation counts relative to the largest entry of G (`tolerance`, default
95
+ * `EPSILON`), so the result does not depend on the unit of the edge lengths.
96
+ */
97
+ export declare function residualOperations<T extends CellOperation>(operations: readonly T[], basis: Mat3, options?: ResidualOperationsOptions): T[];
98
+ /** An operation of the magnetic API passed to `residualOperations`: its matrix and whether it is combined with time reversal. */
99
+ export interface MagneticCellOperation extends CellOperation {
100
+ /** Whether the operation is combined with time reversal. */
101
+ readonly timeReversal: boolean;
102
+ }
103
+ /**
104
+ * The operations of a list that keep the metric of a cell: W with WᵀGW = G, G the metric tensor
105
+ * of `basis`. The operations are integer matrices on lattice coordinates, as `latticeOperations`
106
+ * gives them; the list is taken as it is and the kept operations are the ones of the list, in its
107
+ * order. The deviation counts relative to the largest entry of G (`tolerance`, default `EPSILON`).
108
+ * Every operation must say whether it is combined with time reversal (`timeReversal`), which is
109
+ * kept; one that does not (an operation of the crystallographic API) is a RangeError.
110
+ */
111
+ export declare function residualMagneticOperations<T extends MagneticCellOperation>(operations: readonly T[], basis: Mat3, options?: ResidualOperationsOptions): T[];
112
+ //# sourceMappingURL=cell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../src/cell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAmD,KAAK,IAAI,EAAE,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAIpG,sIAAsI;AACtI,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,QAAQ,CAAC,IAAI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B,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAIxE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,aAAa,EACxD,UAAU,EAAE,SAAS,CAAC,EAAE,EACxB,KAAK,EAAE,IAAI,EACX,OAAO,CAAC,EAAE,yBAAyB,GAClC,CAAC,EAAE,CAsBL;AAED,iIAAiI;AACjI,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,4DAA4D;IAC5D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,qBAAqB,EACxE,UAAU,EAAE,SAAS,CAAC,EAAE,EACxB,KAAK,EAAE,IAAI,EACX,OAAO,CAAC,EAAE,yBAAyB,GAClC,CAAC,EAAE,CAGL"}
package/dist/cell.js ADDED
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Unit cell, metric and angles, for any cell (docs/conventions.md, "Cell, metric and indices").
3
+ * Plain data in and out: a basis is a 3×3 matrix whose columns are a, b, c in Cartesian
4
+ * coordinates, as `latticeBasis` gives it; lengths in any unit, angles in degrees.
5
+ */
6
+ import { apply, inverse, isSingular, multiply, transpose } from './linalg.js';
7
+ import { checkTimeReversal } from './operations.js';
8
+ import { EPSILON } from './tolerances.js';
9
+ const DEG = Math.PI / 180;
10
+ /** Cosine of an angle in degrees, exact at the multiples of 30° that cells use (90°, 60°, 120°, 180°). */
11
+ function cosDeg(x) {
12
+ const r = x % 360;
13
+ const exact = { 0: 1, 60: 0.5, 90: 0, 120: -0.5, 180: -1, 240: -0.5, 270: 0, 300: 0.5 };
14
+ const k = r < 0 ? r + 360 : r;
15
+ return k in exact ? exact[k] : Math.cos(x * DEG);
16
+ }
17
+ /** The radicand of the volume, 1 − cos²α − cos²β − cos²γ + 2 cos α cos β cos γ. */
18
+ function radicand({ alpha, beta, gamma }) {
19
+ const [ca, cb, cg] = [alpha, beta, gamma].map(cosDeg);
20
+ return 1 - ca * ca - cb * cb - cg * cg + 2 * ca * cb * cg;
21
+ }
22
+ function anglesOk({ alpha, beta, gamma }) {
23
+ return [alpha, beta, gamma].every((x) => typeof x === 'number' && Number.isFinite(x) && x > 0 && x < 180);
24
+ }
25
+ /**
26
+ * Whether three angles (degrees) belong to a cell: each between 0° and 180°, and the three axes not
27
+ * in one plane (the volume radicand 1 − cos²α − cos²β − cos²γ + 2 cos α cos β cos γ exceeds 10⁻¹², i.e.
28
+ * V/(abc) > 10⁻⁶: a cell that is flat within rounding is refused). With
29
+ * `minVolumeRatio` (from 0 to 1, default 0) also refuses nearly flat cells, whose ratio V/(abc), the
30
+ * square root of the radicand, is smaller. Throws a RangeError for a `minVolumeRatio` that is not a
31
+ * number from 0 to 1.
32
+ */
33
+ export function isValidCell(angles, options) {
34
+ if (!anglesOk(angles))
35
+ return false;
36
+ const min = options?.minVolumeRatio ?? 0;
37
+ if (!(typeof min === 'number' && min >= 0 && min <= 1))
38
+ throw new RangeError(`isValidCell: minVolumeRatio must be a number from 0 to 1, not ${String(min)}`);
39
+ const r = radicand(angles);
40
+ if (!(r > 1e-12))
41
+ return false;
42
+ return Math.sqrt(r) >= min;
43
+ }
44
+ function checkEdges({ a, b, c }) {
45
+ for (const [name, x] of [
46
+ ['a', a],
47
+ ['b', b],
48
+ ['c', c],
49
+ ]) {
50
+ if (typeof x !== 'number' || !Number.isFinite(x) || x <= 0) {
51
+ throw new RangeError(`latticeFromParameters: edge ${name} must be a positive number, not ${JSON.stringify(x)}`);
52
+ }
53
+ }
54
+ }
55
+ /**
56
+ * The Cartesian basis of a cell as the columns of a 3×3 matrix, in the frame of this library for a
57
+ * general cell: a along x, b in the xy plane (y > 0 for γ < 180°), c towards +z. It is the frame of
58
+ * `latticeBasis` where that exists (hexagonal axes: x ∥ a, z ∥ c), so a cell with the angles of a
59
+ * family has that family's basis scaled by the edge lengths. For the monoclinic family with unique
60
+ * axis b, b lies along y (docs/conventions.md, "Cell, metric and indices"). The basis is
61
+ * right-handed. Throws a RangeError for an edge that is not positive and for angles that give no cell.
62
+ */
63
+ export function latticeFromParameters(p) {
64
+ checkEdges(p);
65
+ if (!isValidCell(p)) {
66
+ throw new RangeError(`latticeFromParameters: angles ${p.alpha}°, ${p.beta}°, ${p.gamma}° give no cell`);
67
+ }
68
+ const ca = cosDeg(p.alpha);
69
+ const cb = cosDeg(p.beta);
70
+ const cg = cosDeg(p.gamma);
71
+ const sg = Math.sqrt(1 - cg * cg);
72
+ const volumeRatio = Math.sqrt(radicand(p));
73
+ // columns: a = (a, 0, 0), b = (b cos γ, b sin γ, 0), c = (c cos β, c (cos α − cos β cos γ)/sin γ, c V/(abc sin γ))
74
+ const cy = (p.c * (ca - cb * cg)) / sg;
75
+ const cz = (p.c * volumeRatio) / sg;
76
+ return [
77
+ [p.a + 0, p.b * cg + 0, p.c * cb + 0],
78
+ [0, p.b * sg + 0, cy + 0],
79
+ [0, 0, cz + 0],
80
+ ];
81
+ }
82
+ function columns(basis) {
83
+ return [0, 1, 2].map((j) => [basis[0][j], basis[1][j], basis[2][j]]);
84
+ }
85
+ const norm = (v) => Math.hypot(v[0], v[1], v[2]);
86
+ const dot = (u, v) => u[0] * v[0] + u[1] * v[1] + u[2] * v[2];
87
+ function checkBasis(basis, who) {
88
+ const ok = Array.isArray(basis) &&
89
+ basis.length === 3 &&
90
+ basis.every((r) => Array.isArray(r) && r.length === 3 && r.every((x) => typeof x === 'number' && Number.isFinite(x)));
91
+ if (!ok)
92
+ throw new RangeError(`${who}: the basis must be a 3×3 matrix of finite numbers`);
93
+ if (isSingular(basis))
94
+ throw new RangeError(`${who}: singular basis`);
95
+ }
96
+ /**
97
+ * The lattice parameters of a basis given as the columns of a Cartesian matrix: the edge lengths and
98
+ * the angles in degrees. Independent of the orientation of the basis in the Cartesian frame (and
99
+ * of its handedness). Throws a RangeError for a singular matrix.
100
+ */
101
+ export function latticeParameters(basis) {
102
+ checkBasis(basis, 'latticeParameters');
103
+ const [a, b, c] = columns(basis);
104
+ const angle = (u, v) => {
105
+ const cross = [u[1] * v[2] - u[2] * v[1], u[2] * v[0] - u[0] * v[2], u[0] * v[1] - u[1] * v[0]];
106
+ return Math.atan2(norm(cross), dot(u, v)) / DEG + 0;
107
+ };
108
+ return { a: norm(a), b: norm(b), c: norm(c), alpha: angle(b, c), beta: angle(a, c), gamma: angle(a, b) };
109
+ }
110
+ /** The metric tensor G = AᵀA of a basis A (columns a, b, c): g_ij = a_i · a_j, in the unit of the edge lengths squared. */
111
+ export function metricTensor(basis) {
112
+ checkBasis(basis, 'metricTensor');
113
+ return multiply(transpose(basis), basis);
114
+ }
115
+ /**
116
+ * The reciprocal basis B = A⁻ᵀ of a basis A (columns a, b, c) as the columns a*, b*, c*, with
117
+ * a_i · a*_j = δ_ij (no factor 2π), in the inverse unit of the edge lengths.
118
+ */
119
+ export function reciprocalBasis(basis) {
120
+ checkBasis(basis, 'reciprocalBasis');
121
+ return transpose(inverse(basis));
122
+ }
123
+ function vector(v, name) {
124
+ if (!Array.isArray(v) || v.length !== 3 || !v.every((x) => typeof x === 'number' && Number.isFinite(x))) {
125
+ throw new RangeError(`${name} must be three finite numbers`);
126
+ }
127
+ if (v.every((x) => x === 0))
128
+ throw new RangeError(`${name} must not be the zero vector`);
129
+ return v;
130
+ }
131
+ function angleOf(u, v) {
132
+ const cross = [u[1] * v[2] - u[2] * v[1], u[2] * v[0] - u[0] * v[2], u[0] * v[1] - u[1] * v[0]];
133
+ return Math.atan2(norm(cross), dot(u, v)) / DEG + 0;
134
+ }
135
+ /** The angle in degrees between two lattice directions [uvw] (coordinates in the basis, columns a, b, c), 0° to 180°. Throws a RangeError for a zero vector. */
136
+ export function angleBetweenDirections(basis, u, v) {
137
+ checkBasis(basis, 'angleBetweenDirections');
138
+ return angleOf(apply(basis, vector(u, 'u')), apply(basis, vector(v, 'v')));
139
+ }
140
+ /**
141
+ * The angle in degrees between the normals of two planes (hkl), 0° to 180°: the angle between the
142
+ * reciprocal vectors h·a* + k·b* + l·c*. For two faces this is 180° minus the interior dihedral
143
+ * angle. Throws a RangeError for a zero vector.
144
+ */
145
+ export function angleBetweenPlanes(basis, h, k) {
146
+ checkBasis(basis, 'angleBetweenPlanes');
147
+ const b = reciprocalBasis(basis);
148
+ return angleOf(apply(b, vector(h, 'h')), apply(b, vector(k, 'k')));
149
+ }
150
+ /**
151
+ * The operations that leave the metric of a cell unchanged: those W (integer matrices on the
152
+ * coordinates of a lattice direction, as `latticeOperations` gives them) with WᵀGW = G, G the metric
153
+ * tensor of `basis`. It is the point symmetry of a distorted lattice among the operations of a group;
154
+ * the list is taken as it is, not closed into a group, and the kept operations are the ones of the
155
+ * list, in its order. The deviation counts relative to the largest entry of G (`tolerance`, default
156
+ * `EPSILON`), so the result does not depend on the unit of the edge lengths.
157
+ */
158
+ export function residualOperations(operations, basis, options) {
159
+ const g = metricTensor(basis);
160
+ const tolerance = options?.tolerance ?? EPSILON;
161
+ if (typeof tolerance !== 'number' || !Number.isFinite(tolerance) || tolerance < 0) {
162
+ throw new RangeError(`residualOperations: tolerance must be a non-negative number, not ${JSON.stringify(tolerance)}`);
163
+ }
164
+ if (!Array.isArray(operations))
165
+ throw new RangeError('residualOperations: operations must be a list');
166
+ operations.forEach((op, i) => {
167
+ const m = op?.matrix;
168
+ const ok = Array.isArray(m) &&
169
+ m.length === 3 &&
170
+ m.every((r) => Array.isArray(r) && r.length === 3 && r.every((x) => typeof x === 'number' && Number.isFinite(x)));
171
+ if (!ok)
172
+ throw new RangeError(`residualOperations: operation ${i} has no 3×3 matrix of finite numbers`);
173
+ });
174
+ const scale = Math.max(...g.flat().map(Math.abs));
175
+ return operations.filter((op) => {
176
+ const m = multiply(multiply(transpose(op.matrix), g), op.matrix);
177
+ return m.every((row, i) => row.every((x, j) => Math.abs(x - g[i][j]) <= tolerance * scale));
178
+ });
179
+ }
180
+ /**
181
+ * The operations of a list that keep the metric of a cell: W with WᵀGW = G, G the metric tensor
182
+ * of `basis`. The operations are integer matrices on lattice coordinates, as `latticeOperations`
183
+ * gives them; the list is taken as it is and the kept operations are the ones of the list, in its
184
+ * order. The deviation counts relative to the largest entry of G (`tolerance`, default `EPSILON`).
185
+ * Every operation must say whether it is combined with time reversal (`timeReversal`), which is
186
+ * kept; one that does not (an operation of the crystallographic API) is a RangeError.
187
+ */
188
+ export function residualMagneticOperations(operations, basis, options) {
189
+ if (Array.isArray(operations))
190
+ checkTimeReversal(operations);
191
+ return residualOperations(operations, basis, options);
192
+ }
193
+ //# sourceMappingURL=cell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell.js","sourceRoot":"","sources":["../src/cell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAuC,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAkD1C,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAE1B,0GAA0G;AAC1G,SAAS,MAAM,CAAC,CAAS;IACvB,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IAClB,MAAM,KAAK,GAA2B,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAChH,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,C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bits.js';
20
20
  import * as wyckoff from './pointGroups/wyckoff.js';
21
21
  import type { Hkl } from './pointGroups/wyckoff.js';
22
+ import * as cell from './cell.js';
22
23
  import * as site from './siteSymmetry.js';
23
24
  import type { Uvw } from './symmetryDirections.js';
24
25
  import type { TensorPropertyName as MagneticTensorPropertyName } from './tensors/propertyTable.js';
@@ -138,13 +139,13 @@ export { holohedry } from './pointGroups/properties.js';
138
139
  /**
139
140
  * True if the group generated by `operations` contains the inversion, e.g. for the operations of a
140
141
  * distorted crystal. A list that is not closed is closed first. For a crystal class, read
141
- * `pointGroup(key).centrosymmetric`.
142
+ * `pointGroup(key).centrosymmetric`. Throws a RangeError for a matrix that is not orthogonal.
142
143
  */
143
144
  export declare function isCentrosymmetricOf(operations: readonly OperationArgument[]): boolean;
144
145
  /**
145
146
  * True if the group generated by `operations` is chiral: proper rotations only. For a crystal
146
147
  * class, read `pointGroup(key).chiral`. Polar is the named property `'pyroelectric'`:
147
- * `allowsPropertyOf(operations, 'pyroelectric')`.
148
+ * `allowsPropertyOf(operations, 'pyroelectric')`. Throws a RangeError for a matrix that is not orthogonal.
148
149
  */
149
150
  export declare function isChiralOf(operations: readonly OperationArgument[]): boolean;
150
151
  /** The crystal class of a list of operations: its key, and the setting if the operations are exactly those of one. */
@@ -203,8 +204,10 @@ export declare function symmetryDirections(key: PointGroupKey, options?: Setting
203
204
  * fixing the direction within the tolerance are closed under the products found in the list and
204
205
  * the direction is set onto their fixed space, repeated until stable, so that for a group the
205
206
  * result is a subgroup and the set direction lies exactly on its elements. For a list that is not a
206
- * group, `multiplicity` may not be an integer. Throws a RangeError for a zero vector, and if the
207
- * closed operations fix no common direction (a tolerance far too large, e.g. 0.5).
207
+ * group, `multiplicity` may not be an integer. The matrices must be Cartesian and orthogonal (not
208
+ * those of `latticeOperations`). Throws a RangeError for a matrix that is not orthogonal (within
209
+ * `tolerance`, at least `EPSILON`), for a zero vector, and if the closed operations fix no common
210
+ * direction (a tolerance far too large, e.g. 0.5).
208
211
  */
209
212
  export declare function siteSymmetry(operations: readonly OperationArgument[], direction: Vec3, options?: site.SiteSymmetryOptions): site.SiteSymmetry;
210
213
  /**
@@ -218,6 +221,14 @@ export declare function wyckoffPositions(key: PointGroupKey, options?: SettingOp
218
221
  * `siteSymmetry`.
219
222
  */
220
223
  export declare function wyckoffPositionOf(key: PointGroupKey, direction: Vec3, options?: wyckoff.WyckoffOptions): wyckoff.WyckoffPosition;
224
+ /**
225
+ * The operations of a list that keep the metric of a cell: W with WᵀGW = G, G the metric tensor
226
+ * of `basis`. The operations are integer matrices on lattice coordinates, as `latticeOperations`
227
+ * gives them; the list is taken as it is and the kept operations are the ones of the list, in its
228
+ * order. The deviation counts relative to the largest entry of G (`tolerance`, default
229
+ * `EPSILON`). An operation combined with time reversal belongs to the magnetic API.
230
+ */
231
+ export declare function residualOperations<T extends OperationArgument>(operations: readonly T[], basis: Mat3, options?: cell.ResidualOperationsOptions): T[];
221
232
  /**
222
233
  * The operations of the crystal class in the conventional lattice basis (a, b, c; for the trigonal
223
234
  * classes the hexagonal axes), in the order of `operations` for the same setting and convention:
@@ -256,7 +267,8 @@ export declare function orbit(key: PointGroupKey, indices: {
256
267
  * operation, coinciding images merged (closer than `tolerance`, default `EPSILON`, as for
257
268
  * `siteSymmetry`), in the order in which the operations reach them, each with the indices of the
258
269
  * operations that map the direction there. The list is taken as it is, not closed into a group.
259
- * Throws a RangeError for a zero vector and for a matrix that is not orthogonal.
270
+ * Throws a RangeError for a zero vector and for a matrix that is not orthogonal (within
271
+ * `tolerance`, at least `EPSILON`).
260
272
  */
261
273
  export declare function orbitOf(operations: readonly OperationArgument[], direction: Vec3, options?: orbits.OrbitOptions): readonly orbits.OrbitPole[];
262
274
  /**
@@ -285,7 +297,8 @@ export declare function tensorForm(key: PointGroupKey, spec: TensorSpecArgument
285
297
  * The form of a tensor under the group generated by `operations`, e.g. the site symmetry of a
286
298
  * surface normal (`siteSymmetry`) or the operations of a distorted crystal. The tensor is given by
287
299
  * its specification or by the name of a property in `TENSOR_PROPERTIES`. The operations are
288
- * Cartesian and orthogonal; a list that is not closed is closed first.
300
+ * Cartesian and orthogonal; a list that is not closed is closed first. Throws a RangeError for a
301
+ * matrix that is not orthogonal.
289
302
  */
290
303
  export declare function tensorFormOf(operations: readonly OperationArgument[], spec: TensorSpecArgument | TensorPropertyName): TensorForm;
291
304
  /**
@@ -308,9 +321,10 @@ export declare function allowsProperty(key: PointGroupKey, name: TensorPropertyN
308
321
  export declare function allowedProperties(key: PointGroupKey): TensorPropertyName[];
309
322
  /**
310
323
  * True if the group generated by `operations` allows the named property, e.g. for the site
311
- * symmetry of a surface normal or the operations of a distorted crystal.
324
+ * symmetry of a surface normal or the operations of a distorted crystal. The matrices must be
325
+ * Cartesian and orthogonal; a list that is not closed is closed first. Throws a RangeError for a matrix that is not orthogonal.
312
326
  */
313
327
  export declare function allowsPropertyOf(operations: readonly OperationArgument[], name: TensorPropertyName): boolean;
314
- /** The named properties the group generated by `operations` allows. */
328
+ /** The named properties the group generated by `operations` allows. Checks the operations as `allowsPropertyOf`. */
315
329
  export declare function allowedPropertiesOf(operations: readonly OperationArgument[]): TensorPropertyName[];
316
330
  //# sourceMappingURL=crystalClasses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"crystalClasses.d.ts","sourceRoot":"","sources":["../src/crystalClasses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEtH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,KAAK,QAAQ,MAAM,2BAA2B,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MG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,GAClD,MAAM,EAAE,CAEV;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAEpF;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,kBAAkB,EAAE,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,iBAAiB,EAAE,EAAE,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAE5G;AAED,oHAAoH;AACpH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,SAAS,iBAAiB,EAAE,GAAG,kBAAkB,EAAE,CAGlG"}
@@ -17,6 +17,7 @@ import * as forms from './pointGroups/crystalForms.js';
17
17
  import * as identify from './pointGroups/identify.js';
18
18
  import * as orbits from './pointGroups/orbits.js';
19
19
  import * as wyckoff from './pointGroups/wyckoff.js';
20
+ import * as cell from './cell.js';
20
21
  import * as site from './siteSymmetry.js';
21
22
  import { TENSOR_PROPERTIES as ALL_TENSOR_PROPERTIES } from './tensors/propertyTable.js';
22
23
  import * as tensors from './tensors/tensorForm.js';
@@ -168,7 +169,7 @@ export { holohedry } from './pointGroups/properties.js';
168
169
  /**
169
170
  * True if the group generated by `operations` contains the inversion, e.g. for the operations of a
170
171
  * distorted crystal. A list that is not closed is closed first. For a crystal class, read
171
- * `pointGroup(key).centrosymmetric`.
172
+ * `pointGroup(key).centrosymmetric`. Throws a RangeError for a matrix that is not orthogonal.
172
173
  */
173
174
  export function isCentrosymmetricOf(operations) {
174
175
  return properties.isCentrosymmetricOf(unitary(operations));
@@ -176,7 +177,7 @@ export function isCentrosymmetricOf(operations) {
176
177
  /**
177
178
  * True if the group generated by `operations` is chiral: proper rotations only. For a crystal
178
179
  * class, read `pointGroup(key).chiral`. Polar is the named property `'pyroelectric'`:
179
- * `allowsPropertyOf(operations, 'pyroelectric')`.
180
+ * `allowsPropertyOf(operations, 'pyroelectric')`. Throws a RangeError for a matrix that is not orthogonal.
180
181
  */
181
182
  export function isChiralOf(operations) {
182
183
  return properties.isChiralOf(unitary(operations));
@@ -244,8 +245,10 @@ export function symmetryDirections(key, options) {
244
245
  * fixing the direction within the tolerance are closed under the products found in the list and
245
246
  * the direction is set onto their fixed space, repeated until stable, so that for a group the
246
247
  * result is a subgroup and the set direction lies exactly on its elements. For a list that is not a
247
- * group, `multiplicity` may not be an integer. Throws a RangeError for a zero vector, and if the
248
- * closed operations fix no common direction (a tolerance far too large, e.g. 0.5).
248
+ * group, `multiplicity` may not be an integer. The matrices must be Cartesian and orthogonal (not
249
+ * those of `latticeOperations`). Throws a RangeError for a matrix that is not orthogonal (within
250
+ * `tolerance`, at least `EPSILON`), for a zero vector, and if the closed operations fix no common
251
+ * direction (a tolerance far too large, e.g. 0.5).
249
252
  */
250
253
  export function siteSymmetry(operations, direction, options) {
251
254
  checkUnitary(operations);
@@ -269,6 +272,17 @@ export function wyckoffPositionOf(key, direction, options) {
269
272
  return wyckoff.wyckoffPositionOf(classKey(key), direction, options);
270
273
  }
271
274
  // --- lattice basis and orbits ---------------------------------------------------------------------
275
+ /**
276
+ * The operations of a list that keep the metric of a cell: W with WᵀGW = G, G the metric tensor
277
+ * of `basis`. The operations are integer matrices on lattice coordinates, as `latticeOperations`
278
+ * gives them; the list is taken as it is and the kept operations are the ones of the list, in its
279
+ * order. The deviation counts relative to the largest entry of G (`tolerance`, default
280
+ * `EPSILON`). An operation combined with time reversal belongs to the magnetic API.
281
+ */
282
+ export function residualOperations(operations, basis, options) {
283
+ checkUnitary(operations);
284
+ return cell.residualOperations(operations, basis, options);
285
+ }
272
286
  /**
273
287
  * The operations of the crystal class in the conventional lattice basis (a, b, c; for the trigonal
274
288
  * classes the hexagonal axes), in the order of `operations` for the same setting and convention:
@@ -292,7 +306,8 @@ export function orbit(key, indices, options) {
292
306
  * operation, coinciding images merged (closer than `tolerance`, default `EPSILON`, as for
293
307
  * `siteSymmetry`), in the order in which the operations reach them, each with the indices of the
294
308
  * operations that map the direction there. The list is taken as it is, not closed into a group.
295
- * Throws a RangeError for a zero vector and for a matrix that is not orthogonal.
309
+ * Throws a RangeError for a zero vector and for a matrix that is not orthogonal (within
310
+ * `tolerance`, at least `EPSILON`).
296
311
  */
297
312
  export function orbitOf(operations, direction, options) {
298
313
  checkUnitary(operations);
@@ -330,7 +345,8 @@ export function tensorForm(key, spec, options) {
330
345
  * The form of a tensor under the group generated by `operations`, e.g. the site symmetry of a
331
346
  * surface normal (`siteSymmetry`) or the operations of a distorted crystal. The tensor is given by
332
347
  * its specification or by the name of a property in `TENSOR_PROPERTIES`. The operations are
333
- * Cartesian and orthogonal; a list that is not closed is closed first.
348
+ * Cartesian and orthogonal; a list that is not closed is closed first. Throws a RangeError for a
349
+ * matrix that is not orthogonal.
334
350
  */
335
351
  export function tensorFormOf(operations, spec) {
336
352
  return tensors.tensorFormOf(unitary(operations), timeEven(spec));
@@ -361,12 +377,13 @@ export function allowedProperties(key) {
361
377
  }
362
378
  /**
363
379
  * True if the group generated by `operations` allows the named property, e.g. for the site
364
- * symmetry of a surface normal or the operations of a distorted crystal.
380
+ * symmetry of a surface normal or the operations of a distorted crystal. The matrices must be
381
+ * Cartesian and orthogonal; a list that is not closed is closed first. Throws a RangeError for a matrix that is not orthogonal.
365
382
  */
366
383
  export function allowsPropertyOf(operations, name) {
367
384
  return tensors.tensorFormOf(unitary(operations), propertyName(name)).basis.length > 0;
368
385
  }
369
- /** The named properties the group generated by `operations` allows. */
386
+ /** The named properties the group generated by `operations` allows. Checks the operations as `allowsPropertyOf`. */
370
387
  export function allowedPropertiesOf(operations) {
371
388
  const ops = unitary(operations);
372
389
  return TENSOR_PROPERTY_NAMES.filter((name) => tensors.tensorFormOf(ops, name).basis.length > 0);
@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AAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACxF,CAAC;AAED,oHAAoH;AACpH,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
@@ -8,6 +8,8 @@
8
8
  export { VERSION } from './version.js';
9
9
  export type { Mat3, Vec3 } from './linalg.js';
10
10
  export { crystalFamily, latticeBasis, type CrystalFamily, type CrystalSystem, type FixedAngleFamily, } from './lattice.js';
11
+ export { angleBetweenDirections, angleBetweenPlanes, isValidCell, latticeFromParameters, latticeParameters, metricTensor, reciprocalBasis, type CellAngles, type CellOperation, type IsValidCellOptions, type LatticeParameters, type ResidualOperationsOptions, } from './cell.js';
12
+ export { changeOfAxes, directionFromFourIndices, directionToFourIndices, planeFromFourIndices, planeToFourIndices, reduceIndices, zoneAxis, type AxisChange, type FourIndices, } from './indices.js';
11
13
  export type { Convention, PointGroupKey, Setting, SettingOptions, SymbolOptions } from './pointGroups/pointGroups.js';
12
14
  export { LATTICE_SYMMETRY_DIRECTIONS, type Uvw } from './symmetryDirections.js';
13
15
  export type { Axis, DirectionElements, OperationKind, SymmetryDirection } from './pointGroups/elements.js';
@@ -17,5 +19,5 @@ export type { CrystalForm, CrystalFormType } from './pointGroups/crystalForms.js
17
19
  export type { DirectionOrbitEntry, FaceOrbitEntry, OrbitOptions, OrbitPole } from './pointGroups/orbits.js';
18
20
  export type { CartesianAxis, PointGroupOfOptions } from './pointGroups/identify.js';
19
21
  export type { IntrinsicSymmetry, TensorForm, TensorParity, TensorRank } from './tensors/tensorForm.js';
20
- export { CRYSTAL_FORM_TYPES, POINT_GROUP_KEYS, TENSOR_PROPERTIES, allowedProperties, allowedPropertiesOf, allowsProperty, allowsPropertyOf, crystalForms, describeOperations, describeOperationsOf, findPointGroup, generators, holohedry, isCentrosymmetricOf, isChiralOf, isPointGroupKey, latticeOperations, operations, orbit, orbitOf, pointGroup, pointGroupOf, pointGroups, rotateTensor, settings, siteSymmetry, symbol, symmetryDirections, tensorForm, tensorFormOf, wyckoffPositionOf, wyckoffPositions, type CartesianOperationDescription, type IdentifiedPointGroup, type Operation, type OperationDescription, type PointGroup, type PointGroupInSetting, type TensorProperty, type TensorPropertyName, type TensorSpec, } from './crystalClasses.js';
22
+ export { CRYSTAL_FORM_TYPES, POINT_GROUP_KEYS, TENSOR_PROPERTIES, allowedProperties, allowedPropertiesOf, allowsProperty, allowsPropertyOf, crystalForms, describeOperations, describeOperationsOf, findPointGroup, generators, holohedry, isCentrosymmetricOf, isChiralOf, isPointGroupKey, latticeOperations, residualOperations, operations, orbit, orbitOf, pointGroup, pointGroupOf, pointGroups, rotateTensor, settings, siteSymmetry, symbol, symmetryDirections, tensorForm, tensorFormOf, wyckoffPositionOf, wyckoffPositions, type CartesianOperationDescription, type IdentifiedPointGroup, type Operation, type OperationDescription, type PointGroup, type PointGroupInSetting, type TensorProperty, type TensorPropertyName, type TensorSpec, } from './crystalClasses.js';
21
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,aAA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