symcrys 0.6.0 → 0.6.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 +3 -2
- package/dist/crystalClasses.d.ts +12 -1
- package/dist/crystalClasses.d.ts.map +1 -1
- package/dist/crystalClasses.js +1 -1
- package/dist/crystalClasses.js.map +1 -1
- package/dist/lattice.d.ts +5 -1
- package/dist/lattice.d.ts.map +1 -1
- package/dist/lattice.js +3 -1
- package/dist/lattice.js.map +1 -1
- package/dist/magnetic.d.ts +1 -0
- package/dist/magnetic.d.ts.map +1 -1
- package/dist/magnetic.js.map +1 -1
- package/dist/operations.d.ts +2 -0
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js.map +1 -1
- package/dist/pointGroups/data.d.ts +2 -1
- package/dist/pointGroups/data.d.ts.map +1 -1
- package/dist/pointGroups/data.js.map +1 -1
- package/dist/pointGroups/elements.d.ts +4 -1
- package/dist/pointGroups/elements.d.ts.map +1 -1
- package/dist/pointGroups/elements.js +1 -1
- package/dist/pointGroups/elements.js.map +1 -1
- package/dist/pointGroups/magneticData.d.ts +6 -1
- package/dist/pointGroups/magneticData.d.ts.map +1 -1
- package/dist/pointGroups/magneticData.js +4 -0
- package/dist/pointGroups/magneticData.js.map +1 -1
- package/dist/pointGroups/pointGroups.d.ts +10 -2
- package/dist/pointGroups/pointGroups.d.ts.map +1 -1
- package/dist/pointGroups/pointGroups.js +2 -2
- package/dist/pointGroups/pointGroups.js.map +1 -1
- package/dist/pointGroups/wyckoff.d.ts +2 -0
- package/dist/pointGroups/wyckoff.d.ts.map +1 -1
- package/dist/pointGroups/wyckoff.js.map +1 -1
- package/dist/siteSymmetry.d.ts +2 -1
- package/dist/siteSymmetry.d.ts.map +1 -1
- package/dist/siteSymmetry.js.map +1 -1
- package/dist/tensors/propertyTable.d.ts +12 -2
- package/dist/tensors/propertyTable.d.ts.map +1 -1
- package/dist/tensors/propertyTable.js +11 -2
- package/dist/tensors/propertyTable.js.map +1 -1
- package/dist/tensors/tensorForm.d.ts +6 -1
- package/dist/tensors/tensorForm.d.ts.map +1 -1
- package/dist/tensors/tensorForm.js +1 -1
- package/dist/tensors/tensorForm.js.map +1 -1
- package/dist/version.d.ts +6 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +6 -2
- package/dist/version.js.map +1 -1
- package/package.json +2 -2
- package/src/crystalClasses.ts +18 -3
- package/src/lattice.ts +5 -1
- package/src/magnetic.ts +1 -0
- package/src/operations.ts +2 -0
- package/src/pointGroups/data.ts +4 -1
- package/src/pointGroups/elements.ts +4 -1
- package/src/pointGroups/magneticData.ts +7 -1
- package/src/pointGroups/pointGroups.ts +10 -2
- package/src/pointGroups/wyckoff.ts +2 -0
- package/src/siteSymmetry.ts +2 -1
- package/src/tensors/propertyTable.ts +12 -2
- package/src/tensors/tensorForm.ts +6 -1
- package/src/version.ts +6 -2
package/src/crystalClasses.ts
CHANGED
|
@@ -30,6 +30,7 @@ const USE_MAGNETIC =
|
|
|
30
30
|
|
|
31
31
|
/** A point operation: an orthogonal Cartesian matrix (rotation, rotoinversion, mirror, inversion). */
|
|
32
32
|
export interface Operation {
|
|
33
|
+
/** The orthogonal Cartesian 3×3 matrix, rows first. */
|
|
33
34
|
readonly matrix: Mat3;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -38,7 +39,9 @@ export interface Operation {
|
|
|
38
39
|
* the setting or the convention (docs/conventions.md, "Properties").
|
|
39
40
|
*/
|
|
40
41
|
export interface PointGroup {
|
|
42
|
+
/** The key (docs/conventions.md, "Keys"). */
|
|
41
43
|
readonly key: PointGroupKey;
|
|
44
|
+
/** The crystal system. */
|
|
42
45
|
readonly crystalSystem: CrystalSystem;
|
|
43
46
|
/** Number of operations. */
|
|
44
47
|
readonly order: number;
|
|
@@ -54,7 +57,9 @@ export interface PointGroup {
|
|
|
54
57
|
|
|
55
58
|
/** A crystal class in a given setting. */
|
|
56
59
|
export interface PointGroupInSetting {
|
|
60
|
+
/** The key of the crystal class. */
|
|
57
61
|
readonly key: PointGroupKey;
|
|
62
|
+
/** The 1-based index of the setting. */
|
|
58
63
|
readonly setting: number;
|
|
59
64
|
}
|
|
60
65
|
|
|
@@ -63,8 +68,11 @@ export type OperationDescription = Omit<elements.OperationDescription, 'timeReve
|
|
|
63
68
|
|
|
64
69
|
/** The kind of tensor. */
|
|
65
70
|
export interface TensorSpec {
|
|
71
|
+
/** Number of indices, 0 to 4. */
|
|
66
72
|
readonly rank: TensorRank;
|
|
73
|
+
/** `'polar'` or `'axial'`: whether an improper operation changes the sign (factor det R). */
|
|
67
74
|
readonly parity: TensorParity;
|
|
75
|
+
/** The index symmetry of the tensor. */
|
|
68
76
|
readonly intrinsic: IntrinsicSymmetry;
|
|
69
77
|
}
|
|
70
78
|
|
|
@@ -73,11 +81,18 @@ export interface TensorSpec {
|
|
|
73
81
|
* operation of the magnetic API without time reversal can be handed on from plain JavaScript; with
|
|
74
82
|
* `timeReversal: true` it is refused, at compile time and at run time.
|
|
75
83
|
*/
|
|
76
|
-
type OperationArgument = Operation & {
|
|
84
|
+
type OperationArgument = Operation & {
|
|
85
|
+
/** Accepted if false; an operation with time reversal belongs to the magnetic API. */
|
|
86
|
+
readonly timeReversal?: false;
|
|
87
|
+
};
|
|
77
88
|
|
|
78
89
|
/** A tensor specification as a caller may pass it; `timeParity: 'i'` is accepted, `'c'` refused. */
|
|
79
|
-
type TensorSpecArgument = TensorSpec & {
|
|
90
|
+
type TensorSpecArgument = TensorSpec & {
|
|
91
|
+
/** Accepted if `'i'`; a time-odd tensor belongs to the magnetic API. */
|
|
92
|
+
readonly timeParity?: 'i';
|
|
93
|
+
};
|
|
80
94
|
|
|
95
|
+
/** A named property: the tensor that describes it, what it is and where it is defined. */
|
|
81
96
|
export interface TensorProperty {
|
|
82
97
|
/** The kind of tensor whose non-zero form means that the property is allowed. */
|
|
83
98
|
readonly spec: TensorSpec;
|
|
@@ -308,7 +323,7 @@ export function describeOperations(key: PointGroupKey, options?: SettingOptions)
|
|
|
308
323
|
* positions of the crystal family are listed, also those the symbol of the class leaves out (then
|
|
309
324
|
* without `symbol`); the triclinic family has none. The directions keep the sign of Table 2.1.3.1
|
|
310
325
|
* in both conventions; in the Birss convention an axis of `describeOperations` may be reversed, so
|
|
311
|
-
* match it to a direction
|
|
326
|
+
* match it to a direction whose dot product with it is ±1, not by identity.
|
|
312
327
|
*/
|
|
313
328
|
export function symmetryDirections(
|
|
314
329
|
key: PointGroupKey,
|
package/src/lattice.ts
CHANGED
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
import type { Mat3 } from './linalg.js';
|
|
7
7
|
|
|
8
|
+
/** One of the seven crystal systems. */
|
|
8
9
|
export type CrystalSystem =
|
|
9
10
|
'triclinic' | 'monoclinic' | 'orthorhombic' | 'tetragonal' | 'trigonal' | 'hexagonal' | 'cubic';
|
|
10
11
|
|
|
12
|
+
/** One of the six crystal families: the trigonal and the hexagonal system form the hexagonal family. */
|
|
11
13
|
export type CrystalFamily = 'triclinic' | 'monoclinic' | 'orthorhombic' | 'tetragonal' | 'hexagonal' | 'cubic';
|
|
12
14
|
|
|
13
15
|
/** The crystal family of a crystal system: trigonal and hexagonal form the hexagonal family. */
|
|
@@ -38,12 +40,14 @@ const HEXAGONAL = frozen([
|
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* The conventional basis vectors a, b, c as the **columns** of a Cartesian matrix, with unit edge
|
|
41
|
-
* lengths
|
|
43
|
+
* lengths. Hexagonal family (hexagonal axes): x ∥ a, z ∥ c, y = z × x, so b points at 120° from a.
|
|
42
44
|
* Orthorhombic, tetragonal, cubic: x ∥ a, y ∥ b, z ∥ c.
|
|
43
45
|
*
|
|
44
46
|
* The edge lengths are set to 1 because the symmetry directions of these families, and so the
|
|
45
47
|
* point operations, do not depend on them. For a direction [uvw] that is not a symmetry direction,
|
|
46
48
|
* scale the columns by the real edge lengths first.
|
|
49
|
+
*
|
|
50
|
+
* @remarks The matrix is frozen and shared between calls.
|
|
47
51
|
*/
|
|
48
52
|
export function latticeBasis(family: FixedAngleFamily): Mat3 {
|
|
49
53
|
switch (family) {
|
package/src/magnetic.ts
CHANGED
|
@@ -35,6 +35,7 @@ import type {
|
|
|
35
35
|
export type CrystalClassKey = ClassKey;
|
|
36
36
|
/** The key of a magnetic point group: a crystal class (white group), a grey or a black-and-white group. */
|
|
37
37
|
export type PointGroupKey = MagneticPointGroupKey;
|
|
38
|
+
/** A magnetic point group with the properties that are fixed by its operations (docs/conventions.md, "Properties"). */
|
|
38
39
|
export type PointGroup<K extends PointGroupKey = PointGroupKey> = PointGroupOf<K>;
|
|
39
40
|
/** A point group in a given setting. */
|
|
40
41
|
export type PointGroupInSetting = PointGroupInSettingOf<PointGroupKey>;
|
package/src/operations.ts
CHANGED
|
@@ -11,7 +11,9 @@ import { EPSILON } from './tolerances.js';
|
|
|
11
11
|
* combined with time reversal if `timeReversal` is true (a primed operation).
|
|
12
12
|
*/
|
|
13
13
|
export interface Operation {
|
|
14
|
+
/** The orthogonal Cartesian 3×3 matrix, rows first. */
|
|
14
15
|
readonly matrix: Mat3;
|
|
16
|
+
/** True if the operation is combined with time reversal (a primed operation). */
|
|
15
17
|
readonly timeReversal: boolean;
|
|
16
18
|
}
|
|
17
19
|
|
package/src/pointGroups/data.ts
CHANGED
|
@@ -47,7 +47,10 @@ export const POINT_GROUP_KEYS = Object.freeze([
|
|
|
47
47
|
'm-3m',
|
|
48
48
|
] as const);
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
/** The key of one of the 32 crystal classes (`POINT_GROUP_KEYS`). */
|
|
51
|
+
// `Extract<…, string>` is the same type; written so, the documentation (TypeDoc) names it instead of
|
|
52
|
+
// listing the 32 keys at every use.
|
|
53
|
+
export type PointGroupKey = Extract<(typeof POINT_GROUP_KEYS)[number], string>;
|
|
51
54
|
|
|
52
55
|
/** A symbol in one convention: the short symbol of the setting and the full symbol, positions separated by spaces. */
|
|
53
56
|
interface SymbolForms {
|
|
@@ -37,6 +37,7 @@ export interface Axis {
|
|
|
37
37
|
|
|
38
38
|
/** One point operation described geometrically. */
|
|
39
39
|
export interface OperationDescription {
|
|
40
|
+
/** What the operation is, without time reversal. */
|
|
40
41
|
readonly kind: OperationKind;
|
|
41
42
|
/**
|
|
42
43
|
* The n of the symbol n or n̄: 1 for the identity and the inversion, 2 for a mirror (m = 2̄),
|
|
@@ -50,6 +51,7 @@ export interface OperationDescription {
|
|
|
50
51
|
* from the tip of `axis` looking towards the origin), `'-'` if by −360°/n.
|
|
51
52
|
*/
|
|
52
53
|
readonly sense?: '+' | '-';
|
|
54
|
+
/** True if the operation is combined with time reversal (a primed operation). */
|
|
53
55
|
readonly timeReversal: boolean;
|
|
54
56
|
}
|
|
55
57
|
|
|
@@ -76,6 +78,7 @@ export interface SymmetryDirection {
|
|
|
76
78
|
* magnetic group with its primes (`4'/m`).
|
|
77
79
|
*/
|
|
78
80
|
readonly symbol?: string;
|
|
81
|
+
/** The symmetry directions of this position (ITA Table 2.1.3.1), each with the elements along it. */
|
|
79
82
|
readonly directions: readonly DirectionElements[];
|
|
80
83
|
}
|
|
81
84
|
|
|
@@ -273,7 +276,7 @@ export function describeOperations(
|
|
|
273
276
|
* positions of the crystal family are listed, also those the symbol of the class leaves out (then
|
|
274
277
|
* without `symbol`); the triclinic family has none. The directions keep the sign of Table 2.1.3.1
|
|
275
278
|
* in both conventions; in the Birss convention an axis of `describeOperations` may be reversed, so
|
|
276
|
-
* match it to a direction
|
|
279
|
+
* match it to a direction whose dot product with it is ±1, not by identity.
|
|
277
280
|
*/
|
|
278
281
|
export function symmetryDirections(key: MagneticPointGroupKey, options?: SettingOptions): readonly SymmetryDirection[] {
|
|
279
282
|
return analysis(key, options).directions;
|
|
@@ -112,11 +112,17 @@ export const BLACK_WHITE_POINT_GROUP_KEYS = Object.freeze([
|
|
|
112
112
|
"m'-3'm",
|
|
113
113
|
] as const);
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
/** The key of one of the 58 black-and-white magnetic point groups. */
|
|
116
|
+
// `Extract<…, string>`: the same type, named by the documentation (see `PointGroupKey`).
|
|
117
|
+
export type BlackWhitePointGroupKey = Extract<(typeof BLACK_WHITE_POINT_GROUP_KEYS)[number], string>;
|
|
116
118
|
|
|
117
119
|
/** Keys of all 122 magnetic point groups: the 32 crystal classes, the 32 grey groups, the 58 black-and-white groups. */
|
|
118
120
|
export type MagneticPointGroupKey = PointGroupKey | GreyPointGroupKey | BlackWhitePointGroupKey;
|
|
119
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Keys of the 122 magnetic point groups: the 32 crystal classes (white groups), the 32 grey groups
|
|
124
|
+
* and the 58 black-and-white groups, in this order (docs/conventions.md, "Keys").
|
|
125
|
+
*/
|
|
120
126
|
export const MAGNETIC_POINT_GROUP_KEYS: readonly MagneticPointGroupKey[] = Object.freeze([
|
|
121
127
|
...POINT_GROUP_KEYS,
|
|
122
128
|
...GREY_POINT_GROUP_KEYS,
|
|
@@ -45,13 +45,16 @@ export type PointGroupType = 'I' | 'II' | 'III';
|
|
|
45
45
|
* setting or the convention (docs/conventions.md, "Properties").
|
|
46
46
|
*/
|
|
47
47
|
export interface PointGroup<K extends MagneticPointGroupKey = PointGroupKey> {
|
|
48
|
+
/** The key (docs/conventions.md, "Keys"). */
|
|
48
49
|
readonly key: K;
|
|
50
|
+
/** `'I'` crystal class (white group), `'II'` grey group, `'III'` black-and-white group (docs/conventions.md, "Types"). */
|
|
49
51
|
readonly type: PointGroupType;
|
|
50
52
|
/**
|
|
51
53
|
* The crystal class of the group: the group itself for a class, otherwise the class it becomes
|
|
52
54
|
* when time reversal is dropped from every operation.
|
|
53
55
|
*/
|
|
54
56
|
readonly crystalClass: PointGroupKey;
|
|
57
|
+
/** The crystal system of the crystal class. */
|
|
55
58
|
readonly crystalSystem: CrystalSystem;
|
|
56
59
|
/** Number of operations. */
|
|
57
60
|
readonly order: number;
|
|
@@ -68,6 +71,7 @@ export interface PointGroup<K extends MagneticPointGroupKey = PointGroupKey> {
|
|
|
68
71
|
readonly laueClass: PointGroupKey;
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
/** A setting of a point group: an orientation of its symmetry directions in the Cartesian frame (docs/conventions.md, "Settings"). */
|
|
71
75
|
export interface Setting {
|
|
72
76
|
/** 1-based; the same physical frame in both conventions. */
|
|
73
77
|
readonly index: number;
|
|
@@ -86,6 +90,7 @@ export interface Setting {
|
|
|
86
90
|
readonly isDefault: boolean;
|
|
87
91
|
}
|
|
88
92
|
|
|
93
|
+
/** Which convention and which setting a function answers in. */
|
|
89
94
|
export interface SettingOptions {
|
|
90
95
|
/** Default `'itc'`. */
|
|
91
96
|
readonly convention?: Convention;
|
|
@@ -93,6 +98,7 @@ export interface SettingOptions {
|
|
|
93
98
|
readonly setting?: number;
|
|
94
99
|
}
|
|
95
100
|
|
|
101
|
+
/** Convention, setting and form of a symbol. */
|
|
96
102
|
export interface SymbolOptions extends SettingOptions {
|
|
97
103
|
/**
|
|
98
104
|
* `'short'` (default): short symbol of the setting, e.g. `321` (ITC) for class `32`.
|
|
@@ -475,7 +481,7 @@ export function pointGroups(): readonly PointGroup[] {
|
|
|
475
481
|
}
|
|
476
482
|
|
|
477
483
|
/**
|
|
478
|
-
* All 122 magnetic point groups, in the order of `
|
|
484
|
+
* All 122 magnetic point groups, in the order of `POINT_GROUP_KEYS` of the magnetic API: the 32 crystal
|
|
479
485
|
* classes (type I), the 32 grey groups (type II) in the same order, and the 58 black-and-white
|
|
480
486
|
* groups (type III) in the order of ITC Vol. D Table 1.5.2.3.
|
|
481
487
|
*/
|
|
@@ -528,7 +534,7 @@ export function operations(key: MagneticPointGroupKey, options?: SettingOptions)
|
|
|
528
534
|
* convention: ITA's selected generators in printed order, without the identity and ITA's lattice
|
|
529
535
|
* translations, so the list is empty for `1`; for `mm2` settings 2 and 3, which ITA does not list,
|
|
530
536
|
* those of setting 1 carried into their frame; for a magnetic group, those of its class with the
|
|
531
|
-
* time reversal they have in the group, for a grey group followed by 1'
|
|
537
|
+
* time reversal they have in the group, for a grey group followed by `1'`. Birss convention:
|
|
532
538
|
* birss-app's generators (for `1` the identity, as in birss-app).
|
|
533
539
|
*/
|
|
534
540
|
export function generators(key: MagneticPointGroupKey, options?: SettingOptions): readonly Operation[] {
|
|
@@ -550,7 +556,9 @@ export function symbol(key: MagneticPointGroupKey, options?: SymbolOptions): str
|
|
|
550
556
|
|
|
551
557
|
/** A point group in a given setting. */
|
|
552
558
|
export interface PointGroupInSetting<K extends MagneticPointGroupKey = PointGroupKey> {
|
|
559
|
+
/** The key of the point group. */
|
|
553
560
|
readonly key: K;
|
|
561
|
+
/** The 1-based index of the setting. */
|
|
554
562
|
readonly setting: number;
|
|
555
563
|
}
|
|
556
564
|
|
|
@@ -38,6 +38,7 @@ export interface WyckoffPosition {
|
|
|
38
38
|
readonly millerIndices: string;
|
|
39
39
|
/** A representative face with numbers: `millerIndices` with h = 3, k = 2, l = 1. */
|
|
40
40
|
readonly representative: {
|
|
41
|
+
/** The Miller indices (hkl) of the face. */
|
|
41
42
|
readonly hkl: Hkl;
|
|
42
43
|
/**
|
|
43
44
|
* Its face normal, a Cartesian unit vector. Monoclinic and triclinic: the normal for a, b, c along
|
|
@@ -49,6 +50,7 @@ export interface WyckoffPosition {
|
|
|
49
50
|
readonly siteSymmetryOperations: readonly number[];
|
|
50
51
|
}
|
|
51
52
|
|
|
53
|
+
/** Convention and setting (`SettingOptions`) and the tolerance of `siteSymmetry` (`SiteSymmetryOptions`). */
|
|
52
54
|
export type WyckoffOptions = SettingOptions & SiteSymmetryOptions;
|
|
53
55
|
|
|
54
56
|
/** The values substituted into ITA's Miller indices for the numeric representative. */
|
package/src/siteSymmetry.ts
CHANGED
|
@@ -7,10 +7,11 @@ import { apply, matricesEqual, multiply, type Vec3 } from './linalg.js';
|
|
|
7
7
|
import type { Operation } from './operations.js';
|
|
8
8
|
import { EPSILON } from './tolerances.js';
|
|
9
9
|
|
|
10
|
+
/** Options of `siteSymmetry` and `wyckoffPositionOf`. */
|
|
10
11
|
export interface SiteSymmetryOptions {
|
|
11
12
|
/**
|
|
12
13
|
* A direction counts as fixed by an operation if the operation moves its unit vector by less
|
|
13
|
-
* than this (Euclidean distance). Default
|
|
14
|
+
* than this (Euclidean distance). Default 10⁻⁶; a caller whose directions carry
|
|
14
15
|
* rounding errors (e.g. read from a rounded link) passes a larger value.
|
|
15
16
|
*/
|
|
16
17
|
readonly tolerance?: number;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import type { TensorSpec } from './tensorForm.js';
|
|
9
9
|
|
|
10
|
+
/** A named property: the tensor that describes it, what it is and where it is defined. */
|
|
10
11
|
export interface TensorProperty {
|
|
11
12
|
/** The kind of tensor whose non-zero form means that the property is allowed. */
|
|
12
13
|
readonly spec: TensorSpec;
|
|
@@ -20,40 +21,49 @@ const property = (spec: TensorSpec, description: string, source: string): Tensor
|
|
|
20
21
|
Object.freeze({ spec: Object.freeze(spec), description, source });
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
* The named tensor properties.
|
|
24
|
-
*
|
|
24
|
+
* The named tensor properties. For each name, the tensor that describes the property, what it is,
|
|
25
|
+
* and its print source. `'gyrotropic'` is optical activity.
|
|
26
|
+
*
|
|
27
|
+
* @remarks Names are adjectives, one lower-case word each (maintainer, 2026-11-19, #41).
|
|
25
28
|
*/
|
|
26
29
|
export const TENSOR_PROPERTIES = Object.freeze({
|
|
30
|
+
/** Spontaneous polarization: a time-even polar vector. */
|
|
27
31
|
pyroelectric: property(
|
|
28
32
|
{ rank: 1, parity: 'polar', timeParity: 'i', intrinsic: 'none' },
|
|
29
33
|
'Spontaneous electric polarization, which changes with temperature: a polar vector p_i.',
|
|
30
34
|
'ITC Vol. D (2013), § 1.1.4.4.2, p. 12; classes: ITA (2016) Table 3.2.2.1, p. 738',
|
|
31
35
|
),
|
|
36
|
+
/** Ferroaxial order: a time-even axial vector. */
|
|
32
37
|
ferroaxial: property(
|
|
33
38
|
{ rank: 1, parity: 'axial', timeParity: 'i', intrinsic: 'none' },
|
|
34
39
|
'Ferroaxial (ferro-rotational) order, e.g. a net rotation of structural units about an axis: an axial vector A_i.',
|
|
35
40
|
'Hlinka, Privratska, Ondrejkovic & Janovec, Phys. Rev. Lett. 116, 177602 (2016); classes: Birss (1966), Tables 4a and 4c, pp. 56–58',
|
|
36
41
|
),
|
|
42
|
+
/** The piezoelectric effect (and second-harmonic generation, which has the same tensor): polar, rank 3, symmetric in j, k. */
|
|
37
43
|
piezoelectric: property(
|
|
38
44
|
{ rank: 3, parity: 'polar', timeParity: 'i', intrinsic: 'jk' },
|
|
39
45
|
'Electric polarization linear in stress, P_i = d_ijk T_jk: a polar tensor of rank 3, symmetric in j, k.',
|
|
40
46
|
'ITC Vol. D (2013), § 1.1.4.4.3, p. 12; classes: ITA (2016) Table 3.2.2.1, p. 738',
|
|
41
47
|
),
|
|
48
|
+
/** Optical activity: the symmetric axial tensor of rank 2. */
|
|
42
49
|
gyrotropic: property(
|
|
43
50
|
{ rank: 2, parity: 'axial', timeParity: 'i', intrinsic: 'ij' },
|
|
44
51
|
'Optical activity (optical rotation), G = g_ij α_i α_j: the symmetric part of the axial gyration tensor of rank 2.',
|
|
45
52
|
'ITC Vol. D (2013), § 1.1.4.10.7.2, p. 30; classes: ITA (2016) Table 3.2.2.1, p. 738',
|
|
46
53
|
),
|
|
54
|
+
/** Spontaneous magnetization: a time-odd axial vector (magnetic API only). */
|
|
47
55
|
ferromagnetic: property(
|
|
48
56
|
{ rank: 1, parity: 'axial', timeParity: 'c', intrinsic: 'none' },
|
|
49
57
|
'Spontaneous magnetization M_s (ferromagnets, ferrimagnets, weak ferromagnets): an axial vector that changes sign under time reversal.',
|
|
50
58
|
'ITC Vol. D (2013), § 1.5.2.1 with Table 1.5.2.4, p. 113',
|
|
51
59
|
),
|
|
60
|
+
/** The linear magnetoelectric effect: a time-odd axial tensor of rank 2 (magnetic API only). */
|
|
52
61
|
magnetoelectric: property(
|
|
53
62
|
{ rank: 2, parity: 'axial', timeParity: 'c', intrinsic: 'none' },
|
|
54
63
|
'Linear magnetoelectric effect, P_i = α_ij H_j: an axial tensor of rank 2 that changes sign under time reversal.',
|
|
55
64
|
'ITC Vol. D (2013), § 1.5.8.1 with eqs. (1.5.8.2), (1.5.8.3) and Table 1.5.8.1, pp. 139–140',
|
|
56
65
|
),
|
|
66
|
+
/** The piezomagnetic effect: a time-odd axial tensor of rank 3, symmetric in j, k (magnetic API only). */
|
|
57
67
|
piezomagnetic: property(
|
|
58
68
|
{ rank: 3, parity: 'axial', timeParity: 'c', intrinsic: 'jk' },
|
|
59
69
|
'Magnetization linear in stress, M_i = Λ_ijk T_jk: an axial tensor of rank 3, symmetric in j, k, that changes sign under time reversal.',
|
|
@@ -38,9 +38,13 @@ export type IntrinsicSymmetry = 'none' | 'ij' | 'jk' | 'ij_kl' | 'voigt';
|
|
|
38
38
|
|
|
39
39
|
/** The kind of tensor, as in birss-app. */
|
|
40
40
|
export interface TensorSpec {
|
|
41
|
+
/** Number of indices, 0 to 4. */
|
|
41
42
|
readonly rank: TensorRank;
|
|
43
|
+
/** `'polar'` or `'axial'`: whether an improper operation changes the sign (factor det R). */
|
|
42
44
|
readonly parity: TensorParity;
|
|
45
|
+
/** `'i'` (time-even) or `'c'` (time-odd): whether time reversal changes the sign. */
|
|
43
46
|
readonly timeParity: TimeParity;
|
|
47
|
+
/** The index symmetry of the tensor. */
|
|
44
48
|
readonly intrinsic: IntrinsicSymmetry;
|
|
45
49
|
}
|
|
46
50
|
|
|
@@ -50,6 +54,7 @@ export interface TensorSpec {
|
|
|
50
54
|
* components has length 3^rank (flat index, see the module documentation).
|
|
51
55
|
*/
|
|
52
56
|
export interface TensorForm {
|
|
57
|
+
/** The rank of the tensor. */
|
|
53
58
|
readonly rank: TensorRank;
|
|
54
59
|
/**
|
|
55
60
|
* A basis of the allowed tensors in reduced row echelon form: one row per free parameter, with 1
|
|
@@ -241,7 +246,7 @@ export function tensorForm(
|
|
|
241
246
|
* surface normal (`siteSymmetry`) or the operations of a distorted crystal. The tensor is given by
|
|
242
247
|
* its specification or by the name of a property in `TENSOR_PROPERTIES`. The operations are
|
|
243
248
|
* Cartesian and orthogonal, and each says whether it is combined with time reversal
|
|
244
|
-
* (`timeReversal`, true or false); a list that is not closed is closed first.
|
|
249
|
+
* (`timeReversal`, `true` or `false`); a list that is not closed is closed first.
|
|
245
250
|
*/
|
|
246
251
|
export function tensorFormOf(operations: readonly Operation[], spec: TensorSpec | TensorPropertyName): TensorForm {
|
|
247
252
|
const resolved = specOf(spec);
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The version of symcrys, the same for the TypeScript and the Python package.
|
|
3
|
+
*
|
|
4
|
+
* @remarks Kept equal to `version` in package.json (checked by version.test.ts).
|
|
5
|
+
*/
|
|
6
|
+
export const VERSION = '0.6.1';
|