react-cheminfo 0.134.1 → 0.135.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.
Files changed (177) hide show
  1. package/README.md +13 -0
  2. package/lib/crystal/core/bondGrid.d.ts +26 -0
  3. package/lib/crystal/core/bondGrid.d.ts.map +1 -0
  4. package/lib/crystal/core/bondGrid.js +76 -0
  5. package/lib/crystal/core/bondGrid.js.map +1 -0
  6. package/lib/crystal/core/cellBonds.d.ts +21 -0
  7. package/lib/crystal/core/cellBonds.d.ts.map +1 -0
  8. package/lib/crystal/core/cellBonds.js +100 -0
  9. package/lib/crystal/core/cellBonds.js.map +1 -0
  10. package/lib/crystal/core/cif/element.d.ts +9 -0
  11. package/lib/crystal/core/cif/element.d.ts.map +1 -0
  12. package/lib/crystal/core/cif/element.js +41 -0
  13. package/lib/crystal/core/cif/element.js.map +1 -0
  14. package/lib/crystal/core/cif/index.d.ts +4 -0
  15. package/lib/crystal/core/cif/index.d.ts.map +1 -0
  16. package/lib/crystal/core/cif/index.js +3 -0
  17. package/lib/crystal/core/cif/index.js.map +1 -0
  18. package/lib/crystal/core/cif/number.d.ts +27 -0
  19. package/lib/crystal/core/cif/number.d.ts.map +1 -0
  20. package/lib/crystal/core/cif/number.js +57 -0
  21. package/lib/crystal/core/cif/number.js.map +1 -0
  22. package/lib/crystal/core/cif/read.d.ts +12 -0
  23. package/lib/crystal/core/cif/read.d.ts.map +1 -0
  24. package/lib/crystal/core/cif/read.js +183 -0
  25. package/lib/crystal/core/cif/read.js.map +1 -0
  26. package/lib/crystal/core/cif/readGeometry.d.ts +17 -0
  27. package/lib/crystal/core/cif/readGeometry.d.ts.map +1 -0
  28. package/lib/crystal/core/cif/readGeometry.js +93 -0
  29. package/lib/crystal/core/cif/readGeometry.js.map +1 -0
  30. package/lib/crystal/core/cif/tags.d.ts +62 -0
  31. package/lib/crystal/core/cif/tags.d.ts.map +1 -0
  32. package/lib/crystal/core/cif/tags.js +115 -0
  33. package/lib/crystal/core/cif/tags.js.map +1 -0
  34. package/lib/crystal/core/cif/types.d.ts +158 -0
  35. package/lib/crystal/core/cif/types.d.ts.map +1 -0
  36. package/lib/crystal/core/cif/types.js +2 -0
  37. package/lib/crystal/core/cif/types.js.map +1 -0
  38. package/lib/crystal/core/components.d.ts +56 -0
  39. package/lib/crystal/core/components.d.ts.map +1 -0
  40. package/lib/crystal/core/components.js +132 -0
  41. package/lib/crystal/core/components.js.map +1 -0
  42. package/lib/crystal/core/covalentRadii.d.ts +24 -0
  43. package/lib/crystal/core/covalentRadii.d.ts.map +1 -0
  44. package/lib/crystal/core/covalentRadii.js +55 -0
  45. package/lib/crystal/core/covalentRadii.js.map +1 -0
  46. package/lib/crystal/core/disorder.d.ts +59 -0
  47. package/lib/crystal/core/disorder.d.ts.map +1 -0
  48. package/lib/crystal/core/disorder.js +168 -0
  49. package/lib/crystal/core/disorder.js.map +1 -0
  50. package/lib/crystal/core/expand.d.ts +62 -0
  51. package/lib/crystal/core/expand.d.ts.map +1 -0
  52. package/lib/crystal/core/expand.js +61 -0
  53. package/lib/crystal/core/expand.js.map +1 -0
  54. package/lib/crystal/core/index.d.ts +18 -0
  55. package/lib/crystal/core/index.d.ts.map +1 -0
  56. package/lib/crystal/core/index.js +12 -0
  57. package/lib/crystal/core/index.js.map +1 -0
  58. package/lib/crystal/core/moleculeOf.d.ts +31 -0
  59. package/lib/crystal/core/moleculeOf.d.ts.map +1 -0
  60. package/lib/crystal/core/moleculeOf.js +128 -0
  61. package/lib/crystal/core/moleculeOf.js.map +1 -0
  62. package/lib/crystal/core/moleculeTypes.d.ts +80 -0
  63. package/lib/crystal/core/moleculeTypes.d.ts.map +1 -0
  64. package/lib/crystal/core/moleculeTypes.js +2 -0
  65. package/lib/crystal/core/moleculeTypes.js.map +1 -0
  66. package/lib/crystal/core/molecules.d.ts +39 -0
  67. package/lib/crystal/core/molecules.d.ts.map +1 -0
  68. package/lib/crystal/core/molecules.js +140 -0
  69. package/lib/crystal/core/molecules.js.map +1 -0
  70. package/lib/crystal/core/operations.d.ts +19 -0
  71. package/lib/crystal/core/operations.d.ts.map +1 -0
  72. package/lib/crystal/core/operations.js +68 -0
  73. package/lib/crystal/core/operations.js.map +1 -0
  74. package/lib/crystal/core/packing.d.ts +43 -0
  75. package/lib/crystal/core/packing.d.ts.map +1 -0
  76. package/lib/crystal/core/packing.js +89 -0
  77. package/lib/crystal/core/packing.js.map +1 -0
  78. package/lib/crystal/core/periodicBonds.d.ts +57 -0
  79. package/lib/crystal/core/periodicBonds.d.ts.map +1 -0
  80. package/lib/crystal/core/periodicBonds.js +167 -0
  81. package/lib/crystal/core/periodicBonds.js.map +1 -0
  82. package/lib/crystal/core/resolve.d.ts +61 -0
  83. package/lib/crystal/core/resolve.d.ts.map +1 -0
  84. package/lib/crystal/core/resolve.js +149 -0
  85. package/lib/crystal/core/resolve.js.map +1 -0
  86. package/lib/crystal/core/spaceGroups/index.d.ts +5 -0
  87. package/lib/crystal/core/spaceGroups/index.d.ts.map +1 -0
  88. package/lib/crystal/core/spaceGroups/index.js +4 -0
  89. package/lib/crystal/core/spaceGroups/index.js.map +1 -0
  90. package/lib/crystal/core/spaceGroups/spaceGroupOperations.d.ts +14 -0
  91. package/lib/crystal/core/spaceGroups/spaceGroupOperations.d.ts.map +1 -0
  92. package/lib/crystal/core/spaceGroups/spaceGroupOperations.js +24 -0
  93. package/lib/crystal/core/spaceGroups/spaceGroupOperations.js.map +1 -0
  94. package/lib/crystal/core/spaceGroups/spaceGroupRows.d.ts +3 -0
  95. package/lib/crystal/core/spaceGroups/spaceGroupRows.d.ts.map +1 -0
  96. package/lib/crystal/core/spaceGroups/spaceGroupRows.js +536 -0
  97. package/lib/crystal/core/spaceGroups/spaceGroupRows.js.map +1 -0
  98. package/lib/crystal/core/spaceGroups/spaceGroupSymbols.d.ts +43 -0
  99. package/lib/crystal/core/spaceGroups/spaceGroupSymbols.d.ts.map +1 -0
  100. package/lib/crystal/core/spaceGroups/spaceGroupSymbols.js +169 -0
  101. package/lib/crystal/core/spaceGroups/spaceGroupSymbols.js.map +1 -0
  102. package/lib/crystal/core/spaceGroups/spaceGroups.d.ts +78 -0
  103. package/lib/crystal/core/spaceGroups/spaceGroups.d.ts.map +1 -0
  104. package/lib/crystal/core/spaceGroups/spaceGroups.js +83 -0
  105. package/lib/crystal/core/spaceGroups/spaceGroups.js.map +1 -0
  106. package/lib/crystal/core/symmetry/group.d.ts +15 -0
  107. package/lib/crystal/core/symmetry/group.d.ts.map +1 -0
  108. package/lib/crystal/core/symmetry/group.js +37 -0
  109. package/lib/crystal/core/symmetry/group.js.map +1 -0
  110. package/lib/crystal/core/symmetry/index.d.ts +8 -0
  111. package/lib/crystal/core/symmetry/index.d.ts.map +1 -0
  112. package/lib/crystal/core/symmetry/index.js +6 -0
  113. package/lib/crystal/core/symmetry/index.js.map +1 -0
  114. package/lib/crystal/core/symmetry/integerMatrix.d.ts +45 -0
  115. package/lib/crystal/core/symmetry/integerMatrix.d.ts.map +1 -0
  116. package/lib/crystal/core/symmetry/integerMatrix.js +139 -0
  117. package/lib/crystal/core/symmetry/integerMatrix.js.map +1 -0
  118. package/lib/crystal/core/symmetry/lattice.d.ts +64 -0
  119. package/lib/crystal/core/symmetry/lattice.d.ts.map +1 -0
  120. package/lib/crystal/core/symmetry/lattice.js +113 -0
  121. package/lib/crystal/core/symmetry/lattice.js.map +1 -0
  122. package/lib/crystal/core/symmetry/operation.d.ts +91 -0
  123. package/lib/crystal/core/symmetry/operation.d.ts.map +1 -0
  124. package/lib/crystal/core/symmetry/operation.js +184 -0
  125. package/lib/crystal/core/symmetry/operation.js.map +1 -0
  126. package/lib/crystal/core/symmetry/parseOperation.d.ts +18 -0
  127. package/lib/crystal/core/symmetry/parseOperation.d.ts.map +1 -0
  128. package/lib/crystal/core/symmetry/parseOperation.js +145 -0
  129. package/lib/crystal/core/symmetry/parseOperation.js.map +1 -0
  130. package/lib/crystal/core/symmetry/types.d.ts +29 -0
  131. package/lib/crystal/core/symmetry/types.d.ts.map +1 -0
  132. package/lib/crystal/core/symmetry/types.js +5 -0
  133. package/lib/crystal/core/symmetry/types.js.map +1 -0
  134. package/lib/crystal/core/symmetryClasses.d.ts +28 -0
  135. package/lib/crystal/core/symmetryClasses.d.ts.map +1 -0
  136. package/lib/crystal/core/symmetryClasses.js +93 -0
  137. package/lib/crystal/core/symmetryClasses.js.map +1 -0
  138. package/lib/crystal.d.ts +12 -0
  139. package/lib/crystal.d.ts.map +1 -0
  140. package/lib/crystal.js +12 -0
  141. package/lib/crystal.js.map +1 -0
  142. package/package.json +3 -1
  143. package/src/crystal/core/bondGrid.ts +98 -0
  144. package/src/crystal/core/cellBonds.ts +121 -0
  145. package/src/crystal/core/cif/element.ts +40 -0
  146. package/src/crystal/core/cif/index.ts +12 -0
  147. package/src/crystal/core/cif/number.ts +62 -0
  148. package/src/crystal/core/cif/read.ts +218 -0
  149. package/src/crystal/core/cif/readGeometry.ts +104 -0
  150. package/src/crystal/core/cif/tags.ts +143 -0
  151. package/src/crystal/core/cif/types.ts +164 -0
  152. package/src/crystal/core/components.ts +183 -0
  153. package/src/crystal/core/covalentRadii.ts +56 -0
  154. package/src/crystal/core/disorder.ts +190 -0
  155. package/src/crystal/core/expand.ts +105 -0
  156. package/src/crystal/core/index.ts +44 -0
  157. package/src/crystal/core/moleculeOf.ts +169 -0
  158. package/src/crystal/core/moleculeTypes.ts +85 -0
  159. package/src/crystal/core/molecules.ts +165 -0
  160. package/src/crystal/core/operations.ts +79 -0
  161. package/src/crystal/core/packing.ts +116 -0
  162. package/src/crystal/core/periodicBonds.ts +234 -0
  163. package/src/crystal/core/resolve.ts +187 -0
  164. package/src/crystal/core/spaceGroups/index.ts +16 -0
  165. package/src/crystal/core/spaceGroups/spaceGroupOperations.ts +32 -0
  166. package/src/crystal/core/spaceGroups/spaceGroupRows.ts +536 -0
  167. package/src/crystal/core/spaceGroups/spaceGroupSymbols.ts +179 -0
  168. package/src/crystal/core/spaceGroups/spaceGroups.ts +154 -0
  169. package/src/crystal/core/symmetry/group.ts +42 -0
  170. package/src/crystal/core/symmetry/index.ts +23 -0
  171. package/src/crystal/core/symmetry/integerMatrix.ts +153 -0
  172. package/src/crystal/core/symmetry/lattice.ts +152 -0
  173. package/src/crystal/core/symmetry/operation.ts +223 -0
  174. package/src/crystal/core/symmetry/parseOperation.ts +180 -0
  175. package/src/crystal/core/symmetry/types.ts +32 -0
  176. package/src/crystal/core/symmetryClasses.ts +105 -0
  177. package/src/crystal.ts +12 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceGroupRows.js","sourceRoot":"","sources":["../../../../src/crystal/core/spaceGroups/spaceGroupRows.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,4EAA4E;AAC5E,EAAE;AACF,wCAAwC;AACxC,wEAAwE;AACxE,kEAAkE;AAClE,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,0CAA0C;AAE1C,sEAAsE;AACtE,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,oDAAoD;IACpD,kEAAkE;IAClE,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IACxE,gFAAgF;IAChF,+EAA+E;IAC/E,gFAAgF;IAChF,sGAAsG;IACtG,sGAAsG;IACtG,8GAA8G;IAC9G,qGAAqG;IACrG,qGAAqG;IACrG,6GAA6G;IAC7G,sGAAsG;IACtG,sGAAsG;IACtG,8GAA8G;IAC9G,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IACxE,6EAA6E;IAC7E,kFAAkF;IAClF,6EAA6E;IAC7E,4EAA4E;IAC5E,iFAAiF;IACjF,4EAA4E;IAC5E,6EAA6E;IAC7E,kFAAkF;IAClF,6EAA6E;IAC7E,qGAAqG;IACrG,qGAAqG;IACrG,6GAA6G;IAC7G,oGAAoG;IACpG,oGAAoG;IACpG,4GAA4G;IAC5G,qGAAqG;IACrG,qGAAqG;IACrG,6GAA6G;IAC7G,8GAA8G;IA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aceGroupSetting } from './spaceGroups.ts';
