symcrys 0.10.0 → 0.11.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 (218) hide show
  1. package/README.md +6 -6
  2. package/dist/cell.d.ts +19 -16
  3. package/dist/cell.d.ts.map +1 -1
  4. package/dist/cell.js +63 -35
  5. package/dist/cell.js.map +1 -1
  6. package/dist/checks.d.ts +29 -0
  7. package/dist/checks.d.ts.map +1 -0
  8. package/dist/checks.js +79 -0
  9. package/dist/checks.js.map +1 -0
  10. package/dist/closure.d.ts +43 -0
  11. package/dist/closure.d.ts.map +1 -0
  12. package/dist/closure.js +201 -0
  13. package/dist/closure.js.map +1 -0
  14. package/dist/crystalClasses.d.ts +146 -118
  15. package/dist/crystalClasses.d.ts.map +1 -1
  16. package/dist/crystalClasses.js +163 -124
  17. package/dist/crystalClasses.js.map +1 -1
  18. package/dist/freeze.d.ts +7 -0
  19. package/dist/freeze.d.ts.map +1 -0
  20. package/dist/freeze.js +15 -0
  21. package/dist/freeze.js.map +1 -0
  22. package/dist/index.d.ts +11 -10
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +4 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/indices.d.ts +31 -5
  27. package/dist/indices.d.ts.map +1 -1
  28. package/dist/indices.js +104 -13
  29. package/dist/indices.js.map +1 -1
  30. package/dist/lattice.d.ts +15 -1
  31. package/dist/lattice.d.ts.map +1 -1
  32. package/dist/lattice.js +30 -1
  33. package/dist/lattice.js.map +1 -1
  34. package/dist/linalg.d.ts +2 -2
  35. package/dist/linalg.d.ts.map +1 -1
  36. package/dist/linalg.js +3 -3
  37. package/dist/linalg.js.map +1 -1
  38. package/dist/magnetic.d.ts +12 -10
  39. package/dist/magnetic.d.ts.map +1 -1
  40. package/dist/magnetic.js +8 -6
  41. package/dist/magnetic.js.map +1 -1
  42. package/dist/notation.d.ts +16 -0
  43. package/dist/notation.d.ts.map +1 -0
  44. package/dist/notation.js +66 -0
  45. package/dist/notation.js.map +1 -0
  46. package/dist/operations.d.ts +40 -26
  47. package/dist/operations.d.ts.map +1 -1
  48. package/dist/operations.js +48 -60
  49. package/dist/operations.js.map +1 -1
  50. package/dist/plane.d.ts +141 -79
  51. package/dist/plane.d.ts.map +1 -1
  52. package/dist/plane.js +147 -77
  53. package/dist/plane.js.map +1 -1
  54. package/dist/pointGroups/crystalForms.d.ts +6 -21
  55. package/dist/pointGroups/crystalForms.d.ts.map +1 -1
  56. package/dist/pointGroups/crystalForms.js +9 -16
  57. package/dist/pointGroups/crystalForms.js.map +1 -1
  58. package/dist/pointGroups/crystalFormsData.d.ts +4 -1
  59. package/dist/pointGroups/crystalFormsData.d.ts.map +1 -1
  60. package/dist/pointGroups/crystalFormsData.js +64 -1
  61. package/dist/pointGroups/crystalFormsData.js.map +1 -1
  62. package/dist/pointGroups/elements.d.ts +19 -17
  63. package/dist/pointGroups/elements.d.ts.map +1 -1
  64. package/dist/pointGroups/elements.js +65 -83
  65. package/dist/pointGroups/elements.js.map +1 -1
  66. package/dist/pointGroups/identify.d.ts +10 -18
  67. package/dist/pointGroups/identify.d.ts.map +1 -1
  68. package/dist/pointGroups/identify.js +27 -79
  69. package/dist/pointGroups/identify.js.map +1 -1
  70. package/dist/pointGroups/itaOrder.d.ts +15 -14
  71. package/dist/pointGroups/itaOrder.d.ts.map +1 -1
  72. package/dist/pointGroups/itaOrder.js +116 -94
  73. package/dist/pointGroups/itaOrder.js.map +1 -1
  74. package/dist/pointGroups/itcData.d.ts +96 -0
  75. package/dist/pointGroups/itcData.d.ts.map +1 -0
  76. package/dist/pointGroups/itcData.js +336 -0
  77. package/dist/pointGroups/itcData.js.map +1 -0
  78. package/dist/pointGroups/itcMagneticData.d.ts +55 -0
  79. package/dist/pointGroups/itcMagneticData.d.ts.map +1 -0
  80. package/dist/pointGroups/itcMagneticData.js +172 -0
  81. package/dist/pointGroups/itcMagneticData.js.map +1 -0
  82. package/dist/pointGroups/keys.d.ts +32 -0
  83. package/dist/pointGroups/keys.d.ts.map +1 -0
  84. package/dist/pointGroups/keys.js +120 -0
  85. package/dist/pointGroups/keys.js.map +1 -0
  86. package/dist/pointGroups/magneticSymbols.d.ts +6 -5
  87. package/dist/pointGroups/magneticSymbols.d.ts.map +1 -1
  88. package/dist/pointGroups/magneticSymbols.js +15 -12
  89. package/dist/pointGroups/magneticSymbols.js.map +1 -1
  90. package/dist/pointGroups/orbits.d.ts +23 -42
  91. package/dist/pointGroups/orbits.d.ts.map +1 -1
  92. package/dist/pointGroups/orbits.js +20 -62
  93. package/dist/pointGroups/orbits.js.map +1 -1
  94. package/dist/pointGroups/pointGroups.d.ts +135 -67
  95. package/dist/pointGroups/pointGroups.d.ts.map +1 -1
  96. package/dist/pointGroups/pointGroups.js +409 -244
  97. package/dist/pointGroups/pointGroups.js.map +1 -1
  98. package/dist/pointGroups/properties.d.ts +21 -22
  99. package/dist/pointGroups/properties.d.ts.map +1 -1
  100. package/dist/pointGroups/properties.js +40 -37
  101. package/dist/pointGroups/properties.js.map +1 -1
  102. package/dist/pointGroups/seitzData.d.ts +26 -0
  103. package/dist/pointGroups/seitzData.d.ts.map +1 -0
  104. package/dist/pointGroups/seitzData.js +130 -0
  105. package/dist/pointGroups/seitzData.js.map +1 -0
  106. package/dist/pointGroups/wyckoff.d.ts +70 -40
  107. package/dist/pointGroups/wyckoff.d.ts.map +1 -1
  108. package/dist/pointGroups/wyckoff.js +98 -91
  109. package/dist/pointGroups/wyckoff.js.map +1 -1
  110. package/dist/pointGroups/wyckoffData.d.ts +7 -4
  111. package/dist/pointGroups/wyckoffData.d.ts.map +1 -1
  112. package/dist/pointGroups/wyckoffData.js +789 -168
  113. package/dist/pointGroups/wyckoffData.js.map +1 -1
  114. package/dist/siteSymmetry.d.ts +9 -17
  115. package/dist/siteSymmetry.d.ts.map +1 -1
  116. package/dist/siteSymmetry.js +62 -47
  117. package/dist/siteSymmetry.js.map +1 -1
  118. package/dist/spaceGroups/affine.d.ts.map +1 -1
  119. package/dist/spaceGroups/affine.js +3 -2
  120. package/dist/spaceGroups/affine.js.map +1 -1
  121. package/dist/spaceGroups/cell.d.ts +43 -31
  122. package/dist/spaceGroups/cell.d.ts.map +1 -1
  123. package/dist/spaceGroups/cell.js +173 -85
  124. package/dist/spaceGroups/cell.js.map +1 -1
  125. package/dist/spaceGroups/describe.d.ts +12 -10
  126. package/dist/spaceGroups/describe.d.ts.map +1 -1
  127. package/dist/spaceGroups/describe.js +11 -10
  128. package/dist/spaceGroups/describe.js.map +1 -1
  129. package/dist/spaceGroups/planeGroupData.d.ts +1 -1
  130. package/dist/spaceGroups/planeGroupData.d.ts.map +1 -1
  131. package/dist/spaceGroups/planeGroupData.js +8 -8
  132. package/dist/spaceGroups/planeGroupData.js.map +1 -1
  133. package/dist/spaceGroups/planeGroups.d.ts.map +1 -1
  134. package/dist/spaceGroups/planeGroups.js +2 -1
  135. package/dist/spaceGroups/planeGroups.js.map +1 -1
  136. package/dist/spaceGroups/positions.d.ts +48 -19
  137. package/dist/spaceGroups/positions.d.ts.map +1 -1
  138. package/dist/spaceGroups/positions.js +166 -67
  139. package/dist/spaceGroups/positions.js.map +1 -1
  140. package/dist/tensors/propertyTable.d.ts +3 -1
  141. package/dist/tensors/propertyTable.d.ts.map +1 -1
  142. package/dist/tensors/propertyTable.js +17 -10
  143. package/dist/tensors/propertyTable.js.map +1 -1
  144. package/dist/tensors/rowEchelon.d.ts +12 -4
  145. package/dist/tensors/rowEchelon.d.ts.map +1 -1
  146. package/dist/tensors/rowEchelon.js +24 -11
  147. package/dist/tensors/rowEchelon.js.map +1 -1
  148. package/dist/tensors/tensorForm.d.ts +75 -34
  149. package/dist/tensors/tensorForm.d.ts.map +1 -1
  150. package/dist/tensors/tensorForm.js +173 -68
  151. package/dist/tensors/tensorForm.js.map +1 -1
  152. package/dist/tensors/tensorProperties.d.ts +10 -9
  153. package/dist/tensors/tensorProperties.d.ts.map +1 -1
  154. package/dist/tensors/tensorProperties.js +22 -12
  155. package/dist/tensors/tensorProperties.js.map +1 -1
  156. package/dist/tolerances.d.ts +56 -1
  157. package/dist/tolerances.d.ts.map +1 -1
  158. package/dist/tolerances.js +51 -1
  159. package/dist/tolerances.js.map +1 -1
  160. package/dist/version.d.ts +1 -1
  161. package/dist/version.js +1 -1
  162. package/package.json +1 -1
  163. package/src/cell.ts +78 -51
  164. package/src/checks.ts +84 -0
  165. package/src/closure.ts +214 -0
  166. package/src/crystalClasses.ts +234 -160
  167. package/src/freeze.ts +14 -0
  168. package/src/index.ts +21 -10
  169. package/src/indices.ts +108 -18
  170. package/src/lattice.ts +41 -1
  171. package/src/linalg.ts +3 -3
  172. package/src/magnetic.ts +14 -9
  173. package/src/notation.ts +73 -0
  174. package/src/operations.ts +78 -69
  175. package/src/plane.ts +253 -127
  176. package/src/pointGroups/crystalForms.ts +11 -44
  177. package/src/pointGroups/crystalFormsData.ts +66 -1
  178. package/src/pointGroups/elements.ts +82 -92
  179. package/src/pointGroups/identify.ts +38 -97
  180. package/src/pointGroups/itaOrder.ts +117 -101
  181. package/src/pointGroups/itcData.ts +404 -0
  182. package/src/pointGroups/itcMagneticData.ts +206 -0
  183. package/src/pointGroups/keys.ts +144 -0
  184. package/src/pointGroups/magneticSymbols.ts +18 -17
  185. package/src/pointGroups/orbits.ts +41 -89
  186. package/src/pointGroups/pointGroups.ts +540 -297
  187. package/src/pointGroups/properties.ts +44 -40
  188. package/src/pointGroups/seitzData.ts +147 -0
  189. package/src/pointGroups/wyckoff.ts +137 -112
  190. package/src/pointGroups/wyckoffData.ts +793 -170
  191. package/src/siteSymmetry.ts +71 -64
  192. package/src/spaceGroups/affine.ts +3 -2
  193. package/src/spaceGroups/cell.ts +227 -116
  194. package/src/spaceGroups/describe.ts +22 -19
  195. package/src/spaceGroups/planeGroupData.ts +9 -9
  196. package/src/spaceGroups/planeGroups.ts +2 -1
  197. package/src/spaceGroups/positions.ts +202 -78
  198. package/src/tensors/propertyTable.ts +29 -17
  199. package/src/tensors/rowEchelon.ts +28 -9
  200. package/src/tensors/tensorForm.ts +260 -89
  201. package/src/tensors/tensorProperties.ts +34 -14
  202. package/src/tolerances.ts +66 -1
  203. package/src/version.ts +1 -1
  204. package/dist/pointGroups/data.d.ts +0 -75
  205. package/dist/pointGroups/data.d.ts.map +0 -1
  206. package/dist/pointGroups/data.js +0 -212
  207. package/dist/pointGroups/data.js.map +0 -1
  208. package/dist/pointGroups/magneticData.d.ts +0 -66
  209. package/dist/pointGroups/magneticData.d.ts.map +0 -1
  210. package/dist/pointGroups/magneticData.js +0 -184
  211. package/dist/pointGroups/magneticData.js.map +0 -1
  212. package/dist/spaceGroups/snap.d.ts +0 -20
  213. package/dist/spaceGroups/snap.d.ts.map +0 -1
  214. package/dist/spaceGroups/snap.js +0 -103
  215. package/dist/spaceGroups/snap.js.map +0 -1
  216. package/src/pointGroups/data.ts +0 -305
  217. package/src/pointGroups/magneticData.ts +0 -328
  218. package/src/spaceGroups/snap.ts +0 -121
