symcrys 0.2.0 → 0.3.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.
- package/README.md +11 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/pointGroups/wyckoff.d.ts +53 -0
- package/dist/pointGroups/wyckoff.d.ts.map +1 -0
- package/dist/pointGroups/wyckoff.js +189 -0
- package/dist/pointGroups/wyckoff.js.map +1 -0
- package/dist/pointGroups/wyckoffData.d.ts +24 -0
- package/dist/pointGroups/wyckoffData.d.ts.map +1 -0
- package/dist/pointGroups/wyckoffData.js +423 -0
- package/dist/pointGroups/wyckoffData.js.map +1 -0
- package/dist/siteSymmetry.d.ts +46 -0
- package/dist/siteSymmetry.d.ts.map +1 -0
- package/dist/siteSymmetry.js +124 -0
- package/dist/siteSymmetry.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/src/index.ts +8 -0
- package/src/pointGroups/wyckoff.ts +233 -0
- package/src/pointGroups/wyckoffData.ts +437 -0
- package/src/siteSymmetry.ts +166 -0
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,15 @@ npm install symcrys
|
|
|
41
41
|
Each release on GitHub also carries the package as `symcrys-X.Y.Z.tgz`.
|
|
42
42
|
|
|
43
43
|
```ts
|
|
44
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
describeOperations,
|
|
46
|
+
operations,
|
|
47
|
+
settings,
|
|
48
|
+
symbol,
|
|
49
|
+
symmetryDirections,
|
|
50
|
+
wyckoffPositionOf,
|
|
51
|
+
wyckoffPositions,
|
|
52
|
+
} from 'symcrys';
|
|
45
53
|
|
|
46
54
|
symbol('32'); // '321': ITC short symbol of the default setting
|
|
47
55
|
symbol('32', { convention: 'birss' }); // '32'
|
|
@@ -49,6 +57,8 @@ settings('32'); // setting 1: 312, setting 2: 321 (the ITC default)
|
|
|
49
57
|
operations('-3m'); // 12 operations, Cartesian matrices; x ∥ a, z ∥ c
|
|
50
58
|
describeOperations('4')[2]; // { kind: 'rotation', order: 4, sense: '+', axis: { lattice: [0, 0, 1], … } }
|
|
51
59
|
symmetryDirections('4mm')[1]; // position 2: symbol 'm', directions [100] and [010], each with a mirror
|
|
60
|
+
wyckoffPositions('4mm')[2]; // { letter: 'b', multiplicity: 4, siteSymmetry: '..m', millerIndices: 'h,h,l', … }
|
|
61
|
+
wyckoffPositionOf('4mm', [0, 0, -1]).letter; // 'a'
|
|
52
62
|
```
|
|
53
63
|
|
|
54
64
|
Conventions, frames and symbols: [`docs/conventions.md`](docs/conventions.md).
|
package/dist/index.d.ts
CHANGED
|
@@ -10,4 +10,6 @@ export { POINT_GROUP_KEYS, findPointGroup, generators, isPointGroupKey, operatio
|
|
|
10
10
|
export { isCentrosymmetric, isChiral, isPolar, laueClass } from './pointGroups/properties.js';
|
|
11
11
|
export { LATTICE_SYMMETRY_DIRECTIONS, type Uvw } from './symmetryDirections.js';
|
|
12
12
|
export { describeOperations, symmetryDirections, type Axis, type DirectionElements, type OperationDescription, type OperationKind, type SymmetryDirection, } from './pointGroups/elements.js';
|
|
13
|
+
export { siteSymmetry, type SiteSymmetry, type SiteSymmetryOptions } from './siteSymmetry.js';
|
|
14
|
+
export { wyckoffPositionOf, wyckoffPositions, type Hkl, type WyckoffOptions, type WyckoffPosition, } from './pointGroups/wyckoff.js';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iB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EACf,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,KAAK,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,IAAI,EACT,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,4 +8,6 @@ export { POINT_GROUP_KEYS, findPointGroup, generators, isPointGroupKey, operatio
|
|
|
8
8
|
export { isCentrosymmetric, isChiral, isPolar, laueClass } from './pointGroups/properties.js';
|
|
9
9
|
export { LATTICE_SYMMETRY_DIRECTIONS } from './symmetryDirections.js';
|
|
10
10
|
export { describeOperations, symmetryDirections, } from './pointGroups/elements.js';
|
|
11
|
+
export { siteSymmetry } from './siteSymmetry.js';
|
|
12
|
+
export { wyckoffPositionOf, wyckoffPositions, } from './pointGroups/wyckoff.js';
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EACL,aAAa,EACb,YAAY,GAIb,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,MAAM,GASP,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAY,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAMnB,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EACL,aAAa,EACb,YAAY,GAIb,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,MAAM,GASP,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAY,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAMnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAA+C,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GAIjB,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wyckoff positions of the crystal classes for directions (face normals), in the ITC convention:
|
|
3
|
+
* ITA's letters, multiplicities and oriented site-symmetry symbols, a representative face, and the
|
|
4
|
+
* Wyckoff position of any direction (docs/conventions.md, "Site symmetry and Wyckoff positions").
|
|
5
|
+
*/
|
|
6
|
+
import { type Vec3 } from '../linalg.js';
|
|
7
|
+
import { type PointGroupKey, type SettingOptions } from './pointGroups.js';
|
|
8
|
+
import { type SiteSymmetryOptions } from '../siteSymmetry.js';
|
|
9
|
+
/** A face (hkl): three Miller indices in the conventional basis (for hexagonal axes without i = −(h + k)). */
|
|
10
|
+
export type Hkl = readonly [number, number, number];
|
|
11
|
+
/** One Wyckoff position of a point group for directions. */
|
|
12
|
+
export interface WyckoffPosition {
|
|
13
|
+
/** ITA's Wyckoff letter. */
|
|
14
|
+
readonly letter: string;
|
|
15
|
+
/** Number of equivalent directions (faces of the form). */
|
|
16
|
+
readonly multiplicity: number;
|
|
17
|
+
/** Oriented site-symmetry symbol as ITA prints it, e.g. `..m`, `4m.m`, `1`. */
|
|
18
|
+
readonly siteSymmetry: string;
|
|
19
|
+
/** ITA's representative point as printed, e.g. `x,x,z` (a leading `-` is an overbar). */
|
|
20
|
+
readonly coordinates: string;
|
|
21
|
+
/**
|
|
22
|
+
* ITA's representative face as printed, components separated by commas, e.g. `h,h,l`, or
|
|
23
|
+
* `h,h,-2h,l` (Bravais–Miller indices) for hexagonal axes.
|
|
24
|
+
*/
|
|
25
|
+
readonly millerIndices: string;
|
|
26
|
+
/** A representative face with numbers: `millerIndices` with h = 3, k = 2, l = 1. */
|
|
27
|
+
readonly representative: {
|
|
28
|
+
readonly hkl: Hkl;
|
|
29
|
+
/**
|
|
30
|
+
* Its face normal, a Cartesian unit vector. Monoclinic and triclinic: the normal for a, b, c along
|
|
31
|
+
* x, y, z (no cell angles), exact for the unique axis only, but with the correct site symmetry.
|
|
32
|
+
*/
|
|
33
|
+
readonly cartesian: Vec3;
|
|
34
|
+
};
|
|
35
|
+
/** Indices into `operations` (same setting, ITC convention) of the site symmetry of the representative. */
|
|
36
|
+
readonly siteSymmetryOperations: readonly number[];
|
|
37
|
+
}
|
|
38
|
+
export type WyckoffOptions = SettingOptions & SiteSymmetryOptions;
|
|
39
|
+
/**
|
|
40
|
+
* The Wyckoff positions of a point group for directions, in ITA's printed order (general position
|
|
41
|
+
* first), in the ITC convention only (throws a RangeError for `'birss'`). The point at the origin
|
|
42
|
+
* (letter o) is not a direction and is left out. For `mm2` settings 2 and 3 (`2mm`, `m2m`), which
|
|
43
|
+
* ITA does not print, the positions of setting 1 carried into their frame.
|
|
44
|
+
*/
|
|
45
|
+
export declare function wyckoffPositions(key: PointGroupKey, options?: SettingOptions): readonly WyckoffPosition[];
|
|
46
|
+
/**
|
|
47
|
+
* The Wyckoff position of a direction (any non-zero Cartesian vector) in a point group, ITC
|
|
48
|
+
* convention only: the position whose representative has a site symmetry conjugate to that of the
|
|
49
|
+
* direction (ITA's definition). `tolerance` as for `siteSymmetry`; throws a RangeError if the
|
|
50
|
+
* operations found within it do not match any position (a tolerance too large).
|
|
51
|
+
*/
|
|
52
|
+
export declare function wyckoffPositionOf(key: PointGroupKey, direction: Vec3, options?: WyckoffOptions): WyckoffPosition;
|
|
53
|
+
//# sourceMappingURL=wyckoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wyckoff.d.ts","sourceRoot":"","sources":["../../src/pointGroups/wyckoff.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAwC,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAG/E,OAAO,EAAwB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAA+B,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG3F,8GAA8G;AAC9G,MAAM,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,oFAAoF;IACpF,QAAQ,CAAC,cAAc,EAAE;QACvB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;QAClB;;;WAGG;QACH,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;KAC1B,CAAC;IACF,2GAA2G;IAC3G,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;CACpD;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,mBAAmB,CAAC;AAqHlE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,eAAe,EAAE,CAwCzG;AAID;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,eAAe,CAehH"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wyckoff positions of the crystal classes for directions (face normals), in the ITC convention:
|
|
3
|
+
* ITA's letters, multiplicities and oriented site-symmetry symbols, a representative face, and the
|
|
4
|
+
* Wyckoff position of any direction (docs/conventions.md, "Site symmetry and Wyckoff positions").
|
|
5
|
+
*/
|
|
6
|
+
import { apply, inverse, transpose } from '../linalg.js';
|
|
7
|
+
import { crystalFamily, latticeBasis } from '../lattice.js';
|
|
8
|
+
import { POINT_GROUP_DATA } from './data.js';
|
|
9
|
+
import { operations, settings } from './pointGroups.js';
|
|
10
|
+
import { siteSymmetry, siteTolerance } from '../siteSymmetry.js';
|
|
11
|
+
import { ITA_WYCKOFF } from './wyckoffData.js';
|
|
12
|
+
/** The values substituted into ITA's Miller indices for the numeric representative. */
|
|
13
|
+
const VALUES = { h: 3, k: 2, l: 1 };
|
|
14
|
+
/** One printed index (`h`, `-2h`, `0`, `1`) as a number. */
|
|
15
|
+
function index(component) {
|
|
16
|
+
const m = /^(-?)(\d*)([hkil]?)$/.exec(component);
|
|
17
|
+
if (!m || (m[2] === '' && m[3] === ''))
|
|
18
|
+
throw new Error(`Unreadable Miller index: ${component}`);
|
|
19
|
+
const sign = m[1] ? -1 : 1;
|
|
20
|
+
const factor = m[2] === '' ? 1 : Number(m[2]);
|
|
21
|
+
if (m[3] === '')
|
|
22
|
+
return sign * factor;
|
|
23
|
+
if (m[3] === 'i')
|
|
24
|
+
return sign * factor * -(VALUES.h + VALUES.k);
|
|
25
|
+
return sign * factor * VALUES[m[3]];
|
|
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);
|
|
30
|
+
if (parts.length === 3)
|
|
31
|
+
return [parts[0], parts[1], parts[2]];
|
|
32
|
+
if (parts.length === 4 && parts[2] === -(parts[0] + parts[1]))
|
|
33
|
+
return [parts[0], parts[1], parts[3]];
|
|
34
|
+
throw new Error(`Unreadable Miller indices: ${miller}`);
|
|
35
|
+
}
|
|
36
|
+
const IDENTITY = [
|
|
37
|
+
[1, 0, 0],
|
|
38
|
+
[0, 1, 0],
|
|
39
|
+
[0, 0, 1],
|
|
40
|
+
];
|
|
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) {
|
|
43
|
+
const v = apply(transpose(inverse(basis)), hkl);
|
|
44
|
+
const n = Math.hypot(v[0], v[1], v[2]);
|
|
45
|
+
return [v[0] / n, v[1] / n, v[2] / n];
|
|
46
|
+
}
|
|
47
|
+
const XYZ = 'xyz';
|
|
48
|
+
const HKL = 'hkl';
|
|
49
|
+
/**
|
|
50
|
+
* A printed pattern carried by a signed permutation r of the axes (new axis i = r[i][j] × old axis j).
|
|
51
|
+
* Only for components that are `0`, a number, or a plain letter with an optional `-` (as in `mm2`); a
|
|
52
|
+
* letter is renamed after its new position. A factor such as `2x` throws.
|
|
53
|
+
*/
|
|
54
|
+
function permutePattern(pattern, r, letters) {
|
|
55
|
+
const old = pattern.split(',');
|
|
56
|
+
if (old.length !== 3)
|
|
57
|
+
throw new Error(`Cannot carry ${pattern} into another setting`);
|
|
58
|
+
return [0, 1, 2]
|
|
59
|
+
.map((i) => {
|
|
60
|
+
const j = [0, 1, 2].find((k) => Math.abs(r[i][k]) === 1);
|
|
61
|
+
if (j === undefined)
|
|
62
|
+
throw new Error('Not a signed permutation');
|
|
63
|
+
const c = old[j];
|
|
64
|
+
if (c === '0')
|
|
65
|
+
return '0';
|
|
66
|
+
const negative = c.startsWith('-') !== r[i][j] < 0;
|
|
67
|
+
const body = c.replace(/^-/, '');
|
|
68
|
+
if (!/^(\d+|[a-z])$/.test(body))
|
|
69
|
+
throw new Error(`Cannot carry ${pattern} into another setting`);
|
|
70
|
+
const renamed = /^\d+$/.test(body) ? body : letters[i];
|
|
71
|
+
return (negative ? '-' : '') + renamed;
|
|
72
|
+
})
|
|
73
|
+
.join(',');
|
|
74
|
+
}
|
|
75
|
+
/** An oriented site-symmetry symbol with three positions, carried by r: new position i is old position j. */
|
|
76
|
+
function permuteSymbol(symbolText, r) {
|
|
77
|
+
if (symbolText === '1')
|
|
78
|
+
return symbolText;
|
|
79
|
+
if (symbolText.length !== 3)
|
|
80
|
+
throw new Error(`Cannot carry ${symbolText} into another setting`);
|
|
81
|
+
return [0, 1, 2].map((i) => symbolText[[0, 1, 2].find((k) => Math.abs(r[i][k]) === 1) ?? -1]).join('');
|
|
82
|
+
}
|
|
83
|
+
function isSignedPermutation(r) {
|
|
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
|
+
}
|
|
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, setting) {
|
|
88
|
+
const s = settings(key, 'itc')[setting - 1];
|
|
89
|
+
const entry = ITA_WYCKOFF.find((e) => e.symbol === s.symbol && (e.uniqueAxis === undefined || e.uniqueAxis === s.uniqueAxis));
|
|
90
|
+
if (entry)
|
|
91
|
+
return entry.rows;
|
|
92
|
+
if (setting === 1)
|
|
93
|
+
throw new Error(`Point group ${key}: no printed Wyckoff positions for setting 1`);
|
|
94
|
+
const d = POINT_GROUP_DATA.find((x) => x.key === key);
|
|
95
|
+
if (!d)
|
|
96
|
+
throw new RangeError(`Unknown point group key: ${JSON.stringify(key)}`);
|
|
97
|
+
const f1 = d.settings[0].frame;
|
|
98
|
+
const fk = d.settings[setting - 1].frame;
|
|
99
|
+
const raw = fk.map((row) => [0, 1, 2].map((j) => row[0] * f1[j][0] + row[1] * f1[j][1] + row[2] * f1[j][2]));
|
|
100
|
+
const r = raw.map((row) => row.map((v) => Math.round(v)));
|
|
101
|
+
if (!isSignedPermutation(raw) ||
|
|
102
|
+
!raw.every((row, i) => row.every((v, j) => Math.abs(v - r[i][j]) < 1e-9))) {
|
|
103
|
+
throw new Error(`Point group ${key}, setting ${setting}: frame is not a permutation of setting 1`);
|
|
104
|
+
}
|
|
105
|
+
return printedRows(key, 1).map(([letter, mult, site, coords, miller]) => [
|
|
106
|
+
letter,
|
|
107
|
+
mult,
|
|
108
|
+
permuteSymbol(site, r),
|
|
109
|
+
permutePattern(coords, r, XYZ),
|
|
110
|
+
miller === '' ? '' : permutePattern(miller, r, HKL),
|
|
111
|
+
]);
|
|
112
|
+
}
|
|
113
|
+
const cache = new Map();
|
|
114
|
+
function itcSetting(key, options) {
|
|
115
|
+
if ((options?.convention ?? 'itc') !== 'itc') {
|
|
116
|
+
throw new RangeError("Wyckoff positions exist in the ITC convention only (convention 'itc')");
|
|
117
|
+
}
|
|
118
|
+
const list = settings(key, 'itc');
|
|
119
|
+
const index = options?.setting ?? list.find((s) => s.isDefault)?.index ?? 1;
|
|
120
|
+
operations(key, { convention: 'itc', setting: index }); // validates the setting index
|
|
121
|
+
return index;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The Wyckoff positions of a point group for directions, in ITA's printed order (general position
|
|
125
|
+
* first), in the ITC convention only (throws a RangeError for `'birss'`). The point at the origin
|
|
126
|
+
* (letter o) is not a direction and is left out. For `mm2` settings 2 and 3 (`2mm`, `m2m`), which
|
|
127
|
+
* ITA does not print, the positions of setting 1 carried into their frame.
|
|
128
|
+
*/
|
|
129
|
+
export function wyckoffPositions(key, options) {
|
|
130
|
+
const setting = itcSetting(key, options);
|
|
131
|
+
const cacheKey = `${key}#${setting}`;
|
|
132
|
+
let result = cache.get(cacheKey);
|
|
133
|
+
if (!result) {
|
|
134
|
+
const ops = operations(key, { convention: 'itc', setting });
|
|
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
|
+
// Monoclinic and triclinic: a, b, c along x, y, z (docs/conventions.md, "Site symmetry and Wyckoff positions").
|
|
140
|
+
const basis = family === 'monoclinic' || family === 'triclinic' ? IDENTITY : latticeBasis(family);
|
|
141
|
+
result = Object.freeze(printedRows(key, setting)
|
|
142
|
+
.filter(([letter]) => letter !== 'o')
|
|
143
|
+
.map(([letter, multiplicity, site, coordinates, millerIndices]) => {
|
|
144
|
+
const hkl = numericHkl(millerIndices);
|
|
145
|
+
const cartesian = normal(basis, hkl);
|
|
146
|
+
const stab = siteSymmetry(ops, cartesian);
|
|
147
|
+
if (stab.multiplicity !== multiplicity) {
|
|
148
|
+
throw new Error(`Point group ${key}, setting ${setting}, position ${letter}: multiplicity differs from print`);
|
|
149
|
+
}
|
|
150
|
+
return Object.freeze({
|
|
151
|
+
letter,
|
|
152
|
+
multiplicity,
|
|
153
|
+
siteSymmetry: site,
|
|
154
|
+
coordinates,
|
|
155
|
+
millerIndices,
|
|
156
|
+
representative: Object.freeze({
|
|
157
|
+
hkl: Object.freeze(hkl),
|
|
158
|
+
cartesian: Object.freeze(cartesian),
|
|
159
|
+
}),
|
|
160
|
+
siteSymmetryOperations: stab.operations,
|
|
161
|
+
});
|
|
162
|
+
}));
|
|
163
|
+
cache.set(cacheKey, result);
|
|
164
|
+
}
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
const sortedKey = (list) => [...list].sort((a, b) => a - b).join(',');
|
|
168
|
+
/**
|
|
169
|
+
* The Wyckoff position of a direction (any non-zero Cartesian vector) in a point group, ITC
|
|
170
|
+
* convention only: the position whose representative has a site symmetry conjugate to that of the
|
|
171
|
+
* direction (ITA's definition). `tolerance` as for `siteSymmetry`; throws a RangeError if the
|
|
172
|
+
* operations found within it do not match any position (a tolerance too large).
|
|
173
|
+
*/
|
|
174
|
+
export function wyckoffPositionOf(key, direction, options) {
|
|
175
|
+
const tolerance = siteTolerance(options);
|
|
176
|
+
const setting = itcSetting(key, options);
|
|
177
|
+
const ops = operations(key, { convention: 'itc', setting });
|
|
178
|
+
const rows = wyckoffPositions(key, { convention: 'itc', setting });
|
|
179
|
+
const site = siteSymmetry(ops, direction, { tolerance });
|
|
180
|
+
const candidates = rows.filter((r) => r.siteSymmetryOperations.length === site.operations.length);
|
|
181
|
+
for (const g of ops) {
|
|
182
|
+
const k = sortedKey(siteSymmetry(ops, apply(g.matrix, site.direction), { tolerance }).operations);
|
|
183
|
+
const row = candidates.find((r) => sortedKey(r.siteSymmetryOperations) === k);
|
|
184
|
+
if (row)
|
|
185
|
+
return row;
|
|
186
|
+
}
|
|
187
|
+
throw new RangeError(`Point group ${key}, setting ${setting}: no Wyckoff position for ${JSON.stringify(direction)} (tolerance too large?)`);
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=wyckoff.js.map
|
|
@@ -0,0 +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,EAAE,UAAU,EAAE,QAAQ,EAA2C,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,aAAa,EAA4B,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAmB,MAAM,kBAAkB,CAAC;AAmChE,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,SAAS,CAAC,CAAC;IACjD,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,SAAS,EAAE,CAAC,CAAC;IACjG,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,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,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;QACpB,MAAM,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC;QAClG,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9E,IAAI,GAAG;YAAE,OAAO,GAAG,CAAC;IACtB,CAAC;IACD,MAAM,IAAI,UAAU,CAClB,eAAe,GAAG,aAAa,OAAO,6BAA6B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,yBAAyB,CACtH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Wyckoff positions of the crystal classes as ITA prints them (6th ed., 2016, Table 3.2.3.2,
|
|
3
|
+
* pp. 745–769), one entry per printed setting: letter, multiplicity, oriented site-symmetry symbol,
|
|
4
|
+
* the first coordinate triplet and the Miller indices of the first face. The same rows are in
|
|
5
|
+
* references/itc/vol-a-table-3.2.3.2-wyckoff-positions.md, which the reference test re-parses and
|
|
6
|
+
* compares with this file; change both only by transcription from print.
|
|
7
|
+
*
|
|
8
|
+
* Notation: a leading `-` is an overbar; components separated by commas; Bravais–Miller indices
|
|
9
|
+
* (four components) for hexagonal axes. The origin (letter o) has no face (`''`).
|
|
10
|
+
*/
|
|
11
|
+
/** [letter, multiplicity, oriented site symmetry, coordinates, Miller indices]. */
|
|
12
|
+
export type WyckoffRow = readonly [string, number, string, string, string];
|
|
13
|
+
export interface WyckoffEntry {
|
|
14
|
+
/** ITC short symbol of the setting as in the headline of the entry. */
|
|
15
|
+
readonly symbol: string;
|
|
16
|
+
/** Monoclinic: the unique axis of the entry. */
|
|
17
|
+
readonly uniqueAxis?: 'b' | 'c';
|
|
18
|
+
/** Printed page. */
|
|
19
|
+
readonly page: number;
|
|
20
|
+
/** In printed order, general position first. */
|
|
21
|
+
readonly rows: readonly WyckoffRow[];
|
|
22
|
+
}
|
|
23
|
+
export declare const ITA_WYCKOFF: readonly WyckoffEntry[];
|
|
24
|
+
//# sourceMappingURL=wyckoffData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wyckoffData.d.ts","sourceRoot":"","sources":["../../src/pointGroups/wyckoffData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,mFAAmF;AACnF,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3E,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IAChC,oBAAoB;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,YAAY,EA2Z9C,CAAC"}
|