2
+ /**
3
+ * Every setting a query names, the standard setting first.
4
+ *
5
+ * The query is an International Tables number, a Hermann–Mauguin symbol in any
6
+ * spelling the wild produces, or a Hall symbol. Ambiguity is not an error: a
7
+ * bare `Fd-3m` genuinely names two coordinate conventions, and both come back
8
+ * so the page can say so and let the reader pick.
9
+ *
10
+ * ```
11
+ * resolveSpaceGroups('Fm-3m') // [225/0]
12
+ * resolveSpaceGroups('F m -3 m') // the same setting
13
+ * resolveSpaceGroups('Fm3m') // and again, written without the bar
14
+ * resolveSpaceGroups('P2(1)/c') // the nine settings of 14, P 1 21/c 1 first
15
+ * resolveSpaceGroups('R-3c:R') // 167/1, the rhombohedral axes
16
+ * resolveSpaceGroups('Ccca') // 68, under its pre-2002 spelling
17
+ * ```
18
+ * @param query - A number, or a symbol with an optional `:1`, `:2`, `:H` or
19
+ * `:R` qualifier. A qualifier that matches nothing is ignored rather than
20
+ * obeyed, so a link written before a spelling changed still opens.
21
+ * @returns The matching settings, or an empty array when nothing matches.
22
+ */
23
+ export declare function resolveSpaceGroups(query: string | number): readonly SpaceGroupSetting[];
24
+ /**
25
+ * The one setting a query names, or `null`. When several match, the first —
26
+ * which is the lowest variant of the lowest number, the setting the site opens
27
+ * by default. Use {@link resolveSpaceGroups} when the ambiguity matters.
28
+ * @param query - A number, or a symbol in any spelling.
29
+ * @returns The setting, or `null`.
30
+ */
31
+ export declare function resolveSpaceGroup(query: string | number): SpaceGroupSetting | null;
32
+ /**
33
+ * A Hermann–Mauguin or Hall symbol reduced to the form the index is keyed on:
34
+ * upper case, no spaces, no `_`, no parentheses, `.` read as `/`, and a
35
+ * combining overbar read as a leading minus.
36
+ *
37
+ * It turns `P2(1)/c`, `P2_1/c`, `P 21/c` and `P 63.m m c`'s siblings into one
38
+ * string, which is what lets a CIF written by any program find its group.
39
+ * @param symbol - A Hermann–Mauguin or Hall symbol.
40
+ * @returns The key the catalogue is indexed on.
41
+ */
42
+ export declare function normalizeSpaceGroupSymbol(symbol: string): string;
43
+ //# sourceMappingURL=spaceGroupSymbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceGroupSymbols.d.ts","sourceRoot":"","sources":["../../../../src/crystal/core/spaceGroups/spaceGroupSymbols.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,SAAS,iBAAiB,EAAE,CAS9B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,iBAAiB,GAAG,IAAI,CAE1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMhE"}
@@ -0,0 +1,169 @@
1
+ import { SPACE_GROUP_SETTINGS } from "./spaceGroups.js";
2
+ /**
3
+ * Every setting a query names, the standard setting first.
4
+ *
5
+ * The query is an International Tables number, a Hermann–Mauguin symbol in any
6
+ * spelling the wild produces, or a Hall symbol. Ambiguity is not an error: a
7
+ * bare `Fd-3m` genuinely names two coordinate conventions, and both come back
8
+ * so the page can say so and let the reader pick.
9
+ *
10
+ * ```
11
+ * resolveSpaceGroups('Fm-3m') // [225/0]
12
+ * resolveSpaceGroups('F m -3 m') // the same setting
13
+ * resolveSpaceGroups('Fm3m') // and again, written without the bar
14
+ * resolveSpaceGroups('P2(1)/c') // the nine settings of 14, P 1 21/c 1 first
15
+ * resolveSpaceGroups('R-3c:R') // 167/1, the rhombohedral axes
16
+ * resolveSpaceGroups('Ccca') // 68, under its pre-2002 spelling
17
+ * ```
18
+ * @param query - A number, or a symbol with an optional `:1`, `:2`, `:H` or
19
+ * `:R` qualifier. A qualifier that matches nothing is ignored rather than
20
+ * obeyed, so a link written before a spelling changed still opens.
21
+ * @returns The matching settings, or an empty array when nothing matches.
22
+ */
23
+ export function resolveSpaceGroups(query) {
24
+ if (typeof query === 'number')
25
+ return settingsOfNumber(query);
26
+ const { symbol, qualifier } = splitQualifier(query.trim());
27
+ const number = /^\d+$/.test(symbol) ? Number(symbol) : null;
28
+ const candidates = number === null
29
+ ? (index().get(normalizeSpaceGroupSymbol(symbol)) ?? [])
30
+ : settingsOfNumber(number);
31
+ return applyQualifier(candidates, qualifier);
32
+ }
33
+ /**
34
+ * The one setting a query names, or `null`. When several match, the first —
35
+ * which is the lowest variant of the lowest number, the setting the site opens
36
+ * by default. Use {@link resolveSpaceGroups} when the ambiguity matters.
37
+ * @param query - A number, or a symbol in any spelling.
38
+ * @returns The setting, or `null`.
39
+ */
40
+ export function resolveSpaceGroup(query) {
41
+ return resolveSpaceGroups(query)[0] ?? null;
42
+ }
43
+ /**
44
+ * A Hermann–Mauguin or Hall symbol reduced to the form the index is keyed on:
45
+ * upper case, no spaces, no `_`, no parentheses, `.` read as `/`, and a
46
+ * combining overbar read as a leading minus.
47
+ *
48
+ * It turns `P2(1)/c`, `P2_1/c`, `P 21/c` and `P 63.m m c`'s siblings into one
49
+ * string, which is what lets a CIF written by any program find its group.
50
+ * @param symbol - A Hermann–Mauguin or Hall symbol.
51
+ * @returns The key the catalogue is indexed on.
52
+ */
53
+ export function normalizeSpaceGroupSymbol(symbol) {
54
+ return symbol
55
+ .replaceAll(/(?<digit>\d)[̄̅¯]/gu, '-$<digit>')
56
+ .replaceAll(/[\s_()]/g, '')
57
+ .replaceAll('.', '/')
58
+ .toUpperCase();
59
+ }
60
+ /**
61
+ * The settings of one International Tables number, variant 0 first.
62
+ * @param number - The International Tables number.
63
+ * @returns The settings, variant 0 first.
64
+ */
65
+ function settingsOfNumber(number) {
66
+ const found = [];
67
+ for (const setting of SPACE_GROUP_SETTINGS) {
68
+ if (setting.number === number)
69
+ found.push(setting);
70
+ }
71
+ return found;
72
+ }
73
+ /**
74
+ * The trailing setting qualifier, in any of the spellings in use: `R-3c:H`,
75
+ * `R-3cH`, `Fd-3m:2`, `Fd-3m S`.
76
+ *
77
+ * The `S` and `Z` letters of the older literature are recognised and dropped
78
+ * rather than read as an origin: which of the two they name is a convention
79
+ * this repository has no source for, and guessing it would silently move every
80
+ * atom of a diamond-type structure by (1/8, 1/8, 1/8).
81
+ * @param query - The symbol, as the file writes it.
82
+ * @returns The symbol, and the qualifier when there is one.
83
+ */
84
+ function splitQualifier(query) {
85
+ const tagged = /^(?<symbol>.*?)\s*:\s*(?<tag>[12HRhr])$/.exec(query);
86
+ if (tagged !== null) {
87
+ return {
88
+ symbol: tagged.groups?.symbol ?? '',
89
+ qualifier: (tagged.groups?.tag ?? '').toUpperCase(),
90
+ };
91
+ }
92
+ const lettered = /^(?<symbol>.*\S)\s*(?<tag>[SZsz])$/.exec(query);
93
+ if (lettered !== null) {
94
+ return { symbol: lettered.groups?.symbol ?? '', qualifier: null };
95
+ }
96
+ const glued = /^(?<symbol>.*-3.*?)(?<tag>[HRhr])$/.exec(query);
97
+ if (glued !== null) {
98
+ return {
99
+ symbol: glued.groups?.symbol ?? '',
100
+ qualifier: (glued.groups?.tag ?? '').toUpperCase(),
101
+ };
102
+ }
103
+ return { symbol: query, qualifier: null };
104
+ }
105
+ function applyQualifier(candidates, qualifier) {
106
+ if (qualifier === null)
107
+ return candidates;
108
+ const kept = candidates.filter((setting) => qualifier === '1' || qualifier === '2'
109
+ ? setting.originChoice === Number(qualifier)
110
+ : setting.axes === (qualifier === 'H' ? 'hexagonal' : 'rhombohedral'));
111
+ return kept.length === 0 ? candidates : kept;
112
+ }
113
+ let cached = null;
114
+ /**
115
+ * Every spelling of every setting, built once. A key is registered only when it
116
+ * is free, so a Hall symbol never displaces a Hermann–Mauguin one and the
117
+ * bar-less `P1` keeps meaning group 1 rather than `P-1`.
118
+ * @returns Normalized symbol to the settings it names.
119
+ */
120
+ function index() {
121
+ if (cached !== null)
122
+ return cached;
123
+ const built = new Map();
124
+ const add = (key, setting) => {
125
+ if (key.length === 0)
126
+ return;
127
+ const list = built.get(key);
128
+ if (list === undefined)
129
+ built.set(key, [setting]);
130
+ else if (!list.includes(setting))
131
+ list.push(setting);
132
+ };
133
+ for (const pass of ['symbols', 'hall', 'barless']) {
134
+ for (const setting of SPACE_GROUP_SETTINGS) {
135
+ if (pass === 'symbols') {
136
+ for (const symbol of [
137
+ setting.hmShort,
138
+ setting.hmFull,
139
+ setting.hmSetting,
140
+ setting.hmLegacy ?? '',
141
+ ]) {
142
+ add(normalizeSpaceGroupSymbol(symbol), setting);
143
+ }
144
+ }
145
+ else if (pass === 'hall') {
146
+ if (setting.hall !== null) {
147
+ const key = normalizeSpaceGroupSymbol(setting.hall);
148
+ if (!built.has(key))
149
+ add(key, setting);
150
+ }
151
+ }
152
+ else {
153
+ for (const symbol of [
154
+ setting.hmShort,
155
+ setting.hmFull,
156
+ setting.hmSetting,
157
+ setting.hmLegacy ?? '',
158
+ ]) {
159
+ const key = normalizeSpaceGroupSymbol(symbol).replaceAll('-', '');
160
+ if (!built.has(key))
161
+ add(key, setting);
162
+ }
163
+ }
164
+ }
165
+ }
166
+ cached = built;
167
+ return built;
168
+ }
169
+ //# sourceMappingURL=spaceGroupSymbols.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceGroupSymbols.js","sourceRoot":"","sources":["../../../../src/crystal/core/spaceGroups/spaceGroupSymbols.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAsB;IAEtB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,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AK,CAAC,GAAG,CAAC,GAAG,CAAC;wBAAE,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;gBACzC,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,KAAK,MAAM,MAAM,IAAI;oBACnB,OAAO,CAAC,OAAO;oBACf,OAAO,CAAC,MAAM;oBACd,OAAO,CAAC,SAAS;oBACjB,OAAO,CAAC,QAAQ,IAAI,EAAE;iBACvB,EAAE,CAAC;oBACF,MAAM,GAAG,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBAClE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;wBAAE,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;gBACzC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,GAAG,KAAK,CAAC;IACf,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,78 @@
1
+ /** The seven crystal systems, named by the point group rather than the lattice. */
2
+ export type CrystalSystem = 'triclinic' | 'monoclinic' | 'orthorhombic' | 'tetragonal' | 'trigonal' | 'hexagonal' | 'cubic';
3
+ /** The Bravais letter a Hermann–Mauguin symbol opens with. */
4
+ export type Centring = 'P' | 'A' | 'B' | 'C' | 'I' | 'F' | 'R';
5
+ /**
6
+ * One setting of one space group: a choice of axes, origin and cell for the
7
+ * same group, so the same crystal is described by the same operations written
8
+ * in a different basis.
9
+ *
10
+ * A space group is addressed by its **number**, and a setting by
11
+ * `number/variant`; no Hermann–Mauguin string is ever an identity, because the
12
+ * spellings in the wild are not stable. `variant` is dense from 0 within a
13
+ * number, and variant 0 is the setting the site opens by default.
14
+ */
15
+ export interface SpaceGroupSetting {
16
+ /** International Tables number, 1 to 230. */
17
+ readonly number: number;
18
+ /** Index of this setting within its number, dense from 0. */
19
+ readonly variant: number;
20
+ /** The standard short symbol of the number: `P 21/c`, `F m -3 m`. */
21
+ readonly hmShort: string;
22
+ /** The International Tables full symbol of the number: `P 1 21/c 1`. */
23
+ readonly hmFull: string;
24
+ /** This setting's own symbol: `P 1 1 21/a`. Equal to `hmFull` above number 74. */
25
+ readonly hmSetting: string;
26
+ /** The pre-2002 spelling of `hmShort` — `C c c a` for `C c c e`. Five numbers have one. */
27
+ readonly hmLegacy: string | null;
28
+ /** The Hall symbol, the one string that pins a setting. Absent above number 74. */
29
+ readonly hall: string | null;
30
+ readonly crystalSystem: CrystalSystem;
31
+ readonly centring: Centring;
32
+ /** Which axes an `R` group is written on. `null` for every other group. */
33
+ readonly axes: 'hexagonal' | 'rhombohedral' | null;
34
+ /** Which of the two origins this setting takes, when the group offers a choice. */
35
+ readonly originChoice: 1 | 2 | null;
36
+ /** The axis a monoclinic setting is built on. `null` for every other system. */
37
+ readonly uniqueAxis: 'a' | 'b' | 'c' | null;
38
+ /** The crystal class, in Hermann–Mauguin: `2/m`, `-42m`, `m-3m`. One of 32. */
39
+ readonly crystalClass: string;
40
+ /** The Laue class, the symmetry the diffraction pattern shows. One of 11. */
41
+ readonly laueClass: string;
42
+ /** Whether `-x,-y,-z` is an operation of the group. */
43
+ readonly centrosymmetric: boolean;
44
+ /** Whether every operation is proper, so one enantiomer can crystallise in it. */
45
+ readonly sohncke: boolean;
46
+ /** Whether some origin makes the group the semidirect product of point group and lattice. */
47
+ readonly symmorphic: boolean;
48
+ /** How many operations the cell carries — the multiplicity of a general position. */
49
+ readonly multiplicity: number;
50
+ /** The coset list as canonical triplets, centring expanded: `-x,y+1/2,-z+1/2`. */
51
+ readonly operations: readonly string[];
52
+ }
53
+ /**
54
+ * The 521 settings of the 230 space groups, in source order: ascending number,
55
+ * then ascending variant.
56
+ *
57
+ * Every field but the symbols and the Hall symbol is derived from the operation
58
+ * list rather than transcribed, by symmetry.cheminfo.org, whose tests reproduce
59
+ * the International Tables counts of 92 centrosymmetric, 65 Sohncke and 73
60
+ * symmorphic groups.
61
+ */
62
+ export declare const SPACE_GROUP_SETTINGS: readonly SpaceGroupSetting[];
63
+ /** The settings of one space group number, variant 0 first. */
64
+ export declare const SPACE_GROUP_SETTINGS_BY_NUMBER: ReadonlyMap<number, readonly SpaceGroupSetting[]>;
65
+ /**
66
+ * One setting of one space group.
67
+ *
68
+ * ```
69
+ * spaceGroup(14) // P 1 21/c 1, the standard setting
70
+ * spaceGroup(227, 1) // F d -3 m on origin choice 1
71
+ * ```
72
+ * @param number - The International Tables number, 1 to 230.
73
+ * @param variant - Which setting of it; 0 is the standard one.
74
+ * @returns The setting.
75
+ * @throws {RangeError} When the number is not one of the 230, or the setting does not exist.
76
+ */
77
+ export declare function spaceGroup(number: number, variant?: number): SpaceGroupSetting;
78
+ //# sourceMappingURL=spaceGroups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceGroups.d.ts","sourceRoot":"","sources":["../../../../src/crystal/core/spaceGroups/spaceGroups.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AAEZ,8DAA8D;AAC9D,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE/D;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kFAAkF;IAClF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI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settings of the 230 space groups, in source order: ascending number,
4
+ * then ascending variant.
5
+ *
6
+ * Every field but the symbols and the Hall symbol is derived from the operation
7
+ * list rather than transcribed, by symmetry.cheminfo.org, whose tests reproduce
8
+ * the International Tables counts of 92 centrosymmetric, 65 Sohncke and 73
9
+ * symmorphic groups.
10
+ */
11
+ export const SPACE_GROUP_SETTINGS = SPACE_GROUP_ROWS.map(decodeRow);
12
+ /** The settings of one space group number, variant 0 first. */
13
+ export const SPACE_GROUP_SETTINGS_BY_NUMBER = groupByNumber(SPACE_GROUP_SETTINGS);
14
+ /**
15
+ * One setting of one space group.
16
+ *
17
+ * ```
18
+ * spaceGroup(14) // P 1 21/c 1, the standard setting
19
+ * spaceGroup(227, 1) // F d -3 m on origin choice 1
20
+ * ```
21
+ * @param number - The International Tables number, 1 to 230.
22
+ * @param variant - Which setting of it; 0 is the standard one.
23
+ * @returns The setting.
24
+ * @throws {RangeError} When the number is not one of the 230, or the setting does not exist.
25
+ */
26
+ export function spaceGroup(number, variant = 0) {
27
+ const settings = SPACE_GROUP_SETTINGS_BY_NUMBER.get(number);
28
+ if (settings === undefined) {
29
+ throw new RangeError(`${number} is not a space group number`);
30
+ }
31
+ const setting = settings[variant];
32
+ if (setting === undefined) {
33
+ throw new RangeError(`space group ${number} has ${settings.length} settings, so there is no ${variant}`);
34
+ }
35
+ return setting;
36
+ }
37
+ function decodeRow(row) {
38
+ const field = row.split('|');
39
+ const flags = field[14] ?? '';
40
+ const operations = (field[15] ?? '').split(';');
41
+ return {
42
+ number: Number(field[0]),
43
+ variant: Number(field[1]),
44
+ hmShort: field[2] ?? '',
45
+ hmFull: field[3] ?? '',
46
+ hmSetting: field[4] ?? '',
47
+ hmLegacy: field[5] === '' ? null : (field[5] ?? null),
48
+ hall: field[6] === '' ? null : (field[6] ?? null),
49
+ crystalSystem: field[7],
50
+ centring: field[8],
51
+ axes: field[9] === 'hexagonal' || field[9] === 'rhombohedral' ? field[9] : null,
52
+ originChoice: field[10] === '1' ? 1 : field[10] === '2' ? 2 : null,
53
+ uniqueAxis: decodeAxis(field[11]),
54
+ crystalClass: field[12] ?? '',
55
+ laueClass: field[13] ?? '',
56
+ centrosymmetric: flags.startsWith('1'),
57
+ sohncke: flags[1] === '1',
58
+ symmorphic: flags[2] === '1',
59
+ multiplicity: operations.length,
60
+ operations,
61
+ };
62
+ }
63
+ function decodeAxis(field) {
64
+ if (field === 'a')
65
+ return 'a';
66
+ if (field === 'b')
67
+ return 'b';
68
+ if (field === 'c')
69
+ return 'c';
70
+ return null;
71
+ }
72
+ function groupByNumber(settings) {
73
+ const byNumber = new Map();
74
+ for (const setting of settings) {
75
+ const list = byNumber.get(setting.number);
76
+ if (list === undefined)
77
+ byNumber.set(setting.number, [setting]);
78
+ else
79
+ list.push(setting);
80
+ }
81
+ return byNumber;
82
+ }
83
+ //# sourceMappingURL=spaceGroups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceGroups.js","sourceRoot":"","sources":["../../../../src/crystal/core/spaceGroups/spaceGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAgEvD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAElC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAGvC,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,OAAO,GAAG,CAAC;IACpD,MAAM,QAAQ,GAAG,8BAA8B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5D,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,UAAU,CAAC,GAAG,MAAM,8BAA8B,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClC,I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,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { CrystalOperation, Dimension } from './types.ts';
2
+ /**
3
+ * Every coset representative generated by `generators`, modulo the lattice
4
+ * translations: the whole group when the generators generate it.
5
+ *
6
+ * A breadth-first closure over exact integer keys, so it terminates on any input
7
+ * whose rotation parts have finite order. The identity comes first.
8
+ * @param generators - Operations of one dimension.
9
+ * @param limit - The most operations a closure may reach.
10
+ * @throws {RangeError} When the closure passes `limit` operations, which means the generators
11
+ * are not those of a crystallographic group.
12
+ * @returns The coset representatives, the identity first.
13
+ */
14
+ export declare function closure<D extends Dimension>(generators: ReadonlyArray<CrystalOperation<D>>, limit?: number): Array<CrystalOperation<D>>;
15
+ //# sourceMappingURL=group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../src/crystal/core/symmetry/group.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,SAAS,EACzC,UAAU,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC9C,KAAK,SAAO,GACX,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAuB5B"}
@@ -0,0 +1,37 @@
1
+ import { compose, identityOperation, operationKey } from "./operation.js";
2
+ /**
3
+ * Every coset representative generated by `generators`, modulo the lattice
4
+ * translations: the whole group when the generators generate it.
5
+ *
6
+ * A breadth-first closure over exact integer keys, so it terminates on any input
7
+ * whose rotation parts have finite order. The identity comes first.
8
+ * @param generators - Operations of one dimension.
9
+ * @param limit - The most operations a closure may reach.
10
+ * @throws {RangeError} When the closure passes `limit` operations, which means the generators
11
+ * are not those of a crystallographic group.
12
+ * @returns The coset representatives, the identity first.
13
+ */
14
+ export function closure(generators, limit = 1536) {
15
+ const dimension = (generators[0]?.rotation.length ?? 3);
16
+ const identity = identityOperation(dimension);
17
+ const found = new Map([
18
+ [operationKey(identity), identity],
19
+ ]);
20
+ const queue = [identity];
21
+ // The queue grows while it is read, which is what makes this a closure.
22
+ for (const current of queue) {
23
+ for (const generator of generators) {
24
+ const next = compose(generator, current);
25
+ const key = operationKey(next);
26
+ if (found.has(key))
27
+ continue;
28
+ found.set(key, next);
29
+ queue.push(next);
30
+ if (queue.length > limit) {
31
+ throw new RangeError(`the generators do not close within ${limit} operations`);
32
+ }
33
+ }
34
+ }
35
+ return queue;
36
+ }
37
+ //# sourceMappingURL=group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.js","sourceRoot":"","sources":["../../../../src/crystal/core/symmetry/group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG1E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,OAAO,CACrB,UAA8C,EAC9C,KAAK,GAAG,IAAI;IAEZ,MAAM,SAAS,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAM,CAAC;IAC7D,MAAM,QAAQ,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,IAAI,GAAG,CAA8B;QACjD,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;KACnC,CAAC,CAAC;IACH,MAAM,KAAK,GAA+B,CAAC,QAAQ,CAAC,CAAC;IACrD,wEAAwE;IACxE,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE,CAAC;QAC5B,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACzC,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,SAAS;YAC7B,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;gBACzB,MAAM,IAAI,UAAU,CAClB,sCAAsC,KAAK,aAAa,CACzD,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { closure } from './group.ts';
2
+ export type { Lattice, UnitCell } from './lattice.ts';
3
+ export { cartesianMatrix, cartesianToFractional, cellVolume, createLattice, fractionalToCartesian, } from './lattice.ts';
4
+ export { apply, compose, identityOperation, inverse, isIdentity, operationKey, orbit, sameSite, wrapFractional, } from './operation.ts';
5
+ export { parseOperation } from './parseOperation.ts';
6
+ export type { CrystalOperation, Dimension, IntegerMatrix } from './types.ts';
7
+ export { TWELFTHS_PER_CELL } from './types.ts';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/crystal/core/symmetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { closure } from "./group.js";
2
+ export { cartesianMatrix, cartesianToFractional, cellVolume, createLattice, fractionalToCartesian, } from "./lattice.js";
3
+ export { apply, compose, identityOperation, inverse, isIdentity, operationKey, orbit, sameSite, wrapFractional, } from "./operation.js";
4
+ export { parseOperation } from "./parseOperation.js";
5
+ export { TWELFTHS_PER_CELL } from "./types.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/crystal/core/symmetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { IntegerMatrix } from './types.ts';
2
+ /**
3
+ * The product `a · b` of two square integer matrices of the same size.
4
+ * @param a - Left factor, row-major.
5
+ * @param b - Right factor, row-major.
6
+ * @returns The product, row-major.
7
+ */
8
+ export declare function multiplyMatrices(a: IntegerMatrix, b: IntegerMatrix): number[][];
9
+ /**
10
+ * The product `matrix · vector`.
11
+ * @param matrix - The matrix, row-major.
12
+ * @param vector - The vector.
13
+ * @returns The image of the vector.
14
+ */
15
+ export declare function multiplyMatrixVector(matrix: IntegerMatrix, vector: readonly number[]): number[];
16
+ /**
17
+ * The `size × size` identity matrix.
18
+ * @param size - 2 or 3.
19
+ * @returns The identity matrix.
20
+ */
21
+ export declare function identityMatrix(size: number): number[][];
22
+ /**
23
+ * The determinant of a 2×2 or 3×3 integer matrix.
24
+ * @param matrix - A 2×2 or 3×3 matrix.
25
+ * @throws {RangeError} When the matrix is not 2×2 or 3×3; no crystallographic operation is.
26
+ * @returns The determinant.
27
+ */
28
+ export declare function matrixDeterminant(matrix: IntegerMatrix): number;
29
+ /**
30
+ * The adjugate: `adjugate(m) · m = det(m) · I`, exactly, in integers.
31
+ *
32
+ * It is how this core inverts an integer matrix without ever dividing, so an
33
+ * element's position stays an exact fraction.
34
+ * @param matrix - A 2×2 or 3×3 matrix.
35
+ * @returns The adjugate.
36
+ */
37
+ export declare function matrixAdjugate(matrix: IntegerMatrix): number[][];
38
+ /**
39
+ * Whether two matrices hold the same integers.
40
+ * @param a - One matrix.
41
+ * @param b - The other.
42
+ * @returns Whether every entry is the same.
43
+ */
44
+ export declare function matricesEqual(a: IntegerMatrix, b: IntegerMatrix): boolean;
45
+ //# sourceMappingURL=integerMatrix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integerMatrix.d.ts","sourceRoot":"","sources":["../../../../src/crystal/core/symmetry/integerMatrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa,GACf,MAAM,EAAE,EAAE,CAeZ;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,EAAE,CAWV;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAQvD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAsB/D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,EAAE,CAsBhE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,GAAG,OAAO,CAQzE"}