@@ -1 +1 @@
1
- {"version":3,"file":"magnetic.js","sourceRoot":"","sources":["../src/magnetic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EACL,aAAa,EACb,YAAY,GAIb,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAMhB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,QAAQ,GAGT,MAAM,cAAc,CAAC;AAqBtB,OAAO,EACL,yBAAyB,IAAI,gBAAgB,EAC7C,sBAAsB,IAAI,cAAc,EACxC,UAAU,EACV,uBAAuB,IAAI,eAAe,EAC1C,mBAAmB,IAAI,WAAW,EAClC,UAAU,EACV,UAAU,EACV,QAA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,cAAc,CAAC;AAqBtB,OAAO,EACL,yBAAyB,IAAI,gBAAgB,EAC7C,sBAAsB,IAAI,cAAc,EACxC,UAAU,EACV,uBAAuB,IAAI,eAAe,EAC1C,cAAc,EACd,mBAAmB,IAAI,WAAW,EAClC,UAAU,EACV,UAAU,EACV,QAAQ,EACR,MAAM,GAMP,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAY,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAMnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,0BAA0B,IAAI,kBAAkB,EAA8B,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,cAAc,EAAqB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,oBAAoB,EACpB,YAAY,GAIb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,EACL,OAAO,GAMR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,GAOb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAgD,MAAM,4BAA4B,CAAC;AAC7G,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,GACjB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Tolerant reading of symbols (#96): the spellings of the overbar, the prime and the Schoenflies
3
+ * subscripts that occur in print, on the web and in pasted text, brought to the one spelling of
4
+ * this library before a symbol is compared (docs/conventions.md, "Reading symbols"). A pure
5
+ * normalisation: it changes how a symbol is written, never which symbol it is. Internal; shared by
6
+ * the entry points. Characters outside ASCII are written as escapes, so that none is invisible.
7
+ */
8
+ /**
9
+ * A symbol in the spelling of this library, its spaces normalized (trimmed, every run one space):
10
+ * overbars as `-` before the digit, primes as `'`, Schoenflies subscripts as plain characters
11
+ * (Unicode subscripts, LaTeX's `_{3v}` and `_3`).
12
+ */
13
+ export declare function normalizeSymbol(text: string): string;
14
+ /** A normalized symbol without spaces. */
15
+ export declare function compactSymbol(text: string): string;
16
+ //# sourceMappingURL=notation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notation.d.ts","sourceRoot":"","sources":["../src/notation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6CH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWpD;AAED,0CAA0C;AAC1C,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Tolerant reading of symbols (#96): the spellings of the overbar, the prime and the Schoenflies
3
+ * subscripts that occur in print, on the web and in pasted text, brought to the one spelling of
4
+ * this library before a symbol is compared (docs/conventions.md, "Reading symbols"). A pure
5
+ * normalisation: it changes how a symbol is written, never which symbol it is. Internal; shared by
6
+ * the entry points. Characters outside ASCII are written as escapes, so that none is invisible.
7
+ */
8
+ /**
9
+ * Combining overbar (U+0304) and combining overline (U+0305), and the macron (U+00AF), as the text
10
+ * layer of the ITA 2016 PDFs gives the overbar, each written after the digit it marks.
11
+ */
12
+ const OVERBAR_AFTER = /(\d)[\u0304\u0305\u00AF]/g;
13
+ /**
14
+ * An overbar written as a word before the digit it marks: `bar3`, `bar{3}`, and LaTeX's `\bar{3}`,
15
+ * `\bar 3`, `\overline{3}`. A space after the digit is kept.
16
+ */
17
+ const BAR_WORD = /\\?(?:bar|overline)\s*(?:\{\s*(\d)\s*\}|(\d))/g;
18
+ /**
19
+ * Primes: the prime (U+2032), the modifier letter prime (U+02B9) and the right single quotation
20
+ * mark (U+2019), which text editors put for an apostrophe.
21
+ */
22
+ const PRIMES = /[\u2032\u02B9\u2019]/g;
23
+ /** The minus sign (U+2212) and the hyphens (U+2010, U+2011) as the overbar `-`. */
24
+ const MINUS = /[\u2212\u2010\u2011]/g;
25
+ /** Unicode subscripts of Schoenflies symbols: the digits, h, v, i, s. */
26
+ const SUBSCRIPTS = new Map([
27
+ ['\u2080', '0'],
28
+ ['\u2081', '1'],
29
+ ['\u2082', '2'],
30
+ ['\u2083', '3'],
31
+ ['\u2084', '4'],
32
+ ['\u2085', '5'],
33
+ ['\u2086', '6'],
34
+ ['\u2087', '7'],
35
+ ['\u2088', '8'],
36
+ ['\u2089', '9'],
37
+ ['\u2095', 'h'],
38
+ ['\u1D65', 'v'],
39
+ ['\u1D62', 'i'],
40
+ ['\u209B', 's'],
41
+ ]);
42
+ const SUBSCRIPT = /[\u2080-\u2089\u2095\u1D65\u1D62\u209B]/g;
43
+ /** LaTeX subscripts of Schoenflies symbols: `C_{3v}`, `C_3v`. */
44
+ const LATEX_SUBSCRIPT = /_\{([^{}]*)\}|_/g;
45
+ /**
46
+ * A symbol in the spelling of this library, its spaces normalized (trimmed, every run one space):
47
+ * overbars as `-` before the digit, primes as `'`, Schoenflies subscripts as plain characters
48
+ * (Unicode subscripts, LaTeX's `_{3v}` and `_3`).
49
+ */
50
+ export function normalizeSymbol(text) {
51
+ return text
52
+ .normalize('NFD')
53
+ .replace(OVERBAR_AFTER, '-$1')
54
+ .replace(BAR_WORD, (_, braced, bare) => `-${braced ?? bare}`)
55
+ .replace(PRIMES, "'")
56
+ .replace(MINUS, '-')
57
+ .replace(SUBSCRIPT, (c) => SUBSCRIPTS.get(c))
58
+ .replace(LATEX_SUBSCRIPT, (_, inner) => inner ?? '')
59
+ .trim()
60
+ .replace(/\s+/g, ' ');
61
+ }
62
+ /** A normalized symbol without spaces. */
63
+ export function compactSymbol(text) {
64
+ return normalizeSymbol(text).replace(/ /g, '');
65
+ }
66
+ //# sourceMappingURL=notation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notation.js","sourceRoot":"","sources":["../src/not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;SACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC;SAC7C,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,KAAyB,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;SACvE,IAAI,EAAE;SACN,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACjD,CAAC"}
@@ -1,46 +1,60 @@
1
1
  /**
2
- * Point operations: a Cartesian matrix, optionally combined with time reversal, and the closure of
3
- * a set of generators into a group.
2
+ * Point operations: the record the API gives (the matrix W in the lattice basis and the Cartesian
3
+ * matrix, with time reversal), the Cartesian operation the calculations work with, and the closure
4
+ * of a set of generators into a group.
4
5
  */
5
6
  import { type Mat3 } from './linalg.js';
6
7
  /**
7
- * A point operation: an orthogonal Cartesian matrix (rotation, rotoinversion, mirror, inversion),
8
- * combined with time reversal if `timeReversal` is true (a primed operation).
8
+ * A point operation as the calculations use it: its orthogonal Cartesian matrix (rotation,
9
+ * rotoinversion, mirror, inversion), combined with time reversal if `timeReversal` is `true` (a primed
10
+ * operation). Every function that takes operations from a caller and computes with Cartesian
11
+ * matrices reads these two fields (`residualOperations` reads `matrix` instead), so an `Operation`
12
+ * of the API can be passed as it is.
9
13
  */
10
- export interface Operation {
14
+ export interface CartesianOperation {
11
15
  /** The orthogonal Cartesian 3×3 matrix, rows first. */
12
- readonly matrix: Mat3;
13
- /** True if the operation is combined with time reversal (a primed operation). */
16
+ readonly cartesian: Mat3;
17
+ /** `true` if the operation is combined with time reversal (a primed operation). */
14
18
  readonly timeReversal: boolean;
15
19
  }
16
- /** No point group has more than 48 operations (96 with time reversal); a closure beyond this is a data error. */
17
- export declare const MAX_GROUP_ORDER = 200;
18
- export declare const IDENTITY_OPERATION: Operation;
20
+ /**
21
+ * A point operation of a magnetic point group in a setting: ITA's matrix W in the lattice basis of
22
+ * the setting (`matrix`, integer, acting on the coordinates of a lattice direction [uvw]; the
23
+ * coordinate triplets of ITA's general position are its rows) and the same operation as an
24
+ * orthogonal Cartesian matrix (`cartesian`, R = B·W·B⁻¹ with the basis B of the setting), combined
25
+ * with time reversal if `timeReversal` is `true` (a primed operation). docs/conventions.md,
26
+ * "Operations".
27
+ */
28
+ export interface Operation extends CartesianOperation {
29
+ /** ITA's matrix W in the lattice basis of the setting, integer, rows first. */
30
+ readonly matrix: Mat3;
31
+ }
19
32
  /** A unitary operation (no time reversal). */
20
- export declare function operation(matrix: Mat3): Operation;
21
- /** Throws unless `m` is orthogonal (mᵀm = 1 within `EPSILON`): the code assumes Cartesian matrices. */
33
+ export declare function operation(cartesian: Mat3): CartesianOperation;
34
+ /** Throws unless `m` is orthogonal (mᵀm = 1 within `EPSILON` per entry): the code assumes Cartesian matrices. */
22
35
  export declare function checkOrthogonal(m: Mat3, what: string): void;
23
36
  /**
24
- * Throws unless mᵀm = 1 within the tolerance: the check of `checkOrthogonal` for a function with a
25
- * `tolerance` option, so that a matrix with rounding errors (e.g. rounded to 4 decimals) passes
26
- * with a larger one. Never stricter than `checkOrthogonal`.
37
+ * Throws unless mᵀm = 1 within the tolerance per entry, at least `EPSILON`, so that a matrix with
38
+ * rounding errors (e.g. rounded to 4 decimals) passes with a larger tolerance and a smaller one is
39
+ * never stricter than the default. A comparison that is false for NaN refuses a matrix with NaN.
27
40
  */
28
41
  export declare function checkOrthogonalWithin(m: Mat3, what: string, tolerance: number): void;
42
+ /**
43
+ * Checks the operations a caller passes in to a function that computes with Cartesian matrices:
44
+ * each must have `cartesian`, an orthogonal 3×3 matrix (within `tolerance`, at least `EPSILON`). A
45
+ * record without it is refused, so that the lattice matrix `matrix` cannot pass for a Cartesian one
46
+ * (docs/conventions.md, "Operations").
47
+ */
48
+ export declare function checkCartesianOperations(operations: readonly {
49
+ readonly cartesian: Mat3;
50
+ }[], tolerance?: number): void;
29
51
  /**
30
52
  * Checks operations that a caller passes in: each must say whether it is combined with time
31
53
  * reversal. Without this, an operation that lacks `timeReversal` (as the crystallographic API
32
54
  * returns them) would be composed as if it had it in every second product.
33
55
  */
34
- export declare function checkTimeReversal(operations: readonly Operation[]): void;
56
+ export declare function checkTimeReversal(operations: readonly CartesianOperation[]): void;
35
57
  /** The product a·b: first b, then a. */
36
- export declare function compose(a: Operation, b: Operation): Operation;
37
- export declare function operationsEqual(a: Operation, b: Operation): boolean;
38
- /** The operation expressed in a frame rotated by `s` (orthogonal): s·W·sᵀ. */
39
- export declare function transformOperation(op: Operation, s: Mat3): Operation;
40
- /**
41
- * The group generated by `generators`: the identity first, then the generators, then products in
42
- * the order they are found. The order of the result is therefore fixed by the generators.
43
- * Throws if the closure exceeds the order of any point group (a sign of wrong input data).
44
- */
45
- export declare function closeGroup(generators: readonly Operation[]): Operation[];
58
+ export declare function compose(a: CartesianOperation, b: CartesianOperation): CartesianOperation;
59
+ export declare function operationsEqual(a: CartesianOperation, b: CartesianOperation): boolean;
46
60
  //# sourceMappingURL=operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsD,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAG5F;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED,iHAAiH;AACjH,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,kBAAkB,EAAE,SAAqD,CAAC;AAEvF,8CAA8C;AAC9C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AC,SAAS,EAAE,IAAI,GAAG,kBAAkB,CAE7D;AAED,iHAAiH;AACjH,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAUpF;AAWD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,SAAS;IAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;CAAE,EAAE,EACnD,SAAS,SAAU,GAClB,IAAI,CAeN;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,SAAS,kBAAkB,EAAE,GAAG,IAAI,CASjF;AAED,wCAAwC;AACxC,wBAAgB,OAAO,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,CAExF;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAErF"}
@@ -1,93 +1,81 @@
1
1
  /**
2
- * Point operations: a Cartesian matrix, optionally combined with time reversal, and the closure of
3
- * a set of generators into a group.
2
+ * Point operations: the record the API gives (the matrix W in the lattice basis and the Cartesian
3
+ * matrix, with time reversal), the Cartesian operation the calculations work with, and the closure
4
+ * of a set of generators into a group.
4
5
  */
5
- import { IDENTITY, conjugate, matricesEqual, multiply, snap } from './linalg.js';
6
+ import { shown } from './checks.js';
7
+ import { matricesEqual, multiply, snap } from './linalg.js';
6
8
  import { EPSILON } from './tolerances.js';
7
- /** No point group has more than 48 operations (96 with time reversal); a closure beyond this is a data error. */
8
- export const MAX_GROUP_ORDER = 200;
9
- export const IDENTITY_OPERATION = { matrix: IDENTITY, timeReversal: false };
10
9
  /** A unitary operation (no time reversal). */
11
- export function operation(matrix) {
12
- return { matrix, timeReversal: false };
10
+ export function operation(cartesian) {
11
+ return { cartesian, timeReversal: false };
13
12
  }
14
- /** Throws unless `m` is orthogonal (mᵀm = 1 within `EPSILON`): the code assumes Cartesian matrices. */
13
+ /** Throws unless `m` is orthogonal (mᵀm = 1 within `EPSILON` per entry): the code assumes Cartesian matrices. */
15
14
  export function checkOrthogonal(m, what) {
16
- for (let i = 0; i < 3; i++) {
17
- for (let j = 0; j < 3; j++) {
18
- const dot = m[0][i] * m[0][j] + m[1][i] * m[1][j] + m[2][i] * m[2][j];
19
- // A comparison that is false for NaN, so that a matrix with NaN is refused as well.
20
- if (!(Math.abs(dot - (i === j ? 1 : 0)) <= EPSILON)) {
21
- throw new RangeError(`${what} is not an orthogonal (Cartesian) matrix: ${JSON.stringify(m)}`);
22
- }
23
- }
24
- }
15
+ checkOrthogonalWithin(m, what, EPSILON);
25
16
  }
26
17
  /**
27
- * Throws unless mᵀm = 1 within the tolerance: the check of `checkOrthogonal` for a function with a
28
- * `tolerance` option, so that a matrix with rounding errors (e.g. rounded to 4 decimals) passes
29
- * with a larger one. Never stricter than `checkOrthogonal`.
18
+ * Throws unless mᵀm = 1 within the tolerance per entry, at least `EPSILON`, so that a matrix with
19
+ * rounding errors (e.g. rounded to 4 decimals) passes with a larger tolerance and a smaller one is
20
+ * never stricter than the default. A comparison that is false for NaN refuses a matrix with NaN.
30
21
  */
31
22
  export function checkOrthogonalWithin(m, what, tolerance) {
32
- if (tolerance <= EPSILON) {
33
- checkOrthogonal(m, what);
34
- return;
35
- }
23
+ const t = Math.max(tolerance, EPSILON);
36
24
  for (let i = 0; i < 3; i++) {
37
25
  for (let j = 0; j < 3; j++) {
38
26
  const d = m[0][i] * m[0][j] + m[1][i] * m[1][j] + m[2][i] * m[2][j];
39
- if (!(Math.abs(d - (i === j ? 1 : 0)) < tolerance)) {
40
- throw new RangeError(`${what} is not an orthogonal (Cartesian) matrix: ${JSON.stringify(m)}`);
27
+ if (!(Math.abs(d - (i === j ? 1 : 0)) < t)) {
28
+ throw new RangeError(`${what} is not an orthogonal (Cartesian) matrix: ${shown(m)}`);
41
29
  }
42
30
  }
43
31
  }
44
32
  }
33
+ /** True for a 3×3 array of numbers (not checked for finiteness; the orthogonality check refuses NaN). */
34
+ function isMatrix3(m) {
35
+ return (Array.isArray(m) &&
36
+ m.length === 3 &&
37
+ m.every((row) => Array.isArray(row) && row.length === 3 && row.every((v) => typeof v === 'number')));
38
+ }
39
+ /**
40
+ * Checks the operations a caller passes in to a function that computes with Cartesian matrices:
41
+ * each must have `cartesian`, an orthogonal 3×3 matrix (within `tolerance`, at least `EPSILON`). A
42
+ * record without it is refused, so that the lattice matrix `matrix` cannot pass for a Cartesian one
43
+ * (docs/conventions.md, "Operations").
44
+ */
45
+ export function checkCartesianOperations(operations, tolerance = EPSILON) {
46
+ if (!Array.isArray(operations))
47
+ throw new RangeError('The operations must be an array');
48
+ operations.forEach((op, i) => {
49
+ const cartesian = op?.cartesian;
50
+ if (!isMatrix3(cartesian)) {
51
+ const hasMatrix = op?.matrix !== undefined;
52
+ throw new RangeError(`Operation ${i} has no Cartesian matrix (field cartesian, a 3×3 array of numbers)` +
53
+ (hasMatrix
54
+ ? '; its field matrix is the matrix W in the lattice basis since symcrys 0.11.0, so pass the operations as operations() gives them, or the Cartesian matrix as cartesian'
55
+ : ''));
56
+ }
57
+ checkOrthogonalWithin(cartesian, `Operation ${i}`, tolerance);
58
+ });
59
+ }
45
60
  /**
46
61
  * Checks operations that a caller passes in: each must say whether it is combined with time
47
62
  * reversal. Without this, an operation that lacks `timeReversal` (as the crystallographic API
48
63
  * returns them) would be composed as if it had it in every second product.
49
64
  */
50
65
  export function checkTimeReversal(operations) {
66
+ if (!Array.isArray(operations))
67
+ throw new RangeError('The operations must be an array');
51
68
  operations.forEach((op, i) => {
52
- if (typeof op.timeReversal !== 'boolean') {
53
- throw new RangeError(`Operation ${i}: timeReversal must be true or false, not ${JSON.stringify(op.timeReversal)}; an operation of the magnetic API says whether it is combined with time reversal`);
69
+ if (typeof op?.timeReversal !== 'boolean') {
70
+ throw new RangeError(`Operation ${i}: timeReversal must be true or false, not ${shown(op?.timeReversal)}; an operation of the magnetic API says whether it is combined with time reversal`);
54
71
  }
55
72
  });
56
73
  }
57
74
  /** The product a·b: first b, then a. */
58
75
  export function compose(a, b) {
59
- return { matrix: snap(multiply(a.matrix, b.matrix)), timeReversal: a.timeReversal !== b.timeReversal };
76
+ return { cartesian: snap(multiply(a.cartesian, b.cartesian)), timeReversal: a.timeReversal !== b.timeReversal };
60
77
  }
61
78
  export function operationsEqual(a, b) {
62
- return a.timeReversal === b.timeReversal && matricesEqual(a.matrix, b.matrix);
63
- }
64
- /** The operation expressed in a frame rotated by `s` (orthogonal): s·W·sᵀ. */
65
- export function transformOperation(op, s) {
66
- return { matrix: snap(conjugate(op.matrix, s)), timeReversal: op.timeReversal };
67
- }
68
- /**
69
- * The group generated by `generators`: the identity first, then the generators, then products in
70
- * the order they are found. The order of the result is therefore fixed by the generators.
71
- * Throws if the closure exceeds the order of any point group (a sign of wrong input data).
72
- */
73
- export function closeGroup(generators) {
74
- const group = [IDENTITY_OPERATION];
75
- const add = (op) => {
76
- if (group.some((g) => operationsEqual(g, op)))
77
- return false;
78
- if (group.length >= MAX_GROUP_ORDER)
79
- throw new Error('closeGroup: closure does not terminate; check the generators');
80
- group.push(op);
81
- return true;
82
- };
83
- for (const g of generators)
84
- add({ matrix: snap(g.matrix), timeReversal: g.timeReversal });
85
- for (let i = 0; i < group.length; i++) {
86
- for (let j = 0; j <= i; j++) {
87
- add(compose(group[i], group[j]));
88
- add(compose(group[j], group[i]));
89
- }
90
- }
91
- return group;
79
+ return a.timeReversal === b.timeReversal && matricesEqual(a.cartesian, b.cartesian);
92
80
  }
93
81
  //# sourceMappingURL=operations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EA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