symcrys 0.6.1 → 0.7.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 +2 -2
- package/dist/crystalClasses.d.ts +94 -0
- package/dist/crystalClasses.d.ts.map +1 -1
- package/dist/crystalClasses.js +79 -0
- package/dist/crystalClasses.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/magnetic.d.ts +2 -0
- package/dist/magnetic.d.ts.map +1 -1
- package/dist/magnetic.js +2 -0
- package/dist/magnetic.js.map +1 -1
- package/dist/pointGroups/crystalForms.d.ts +70 -0
- package/dist/pointGroups/crystalForms.d.ts.map +1 -0
- package/dist/pointGroups/crystalForms.js +69 -0
- package/dist/pointGroups/crystalForms.js.map +1 -0
- package/dist/pointGroups/crystalFormsData.d.ts +32 -0
- package/dist/pointGroups/crystalFormsData.d.ts.map +1 -0
- package/dist/pointGroups/crystalFormsData.js +518 -0
- package/dist/pointGroups/crystalFormsData.js.map +1 -0
- package/dist/pointGroups/elements.d.ts +5 -1
- package/dist/pointGroups/elements.d.ts.map +1 -1
- package/dist/pointGroups/elements.js +6 -2
- package/dist/pointGroups/elements.js.map +1 -1
- package/dist/pointGroups/identify.d.ts +75 -0
- package/dist/pointGroups/identify.d.ts.map +1 -0
- package/dist/pointGroups/identify.js +193 -0
- package/dist/pointGroups/identify.js.map +1 -0
- package/dist/pointGroups/orbits.d.ts +85 -0
- package/dist/pointGroups/orbits.d.ts.map +1 -0
- package/dist/pointGroups/orbits.js +134 -0
- package/dist/pointGroups/orbits.js.map +1 -0
- package/dist/pointGroups/wyckoff.d.ts +40 -1
- package/dist/pointGroups/wyckoff.d.ts.map +1 -1
- package/dist/pointGroups/wyckoff.js +55 -27
- package/dist/pointGroups/wyckoff.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/crystalClasses.ts +146 -0
- package/src/index.ts +12 -0
- package/src/magnetic.ts +17 -0
- package/src/pointGroups/crystalForms.ts +143 -0
- package/src/pointGroups/crystalFormsData.ts +539 -0
- package/src/pointGroups/elements.ts +6 -2
- package/src/pointGroups/identify.ts +255 -0
- package/src/pointGroups/orbits.ts +228 -0
- package/src/pointGroups/wyckoff.ts +59 -26
- package/src/version.ts +1 -1
|
@@ -10,9 +10,9 @@ import { isMagneticPointGroupKey, isPointGroupKey, operations, settings, } from
|
|
|
10
10
|
import { siteSymmetry, siteTolerance } from '../siteSymmetry.js';
|
|
11
11
|
import { ITA_WYCKOFF } from './wyckoffData.js';
|
|
12
12
|
/** The values substituted into ITA's Miller indices for the numeric representative. */
|
|
13
|
-
const
|
|
13
|
+
export const REPRESENTATIVE_VALUES = { h: 3, k: 2, l: 1 };
|
|
14
14
|
/** One printed index (`h`, `-2h`, `0`, `1`) as a number. */
|
|
15
|
-
function index(component) {
|
|
15
|
+
function index(component, values) {
|
|
16
16
|
const m = /^(-?)(\d*)([hkil]?)$/.exec(component);
|
|
17
17
|
if (!m || (m[2] === '' && m[3] === ''))
|
|
18
18
|
throw new Error(`Unreadable Miller index: ${component}`);
|
|
@@ -21,25 +21,25 @@ function index(component) {
|
|
|
21
21
|
if (m[3] === '')
|
|
22
22
|
return sign * factor;
|
|
23
23
|
if (m[3] === 'i')
|
|
24
|
-
return sign * factor * -(
|
|
25
|
-
return sign * factor *
|
|
24
|
+
return sign * factor * -(values.h + values.k);
|
|
25
|
+
return sign * factor * values[m[3]];
|
|
26
26
|
}
|
|
27
|
-
/** Printed Miller indices (three, or four for hexagonal axes) as three numbers. */
|
|
28
|
-
function numericHkl(miller) {
|
|
29
|
-
const parts = miller.split(',').map(index);
|
|
27
|
+
/** Printed Miller indices (three, or four for hexagonal axes) as three numbers, with the given values of h, k, l. */
|
|
28
|
+
export function numericHkl(miller, values = REPRESENTATIVE_VALUES) {
|
|
29
|
+
const parts = miller.split(',').map((c) => index(c, values));
|
|
30
30
|
if (parts.length === 3)
|
|
31
31
|
return [parts[0], parts[1], parts[2]];
|
|
32
32
|
if (parts.length === 4 && parts[2] === -(parts[0] + parts[1]))
|
|
33
33
|
return [parts[0], parts[1], parts[3]];
|
|
34
34
|
throw new Error(`Unreadable Miller indices: ${miller}`);
|
|
35
35
|
}
|
|
36
|
-
const IDENTITY = [
|
|
36
|
+
export const IDENTITY = [
|
|
37
37
|
[1, 0, 0],
|
|
38
38
|
[0, 1, 0],
|
|
39
39
|
[0, 0, 1],
|
|
40
40
|
];
|
|
41
41
|
/** The face normal of (hkl) as a Cartesian unit vector: h a* + k b* + l c* with the reciprocal basis B⁻ᵀ. */
|
|
42
|
-
function normal(basis, hkl) {
|
|
42
|
+
export function normal(basis, hkl) {
|
|
43
43
|
const v = apply(transpose(inverse(basis)), hkl);
|
|
44
44
|
const n = Math.hypot(v[0], v[1], v[2]);
|
|
45
45
|
return [v[0] / n, v[1] / n, v[2] / n];
|
|
@@ -51,7 +51,7 @@ const HKL = 'hkl';
|
|
|
51
51
|
* Only for components that are `0`, a number, or a plain letter with an optional `-` (as in `mm2`); a
|
|
52
52
|
* letter is renamed after its new position. A factor such as `2x` throws.
|
|
53
53
|
*/
|
|
54
|
-
function permutePattern(pattern, r, letters) {
|
|
54
|
+
export function permutePattern(pattern, r, letters) {
|
|
55
55
|
const old = pattern.split(',');
|
|
56
56
|
if (old.length !== 3)
|
|
57
57
|
throw new Error(`Cannot carry ${pattern} into another setting`);
|
|
@@ -83,14 +83,12 @@ function permuteSymbol(symbolText, r) {
|
|
|
83
83
|
function isSignedPermutation(r) {
|
|
84
84
|
return r.every((row) => row.filter((v) => Math.abs(v) > 1e-9).length === 1 && row.some((v) => Math.abs(Math.abs(v) - 1) < 1e-9));
|
|
85
85
|
}
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (setting === 1)
|
|
93
|
-
throw new Error(`Point group ${key}: no printed Wyckoff positions for setting 1`);
|
|
86
|
+
/**
|
|
87
|
+
* The signed permutation r that carries setting 1 of a class into `setting` (new axis i = r[i][j] ×
|
|
88
|
+
* old axis j), for the settings ITA does not print (`mm2` settings 2 and 3). Throws if the frame of
|
|
89
|
+
* the setting is not a permutation of that of setting 1.
|
|
90
|
+
*/
|
|
91
|
+
export function permutationFromSetting1(key, setting) {
|
|
94
92
|
const d = POINT_GROUP_DATA.find((x) => x.key === key);
|
|
95
93
|
if (!d)
|
|
96
94
|
throw new RangeError(`Unknown point group key: ${JSON.stringify(key)}`);
|
|
@@ -102,6 +100,25 @@ function printedRows(key, setting) {
|
|
|
102
100
|
!raw.every((row, i) => row.every((v, j) => Math.abs(v - r[i][j]) < 1e-9))) {
|
|
103
101
|
throw new Error(`Point group ${key}, setting ${setting}: frame is not a permutation of setting 1`);
|
|
104
102
|
}
|
|
103
|
+
return r;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The entry of a table printed per setting (Wyckoff positions, face forms) for a setting of a class:
|
|
107
|
+
* the one with the ITC short symbol (and unique axis) of the setting, or undefined if ITA does not
|
|
108
|
+
* print the setting.
|
|
109
|
+
*/
|
|
110
|
+
export function printedEntry(table, key, setting) {
|
|
111
|
+
const s = settings(key, 'itc')[setting - 1];
|
|
112
|
+
return table.find((e) => e.symbol === s.symbol && (e.uniqueAxis === undefined || e.uniqueAxis === s.uniqueAxis));
|
|
113
|
+
}
|
|
114
|
+
/** The printed rows of a setting; for a setting ITA does not print, those of setting 1 carried into its frame. */
|
|
115
|
+
function printedRows(key, setting) {
|
|
116
|
+
const entry = printedEntry(ITA_WYCKOFF, key, setting);
|
|
117
|
+
if (entry)
|
|
118
|
+
return entry.rows;
|
|
119
|
+
if (setting === 1)
|
|
120
|
+
throw new Error(`Point group ${key}: no printed Wyckoff positions for setting 1`);
|
|
121
|
+
const r = permutationFromSetting1(key, setting);
|
|
105
122
|
return printedRows(key, 1).map(([letter, mult, site, coords, miller]) => [
|
|
106
123
|
letter,
|
|
107
124
|
mult,
|
|
@@ -110,13 +127,29 @@ function printedRows(key, setting) {
|
|
|
110
127
|
miller === '' ? '' : permutePattern(miller, r, HKL),
|
|
111
128
|
]);
|
|
112
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* The lattice basis in which the Cartesian normals of the representatives are computed; monoclinic
|
|
132
|
+
* and triclinic: a, b, c along x, y, z (docs/conventions.md, "Site symmetry and Wyckoff positions").
|
|
133
|
+
*/
|
|
134
|
+
export function faceBasis(key) {
|
|
135
|
+
const d = POINT_GROUP_DATA.find((x) => x.key === key);
|
|
136
|
+
if (!d)
|
|
137
|
+
throw new RangeError(`Unknown point group key: ${JSON.stringify(key)}`);
|
|
138
|
+
const family = crystalFamily(d.crystalSystem);
|
|
139
|
+
return family === 'monoclinic' || family === 'triclinic' ? IDENTITY : latticeBasis(family);
|
|
140
|
+
}
|
|
113
141
|
const cache = new Map();
|
|
114
|
-
|
|
142
|
+
/**
|
|
143
|
+
* The setting index for a table that exists for the crystal classes in the ITC convention only
|
|
144
|
+
* (`what`: 'Wyckoff positions', 'Crystal forms'); throws a RangeError for a magnetic point group
|
|
145
|
+
* with time reversal and for another convention.
|
|
146
|
+
*/
|
|
147
|
+
export function itcSetting(key, options, what = 'Wyckoff positions') {
|
|
115
148
|
if (isMagneticPointGroupKey(key) && !isPointGroupKey(key)) {
|
|
116
|
-
throw new RangeError(
|
|
149
|
+
throw new RangeError(`${what} are given for the 32 crystal classes only; ${JSON.stringify(key)} is a magnetic point group`);
|
|
117
150
|
}
|
|
118
151
|
if ((options?.convention ?? 'itc') !== 'itc') {
|
|
119
|
-
throw new RangeError(
|
|
152
|
+
throw new RangeError(`${what} exist in the ITC convention only (convention 'itc')`);
|
|
120
153
|
}
|
|
121
154
|
const list = settings(key, 'itc');
|
|
122
155
|
const index = options?.setting ?? list.find((s) => s.isDefault)?.index ?? 1;
|
|
@@ -136,12 +169,7 @@ export function wyckoffPositions(key, options) {
|
|
|
136
169
|
let result = cache.get(cacheKey);
|
|
137
170
|
if (!result) {
|
|
138
171
|
const ops = operations(key, { convention: 'itc', setting });
|
|
139
|
-
const
|
|
140
|
-
if (!d)
|
|
141
|
-
throw new RangeError(`Unknown point group key: ${JSON.stringify(key)}`);
|
|
142
|
-
const family = crystalFamily(d.crystalSystem);
|
|
143
|
-
// Monoclinic and triclinic: a, b, c along x, y, z (docs/conventions.md, "Site symmetry and Wyckoff positions").
|
|
144
|
-
const basis = family === 'monoclinic' || family === 'triclinic' ? IDENTITY : latticeBasis(family);
|
|
172
|
+
const basis = faceBasis(key);
|
|
145
173
|
result = Object.freeze(printedRows(key, setting)
|
|
146
174
|
.filter(([letter]) => letter !== 'o')
|
|
147
175
|
.map(([letter, multiplicity, site, coordinates, millerIndices]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wyckoff.js","sourceRoot":"","sources":["../../src/pointGroups/wyckoff.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAwB,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,QAAQ,GAGT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,aAAa,EAA4B,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAmB,MAAM,kBAAkB,CAAC;AAqChE,uFAAuF;AACvF,MAAM,MAAM,GAAqC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAEtE,4DAA4D;AAC5D,SAAS,KAAK,CAAC,SAAiB;IAC9B,MAAM,CAAC,GAAG,sBAAsB,CAAC,IAAI,CAAC,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/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "symcrys",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Crystallographic symmetry calculations: point groups (crystallographic and magnetic), their settings, symbols and properties, and property tensors. TypeScript library without dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"crystallography",
|
package/src/crystalClasses.ts
CHANGED
|
@@ -18,8 +18,13 @@ import * as elements from './pointGroups/elements.js';
|
|
|
18
18
|
import * as groups from './pointGroups/pointGroups.js';
|
|
19
19
|
import type { Convention, PointGroupKey, Setting, SettingOptions, SymbolOptions } from './pointGroups/pointGroups.js';
|
|
20
20
|
import * as properties from './pointGroups/properties.js';
|
|
21
|
+
import * as forms from './pointGroups/crystalForms.js';
|
|
22
|
+
import * as identify from './pointGroups/identify.js';
|
|
23
|
+
import * as orbits from './pointGroups/orbits.js';
|
|
21
24
|
import * as wyckoff from './pointGroups/wyckoff.js';
|
|
25
|
+
import type { Hkl } from './pointGroups/wyckoff.js';
|
|
22
26
|
import * as site from './siteSymmetry.js';
|
|
27
|
+
import type { Uvw } from './symmetryDirections.js';
|
|
23
28
|
import { TENSOR_PROPERTIES as ALL_TENSOR_PROPERTIES } from './tensors/propertyTable.js';
|
|
24
29
|
import type { TensorPropertyName as MagneticTensorPropertyName } from './tensors/propertyTable.js';
|
|
25
30
|
import * as tensors from './tensors/tensorForm.js';
|
|
@@ -295,6 +300,61 @@ export function isChiralOf(operations: readonly OperationArgument[]): boolean {
|
|
|
295
300
|
return properties.isChiralOf(unitary(operations));
|
|
296
301
|
}
|
|
297
302
|
|
|
303
|
+
// --- the point group of a list of operations -------------------------------------------------------
|
|
304
|
+
|
|
305
|
+
/** The crystal class of a list of operations: its key, and the setting if the operations are exactly those of one. */
|
|
306
|
+
export interface IdentifiedPointGroup {
|
|
307
|
+
/** The key of the crystal class the operations generate. */
|
|
308
|
+
readonly key: PointGroupKey;
|
|
309
|
+
/**
|
|
310
|
+
* The 1-based index of the setting whose operations the group equals, in the Cartesian frame of
|
|
311
|
+
* symcrys; absent if the group is the class in another orientation.
|
|
312
|
+
*/
|
|
313
|
+
readonly setting?: number;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/** One operation of any list described geometrically (`describeOperationsOf`). */
|
|
317
|
+
export type CartesianOperationDescription = Omit<identify.CartesianOperationDescription, 'timeReversal'>;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* The crystal class generated by a list of Cartesian operations, for instance those left after
|
|
321
|
+
* distorting a crystal: its key, and the setting whose operations it equals in the frame of symcrys
|
|
322
|
+
* (absent if the group is the class in another orientation, e.g. a threefold axis along [111]). The
|
|
323
|
+
* list is closed into a group first, two matrices being equal when no entry differs by `tolerance`
|
|
324
|
+
* (default `EPSILON`) or more. Returns undefined if the operations generate no crystal class (an
|
|
325
|
+
* operation of order 5, a group larger than 48). Throws a RangeError for a matrix that is not
|
|
326
|
+
* orthogonal (within `tolerance`, at least `EPSILON`). The classes `1` and `-1` have no
|
|
327
|
+
* orientation, so they always have setting 1. The first call builds a table of the groups (about
|
|
328
|
+
* 0.1 s; docs/conventions.md, "Point group of a list of operations").
|
|
329
|
+
*/
|
|
330
|
+
export function pointGroupOf(
|
|
331
|
+
operations: readonly OperationArgument[],
|
|
332
|
+
options?: identify.PointGroupOfOptions,
|
|
333
|
+
): IdentifiedPointGroup | undefined {
|
|
334
|
+
return identify.pointGroupOf(unitary(operations), options) as IdentifiedPointGroup | undefined;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Each operation of a list described geometrically, in the order of the list: kind, n, the
|
|
339
|
+
* Cartesian axis (rotation or rotoinversion axis, mirror normal) with its first non-zero component,
|
|
340
|
+
* in the order x, y, z, positive, and for n ≥ 3 the sense about that axis. The axes are not named
|
|
341
|
+
* by lattice directions, since the list need not belong to a setting; for a crystal class given by
|
|
342
|
+
* its key, `describeOperations` names them. Throws a RangeError for a matrix that is not orthogonal
|
|
343
|
+
* or not a crystallographic operation (a rotation part by an angle other than 360°/n, n = 1, 2, 3,
|
|
344
|
+
* 4, 6), both within `tolerance` (default `EPSILON`, as for `pointGroupOf`).
|
|
345
|
+
*/
|
|
346
|
+
export function describeOperationsOf(
|
|
347
|
+
operations: readonly OperationArgument[],
|
|
348
|
+
options?: identify.PointGroupOfOptions,
|
|
349
|
+
): readonly CartesianOperationDescription[] {
|
|
350
|
+
return Object.freeze(
|
|
351
|
+
identify.describeOperationsOf(unitary(operations), options).map((d) => {
|
|
352
|
+
const { timeReversal: _timeReversal, ...rest } = d;
|
|
353
|
+
return Object.freeze(rest);
|
|
354
|
+
}),
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
298
358
|
// --- symmetry elements -----------------------------------------------------------------------------
|
|
299
359
|
|
|
300
360
|
/**
|
|
@@ -375,6 +435,92 @@ export function wyckoffPositionOf(
|
|
|
375
435
|
return wyckoff.wyckoffPositionOf(classKey(key), direction, options);
|
|
376
436
|
}
|
|
377
437
|
|
|
438
|
+
// --- lattice basis and orbits ---------------------------------------------------------------------
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* The operations of the crystal class in the conventional lattice basis (a, b, c; for the trigonal
|
|
442
|
+
* classes the hexagonal axes), in the order of `operations` for the same setting and convention:
|
|
443
|
+
* integer matrices W acting on the coordinates of a lattice direction [uvw], W = B⁻¹·R·B with the
|
|
444
|
+
* basis B of `latticeBasis` and the Cartesian matrix R of `operations`. They do not depend on the
|
|
445
|
+
* cell angles, so they exist for every family; for the monoclinic and triclinic families a, b, c
|
|
446
|
+
* are taken along x, y, z, as for the Wyckoff positions. In the ITC convention they are the
|
|
447
|
+
* matrices of ITA's general position (6th ed., Table 3.2.3.2). Not orthogonal in general: pass
|
|
448
|
+
* them to no function that takes Cartesian operations (docs/conventions.md, "Lattice basis and
|
|
449
|
+
* orbits").
|
|
450
|
+
*/
|
|
451
|
+
export function latticeOperations(key: PointGroupKey, options?: SettingOptions): readonly Operation[] {
|
|
452
|
+
return matricesOnly(orbits.latticeOperations(classKey(key), options));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* The orbit of a face (hkl) or of a lattice direction [uvw] under a crystal class, exactly, in the
|
|
457
|
+
* lattice basis: the distinct faces (directions), in the order in which the operations reach them
|
|
458
|
+
* (so in the ITC convention the given face first), each with the indices of the operations that map
|
|
459
|
+
* the given one onto it. A face transforms with the inverse transpose of a lattice operation,
|
|
460
|
+
* h' = W⁻ᵀ·h, a direction with the operation itself, u' = W·u. The number of entries is the
|
|
461
|
+
* multiplicity of the face (direction). Throws a RangeError unless exactly one of `hkl` and `uvw` is
|
|
462
|
+
* given, as three integers not all zero (hexagonal axes: three indices, without i).
|
|
463
|
+
*/
|
|
464
|
+
export function orbit(
|
|
465
|
+
key: PointGroupKey,
|
|
466
|
+
indices: { readonly hkl: Hkl },
|
|
467
|
+
options?: SettingOptions,
|
|
468
|
+
): readonly orbits.FaceOrbitEntry[];
|
|
469
|
+
export function orbit(
|
|
470
|
+
key: PointGroupKey,
|
|
471
|
+
indices: { readonly uvw: Uvw },
|
|
472
|
+
options?: SettingOptions,
|
|
473
|
+
): readonly orbits.DirectionOrbitEntry[];
|
|
474
|
+
export function orbit(
|
|
475
|
+
key: PointGroupKey,
|
|
476
|
+
indices: { readonly hkl: Hkl } | { readonly uvw: Uvw },
|
|
477
|
+
options?: SettingOptions,
|
|
478
|
+
): readonly orbits.FaceOrbitEntry[] | readonly orbits.DirectionOrbitEntry[];
|
|
479
|
+
export function orbit(
|
|
480
|
+
key: PointGroupKey,
|
|
481
|
+
indices: { readonly hkl: Hkl } | { readonly uvw: Uvw },
|
|
482
|
+
options?: SettingOptions,
|
|
483
|
+
): readonly orbits.FaceOrbitEntry[] | readonly orbits.DirectionOrbitEntry[] {
|
|
484
|
+
return orbits.orbit(classKey(key), indices as { readonly hkl: Hkl }, options);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* The orbit of a direction (any non-zero vector, Cartesian, e.g. a face normal) under a list of
|
|
489
|
+
* operations, for instance those of a distorted crystal: the images of its unit vector under each
|
|
490
|
+
* operation, coinciding images merged (closer than `tolerance`, default `EPSILON`, as for
|
|
491
|
+
* `siteSymmetry`), in the order in which the operations reach them, each with the indices of the
|
|
492
|
+
* operations that map the direction there. The list is taken as it is, not closed into a group.
|
|
493
|
+
* Throws a RangeError for a zero vector and for a matrix that is not orthogonal.
|
|
494
|
+
*/
|
|
495
|
+
export function orbitOf(
|
|
496
|
+
operations: readonly OperationArgument[],
|
|
497
|
+
direction: Vec3,
|
|
498
|
+
options?: orbits.OrbitOptions,
|
|
499
|
+
): readonly orbits.OrbitPole[] {
|
|
500
|
+
checkUnitary(operations);
|
|
501
|
+
return orbits.orbitOf(operations, direction, options);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// --- crystal forms ---------------------------------------------------------------------------------
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* The 47 crystal forms of ITA Table 3.2.1.3 (6th ed., pp. 724–726) with ITA's numbers, English
|
|
508
|
+
* names, numbers of faces and eigensymmetries: `CRYSTAL_FORM_TYPES[n - 1]` is form n. Each
|
|
509
|
+
* crystal form of `crystalForms` names its form by this number (docs/conventions.md, "Crystal
|
|
510
|
+
* forms").
|
|
511
|
+
*/
|
|
512
|
+
export const CRYSTAL_FORM_TYPES: readonly forms.CrystalFormType[] = forms.CRYSTAL_FORM_TYPES;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* The crystal forms of a crystal class, as ITA 6th ed. Table 3.2.3.2 prints them: for each Wyckoff
|
|
516
|
+
* position (general position first) its basic form (two for the cubic faces (hhl) of -43m and
|
|
517
|
+
* m-3m), then its limiting forms. In the ITC convention
|
|
518
|
+
* only, like the Wyckoff positions (docs/conventions.md, "Crystal forms").
|
|
519
|
+
*/
|
|
520
|
+
export function crystalForms(key: PointGroupKey, options?: SettingOptions): readonly forms.CrystalForm[] {
|
|
521
|
+
return forms.crystalForms(classKey(key), options);
|
|
522
|
+
}
|
|
523
|
+
|
|
378
524
|
// --- tensors ---------------------------------------------------------------------------------------
|
|
379
525
|
|
|
380
526
|
/**
|
package/src/index.ts
CHANGED
|
@@ -21,24 +21,34 @@ export { LATTICE_SYMMETRY_DIRECTIONS, type Uvw } from './symmetryDirections.js';
|
|
|
21
21
|
export type { Axis, DirectionElements, OperationKind, SymmetryDirection } from './pointGroups/elements.js';
|
|
22
22
|
export type { SiteSymmetry, SiteSymmetryOptions } from './siteSymmetry.js';
|
|
23
23
|
export type { Hkl, WyckoffOptions, WyckoffPosition } from './pointGroups/wyckoff.js';
|
|
24
|
+
export type { CrystalForm, CrystalFormType } from './pointGroups/crystalForms.js';
|
|
25
|
+
export type { DirectionOrbitEntry, FaceOrbitEntry, OrbitOptions, OrbitPole } from './pointGroups/orbits.js';
|
|
26
|
+
export type { CartesianAxis, PointGroupOfOptions } from './pointGroups/identify.js';
|
|
24
27
|
export type { IntrinsicSymmetry, TensorForm, TensorParity, TensorRank } from './tensors/tensorForm.js';
|
|
25
28
|
|
|
26
29
|
export {
|
|
30
|
+
CRYSTAL_FORM_TYPES,
|
|
27
31
|
POINT_GROUP_KEYS,
|
|
28
32
|
TENSOR_PROPERTIES,
|
|
29
33
|
allowedProperties,
|
|
30
34
|
allowedPropertiesOf,
|
|
31
35
|
allowsProperty,
|
|
32
36
|
allowsPropertyOf,
|
|
37
|
+
crystalForms,
|
|
33
38
|
describeOperations,
|
|
39
|
+
describeOperationsOf,
|
|
34
40
|
findPointGroup,
|
|
35
41
|
generators,
|
|
36
42
|
holohedry,
|
|
37
43
|
isCentrosymmetricOf,
|
|
38
44
|
isChiralOf,
|
|
39
45
|
isPointGroupKey,
|
|
46
|
+
latticeOperations,
|
|
40
47
|
operations,
|
|
48
|
+
orbit,
|
|
49
|
+
orbitOf,
|
|
41
50
|
pointGroup,
|
|
51
|
+
pointGroupOf,
|
|
42
52
|
pointGroups,
|
|
43
53
|
rotateTensor,
|
|
44
54
|
settings,
|
|
@@ -49,6 +59,8 @@ export {
|
|
|
49
59
|
tensorFormOf,
|
|
50
60
|
wyckoffPositionOf,
|
|
51
61
|
wyckoffPositions,
|
|
62
|
+
type CartesianOperationDescription,
|
|
63
|
+
type IdentifiedPointGroup,
|
|
52
64
|
type Operation,
|
|
53
65
|
type OperationDescription,
|
|
54
66
|
type PointGroup,
|
package/src/magnetic.ts
CHANGED
|
@@ -68,6 +68,23 @@ export {
|
|
|
68
68
|
type SymmetryDirection,
|
|
69
69
|
} from './pointGroups/elements.js';
|
|
70
70
|
export { siteSymmetry, type SiteSymmetry, type SiteSymmetryOptions } from './siteSymmetry.js';
|
|
71
|
+
export {
|
|
72
|
+
describeOperationsOf,
|
|
73
|
+
pointGroupOf,
|
|
74
|
+
type CartesianAxis,
|
|
75
|
+
type CartesianOperationDescription,
|
|
76
|
+
type IdentifiedPointGroup,
|
|
77
|
+
type PointGroupOfOptions,
|
|
78
|
+
} from './pointGroups/identify.js';
|
|
79
|
+
export {
|
|
80
|
+
latticeOperations,
|
|
81
|
+
orbit,
|
|
82
|
+
orbitOf,
|
|
83
|
+
type DirectionOrbitEntry,
|
|
84
|
+
type FaceOrbitEntry,
|
|
85
|
+
type OrbitOptions,
|
|
86
|
+
type OrbitPole,
|
|
87
|
+
} from './pointGroups/orbits.js';
|
|
71
88
|
export {
|
|
72
89
|
rotateTensor,
|
|
73
90
|
tensorForm,
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crystal forms of the crystal classes, in the ITC convention: for each Wyckoff position the basic
|
|
3
|
+
* form and the limiting forms as ITA prints them, with the 47 forms of ITA Table 3.2.1.3
|
|
4
|
+
* (docs/conventions.md, "Crystal forms").
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { Vec3 } from '../linalg.js';
|
|
8
|
+
import type { PointGroupKey, SettingOptions } from './pointGroups.js';
|
|
9
|
+
import { ITA_FORMS, ITA_FORM_TYPES, type FormRow } from './crystalFormsData.js';
|
|
10
|
+
import {
|
|
11
|
+
REPRESENTATIVE_VALUES,
|
|
12
|
+
faceBasis,
|
|
13
|
+
itcSetting,
|
|
14
|
+
normal,
|
|
15
|
+
numericHkl,
|
|
16
|
+
permutationFromSetting1,
|
|
17
|
+
permutePattern,
|
|
18
|
+
printedEntry,
|
|
19
|
+
wyckoffPositions,
|
|
20
|
+
type Hkl,
|
|
21
|
+
} from './wyckoff.js';
|
|
22
|
+
|
|
23
|
+
/** One of the 47 crystal forms of ITA Table 3.2.1.3. */
|
|
24
|
+
export interface CrystalFormType {
|
|
25
|
+
/** ITA's number of the form, 1 to 47. */
|
|
26
|
+
readonly number: number;
|
|
27
|
+
/** ITA's English name of the form as printed, e.g. `Tetragonal prism`, `Sphenoid, dome, or dihedron`. */
|
|
28
|
+
readonly name: string;
|
|
29
|
+
/** Number of faces. */
|
|
30
|
+
readonly faces: number;
|
|
31
|
+
/**
|
|
32
|
+
* The eigensymmetry as printed: the point group of the form as a polyhedron, e.g. `4/mmm`, `-62m`;
|
|
33
|
+
* `∞m` for the pedion and `∞/mm` for the pinacoid.
|
|
34
|
+
*/
|
|
35
|
+
readonly eigensymmetry: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** One crystal form of a crystal class: a set of faces equivalent under the class. */
|
|
39
|
+
export interface CrystalForm {
|
|
40
|
+
/** ITA's letter of the Wyckoff position the faces belong to. */
|
|
41
|
+
readonly letter: string;
|
|
42
|
+
/** Number of faces: the multiplicity of the Wyckoff position. */
|
|
43
|
+
readonly multiplicity: number;
|
|
44
|
+
/** Oriented site-symmetry symbol of the Wyckoff position, e.g. `..m` (the face symmetry). */
|
|
45
|
+
readonly siteSymmetry: string;
|
|
46
|
+
/**
|
|
47
|
+
* True for a basic form, a form of lowest eigensymmetry of the position (two at the faces (hhl) of
|
|
48
|
+
* -43m and m-3m), false for a limiting form: its faces have the face symmetry of the position,
|
|
49
|
+
* but the form has a higher eigensymmetry (ITA 6th ed., § 3.2.1.2.2, p. 723).
|
|
50
|
+
*/
|
|
51
|
+
readonly basic: boolean;
|
|
52
|
+
/** The number of the form in `CRYSTAL_FORM_TYPES` (ITA Table 3.2.1.3), 1 to 47. */
|
|
53
|
+
readonly formType: number;
|
|
54
|
+
/**
|
|
55
|
+
* ITA's first face as printed, components separated by commas, e.g. `h,0,l`, or `h,h,-2h,l`
|
|
56
|
+
* (Bravais–Miller indices) for hexagonal axes; a leading `-` is an overbar.
|
|
57
|
+
*/
|
|
58
|
+
readonly millerIndices: string;
|
|
59
|
+
/** The condition ITA prints with the form, `|h|<|l|` or `|h|>|l|` (cubic forms (hhl)); absent otherwise. */
|
|
60
|
+
readonly condition?: string;
|
|
61
|
+
/**
|
|
62
|
+
* A face of the form with numbers: `millerIndices` with h = 3, k = 2, l = 1, and with h = 1, l = 3
|
|
63
|
+
* where the condition is `|h|<|l|`.
|
|
64
|
+
*/
|
|
65
|
+
readonly representative: {
|
|
66
|
+
/** The Miller indices (hkl) of the face. */
|
|
67
|
+
readonly hkl: Hkl;
|
|
68
|
+
/**
|
|
69
|
+
* Its face normal, a Cartesian unit vector. Monoclinic and triclinic: the normal for a, b, c along
|
|
70
|
+
* x, y, z (no cell angles), exact for the unique axis only.
|
|
71
|
+
*/
|
|
72
|
+
readonly cartesian: Vec3;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** The 47 crystal forms of ITA Table 3.2.1.3, in ITA's order: `CRYSTAL_FORM_TYPES[n - 1]` is form n. */
|
|
77
|
+
export const CRYSTAL_FORM_TYPES: readonly CrystalFormType[] = Object.freeze(
|
|
78
|
+
ITA_FORM_TYPES.map(([number, name, faces, eigensymmetry]) => Object.freeze({ number, name, faces, eigensymmetry })),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
/** h, k, l of the representative for the condition |h| < |l|. */
|
|
82
|
+
const SMALL_H = Object.freeze({ h: 1, k: 2, l: 3 });
|
|
83
|
+
|
|
84
|
+
const HKL = 'hkl';
|
|
85
|
+
|
|
86
|
+
/** The printed rows of a setting; for a setting ITA does not print, those of setting 1 carried into its frame. */
|
|
87
|
+
function printedRows(key: PointGroupKey, setting: number): readonly FormRow[] {
|
|
88
|
+
const entry = printedEntry(ITA_FORMS, key, setting);
|
|
89
|
+
if (entry) return entry.rows;
|
|
90
|
+
if (setting === 1) throw new Error(`Point group ${key}: no printed crystal forms for setting 1`);
|
|
91
|
+
const r = permutationFromSetting1(key, setting);
|
|
92
|
+
return printedRows(key, 1).map(([letter, basic, type, miller, condition]) => {
|
|
93
|
+
if (condition !== undefined) throw new Error(`Cannot carry the condition ${condition} into another setting`);
|
|
94
|
+
return [letter, basic, type, permutePattern(miller, r, HKL)];
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const cache = new Map<string, readonly CrystalForm[]>();
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The crystal forms of a crystal class in ITA's order: by Wyckoff position (general position
|
|
102
|
+
* first), each position's basic forms before its limiting forms, as ITA 6th ed. Table 3.2.3.2
|
|
103
|
+
* prints them. ITC convention only (throws a RangeError for `'birss'` and for a magnetic point
|
|
104
|
+
* group with time reversal), like the Wyckoff positions. For `mm2` settings 2 and 3 (`2mm`, `m2m`),
|
|
105
|
+
* which ITA does not print, the forms of setting 1 carried into their frame.
|
|
106
|
+
*/
|
|
107
|
+
export function crystalForms(key: PointGroupKey, options?: SettingOptions): readonly CrystalForm[] {
|
|
108
|
+
const setting = itcSetting(key, options, 'Crystal forms');
|
|
109
|
+
const cacheKey = `${key}#${setting}`;
|
|
110
|
+
let result = cache.get(cacheKey);
|
|
111
|
+
if (!result) {
|
|
112
|
+
const positions = wyckoffPositions(key, { convention: 'itc', setting });
|
|
113
|
+
const basis = faceBasis(key);
|
|
114
|
+
result = Object.freeze(
|
|
115
|
+
printedRows(key, setting).map(([letter, basic, formType, millerIndices, condition]) => {
|
|
116
|
+
const position = positions.find((p) => p.letter === letter);
|
|
117
|
+
if (!position) throw new Error(`Point group ${key}, setting ${setting}: no Wyckoff position ${letter}`);
|
|
118
|
+
if (CRYSTAL_FORM_TYPES[formType - 1].faces !== position.multiplicity) {
|
|
119
|
+
throw new Error(
|
|
120
|
+
`Point group ${key}, setting ${setting}: form ${formType} does not have the multiplicity of position ${letter}`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
const values = condition === '|h|<|l|' ? SMALL_H : REPRESENTATIVE_VALUES;
|
|
124
|
+
const hkl = numericHkl(millerIndices, values);
|
|
125
|
+
return Object.freeze({
|
|
126
|
+
letter,
|
|
127
|
+
multiplicity: position.multiplicity,
|
|
128
|
+
siteSymmetry: position.siteSymmetry,
|
|
129
|
+
basic,
|
|
130
|
+
formType,
|
|
131
|
+
millerIndices,
|
|
132
|
+
...(condition === undefined ? {} : { condition }),
|
|
133
|
+
representative: Object.freeze({
|
|
134
|
+
hkl: Object.freeze(hkl) as Hkl,
|
|
135
|
+
cartesian: Object.freeze(normal(basis, hkl)) as Vec3,
|
|
136
|
+
}),
|
|
137
|
+
});
|
|
138
|
+
}),
|
|
139
|
+
);
|
|
140
|
+
cache.set(cacheKey, result);
|
|
141
|
+
}
|
|
142
|
+
return result;
|
|
143
|
+
}
|