react-cheminfo 0.76.0 → 0.78.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 (389) hide show
  1. package/README.md +141 -31
  2. package/lib/card/core/cardAddress.d.ts +19 -2
  3. package/lib/card/core/cardAddress.d.ts.map +1 -1
  4. package/lib/card/core/cardAddress.js +35 -2
  5. package/lib/card/core/cardAddress.js.map +1 -1
  6. package/lib/card/core/cardPageUrl.d.ts +7 -1
  7. package/lib/card/core/cardPageUrl.d.ts.map +1 -1
  8. package/lib/card/core/cardPageUrl.js +4 -2
  9. package/lib/card/core/cardPageUrl.js.map +1 -1
  10. package/lib/card/core/index.d.ts +1 -1
  11. package/lib/card/core/index.d.ts.map +1 -1
  12. package/lib/card/core/index.js +1 -1
  13. package/lib/card/core/index.js.map +1 -1
  14. package/lib/credits/core/credits.d.ts +30 -0
  15. package/lib/credits/core/credits.d.ts.map +1 -1
  16. package/lib/credits/core/credits.js +35 -0
  17. package/lib/credits/core/credits.js.map +1 -1
  18. package/lib/download/core/downloadFigure.d.ts +12 -1
  19. package/lib/download/core/downloadFigure.d.ts.map +1 -1
  20. package/lib/download/core/downloadFigure.js +21 -0
  21. package/lib/download/core/downloadFigure.js.map +1 -1
  22. package/lib/download/core/figureDpi.d.ts +59 -0
  23. package/lib/download/core/figureDpi.d.ts.map +1 -0
  24. package/lib/download/core/figureDpi.js +75 -0
  25. package/lib/download/core/figureDpi.js.map +1 -0
  26. package/lib/download/core/figurePng.d.ts +4 -1
  27. package/lib/download/core/figurePng.d.ts.map +1 -1
  28. package/lib/download/core/figurePng.js +11 -2
  29. package/lib/download/core/figurePng.js.map +1 -1
  30. package/lib/download/core/index.d.ts +4 -1
  31. package/lib/download/core/index.d.ts.map +1 -1
  32. package/lib/download/core/index.js +3 -1
  33. package/lib/download/core/index.js.map +1 -1
  34. package/lib/download/core/pngDpi.d.ts +22 -0
  35. package/lib/download/core/pngDpi.d.ts.map +1 -0
  36. package/lib/download/core/pngDpi.js +79 -0
  37. package/lib/download/core/pngDpi.js.map +1 -0
  38. package/lib/download/ui/FigureDownloadPanel.d.ts +13 -0
  39. package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
  40. package/lib/download/ui/FigureDownloadPanel.js +18 -34
  41. package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
  42. package/lib/download/ui/figureDownloadHint.d.ts +5 -0
  43. package/lib/download/ui/figureDownloadHint.d.ts.map +1 -1
  44. package/lib/download/ui/figureDownloadHint.js +8 -0
  45. package/lib/download/ui/figureDownloadHint.js.map +1 -1
  46. package/lib/download/ui/figureDownloadOptions.d.ts +84 -0
  47. package/lib/download/ui/figureDownloadOptions.d.ts.map +1 -0
  48. package/lib/download/ui/figureDownloadOptions.js +2 -0
  49. package/lib/download/ui/figureDownloadOptions.js.map +1 -0
  50. package/lib/download/ui/resolutionChoices.d.ts +27 -0
  51. package/lib/download/ui/resolutionChoices.d.ts.map +1 -0
  52. package/lib/download/ui/resolutionChoices.js +48 -0
  53. package/lib/download/ui/resolutionChoices.js.map +1 -0
  54. package/lib/download/ui/useFigureActions.d.ts +4 -1
  55. package/lib/download/ui/useFigureActions.d.ts.map +1 -1
  56. package/lib/download/ui/useFigureActions.js +17 -8
  57. package/lib/download/ui/useFigureActions.js.map +1 -1
  58. package/lib/download/ui/useFigureDownload.d.ts +2 -55
  59. package/lib/download/ui/useFigureDownload.d.ts.map +1 -1
  60. package/lib/download/ui/useFigureDownload.js +45 -13
  61. package/lib/download/ui/useFigureDownload.js.map +1 -1
  62. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  63. package/lib/ecosystem/core/sites.js +14 -0
  64. package/lib/ecosystem/core/sites.js.map +1 -1
  65. package/lib/ecosystem/core/types.d.ts +1 -1
  66. package/lib/ecosystem/core/types.d.ts.map +1 -1
  67. package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
  68. package/lib/ecosystem/ui/glyphs.js +3 -0
  69. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  70. package/lib/host/core/connectHost.js +1 -1
  71. package/lib/host/core/connectHost.js.map +1 -1
  72. package/lib/host/core/connectTool.d.ts +103 -0
  73. package/lib/host/core/connectTool.d.ts.map +1 -0
  74. package/lib/host/core/connectTool.js +169 -0
  75. package/lib/host/core/connectTool.js.map +1 -0
  76. package/lib/host/core/hostOutputs.d.ts +16 -3
  77. package/lib/host/core/hostOutputs.d.ts.map +1 -1
  78. package/lib/host/core/hostOutputs.js +38 -4
  79. package/lib/host/core/hostOutputs.js.map +1 -1
  80. package/lib/host/core/index.d.ts +8 -2
  81. package/lib/host/core/index.d.ts.map +1 -1
  82. package/lib/host/core/index.js +4 -1
  83. package/lib/host/core/index.js.map +1 -1
  84. package/lib/host/core/kinds.d.ts +31 -3
  85. package/lib/host/core/kinds.d.ts.map +1 -1
  86. package/lib/host/core/kinds.js +35 -4
  87. package/lib/host/core/kinds.js.map +1 -1
  88. package/lib/host/core/messageValues.d.ts +29 -0
  89. package/lib/host/core/messageValues.d.ts.map +1 -0
  90. package/lib/host/core/messageValues.js +57 -0
  91. package/lib/host/core/messageValues.js.map +1 -0
  92. package/lib/host/core/protocol.d.ts +2 -5
  93. package/lib/host/core/protocol.d.ts.map +1 -1
  94. package/lib/host/core/protocol.js +3 -37
  95. package/lib/host/core/protocol.js.map +1 -1
  96. package/lib/host/core/resultKinds.d.ts +74 -0
  97. package/lib/host/core/resultKinds.d.ts.map +1 -0
  98. package/lib/host/core/resultKinds.js +40 -0
  99. package/lib/host/core/resultKinds.js.map +1 -0
  100. package/lib/host/core/toolMessages.d.ts +24 -0
  101. package/lib/host/core/toolMessages.d.ts.map +1 -0
  102. package/lib/host/core/toolMessages.js +136 -0
  103. package/lib/host/core/toolMessages.js.map +1 -0
  104. package/lib/host/ui/index.d.ts +2 -0
  105. package/lib/host/ui/index.d.ts.map +1 -1
  106. package/lib/host/ui/index.js +1 -0
  107. package/lib/host/ui/index.js.map +1 -1
  108. package/lib/host/ui/useFramedTool.d.ts +74 -0
  109. package/lib/host/ui/useFramedTool.d.ts.map +1 -0
  110. package/lib/host/ui/useFramedTool.js +125 -0
  111. package/lib/host/ui/useFramedTool.js.map +1 -0
  112. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  113. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  114. package/lib/locales/de.json +30 -1
  115. package/lib/locales/en.json +30 -1
  116. package/lib/locales/es.json +30 -1
  117. package/lib/locales/fr.json +30 -1
  118. package/lib/locales/it.json +30 -1
  119. package/lib/molecule3d/ui/Molecule3DStage.d.ts +4 -33
  120. package/lib/molecule3d/ui/Molecule3DStage.d.ts.map +1 -1
  121. package/lib/molecule3d/ui/Molecule3DStage.js +3 -37
  122. package/lib/molecule3d/ui/Molecule3DStage.js.map +1 -1
  123. package/lib/molecule3d/ui/MoleculeCanvas3D.d.ts.map +1 -1
  124. package/lib/molecule3d/ui/MoleculeCanvas3D.js +10 -2
  125. package/lib/molecule3d/ui/MoleculeCanvas3D.js.map +1 -1
  126. package/lib/molecule3d/ui/exportMoleculeImage.d.ts +10 -0
  127. package/lib/molecule3d/ui/exportMoleculeImage.d.ts.map +1 -1
  128. package/lib/molecule3d/ui/exportMoleculeImage.js +17 -0
  129. package/lib/molecule3d/ui/exportMoleculeImage.js.map +1 -1
  130. package/lib/molecule3d/ui/index.d.ts +1 -1
  131. package/lib/molecule3d/ui/index.d.ts.map +1 -1
  132. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +23 -0
  133. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
  134. package/lib/molecule3d/ui/useImageExport.d.ts +3 -0
  135. package/lib/molecule3d/ui/useImageExport.d.ts.map +1 -1
  136. package/lib/molecule3d/ui/useImageExport.js +21 -3
  137. package/lib/molecule3d/ui/useImageExport.js.map +1 -1
  138. package/lib/osiris/core/barGeometry.d.ts +42 -0
  139. package/lib/osiris/core/barGeometry.d.ts.map +1 -0
  140. package/lib/osiris/core/barGeometry.js +46 -0
  141. package/lib/osiris/core/barGeometry.js.map +1 -0
  142. package/lib/osiris/core/computeProperties.d.ts +42 -0
  143. package/lib/osiris/core/computeProperties.d.ts.map +1 -0
  144. package/lib/osiris/core/computeProperties.js +115 -0
  145. package/lib/osiris/core/computeProperties.js.map +1 -0
  146. package/lib/osiris/core/constants.d.ts +70 -0
  147. package/lib/osiris/core/constants.d.ts.map +1 -0
  148. package/lib/osiris/core/constants.js +99 -0
  149. package/lib/osiris/core/constants.js.map +1 -0
  150. package/lib/osiris/core/fitness.d.ts +32 -0
  151. package/lib/osiris/core/fitness.d.ts.map +1 -0
  152. package/lib/osiris/core/fitness.js +48 -0
  153. package/lib/osiris/core/fitness.js.map +1 -0
  154. package/lib/osiris/core/index.d.ts +29 -0
  155. package/lib/osiris/core/index.d.ts.map +1 -0
  156. package/lib/osiris/core/index.js +19 -0
  157. package/lib/osiris/core/index.js.map +1 -0
  158. package/lib/osiris/core/poolSize.d.ts +17 -0
  159. package/lib/osiris/core/poolSize.d.ts.map +1 -0
  160. package/lib/osiris/core/poolSize.js +22 -0
  161. package/lib/osiris/core/poolSize.js.map +1 -0
  162. package/lib/osiris/core/poolTypes.d.ts +140 -0
  163. package/lib/osiris/core/poolTypes.d.ts.map +1 -0
  164. package/lib/osiris/core/poolTypes.js +12 -0
  165. package/lib/osiris/core/poolTypes.js.map +1 -0
  166. package/lib/osiris/core/predictIdCode.d.ts +39 -0
  167. package/lib/osiris/core/predictIdCode.d.ts.map +1 -0
  168. package/lib/osiris/core/predictIdCode.js +54 -0
  169. package/lib/osiris/core/predictIdCode.js.map +1 -0
  170. package/lib/osiris/core/predictProtocol.d.ts +67 -0
  171. package/lib/osiris/core/predictProtocol.d.ts.map +1 -0
  172. package/lib/osiris/core/predictProtocol.js +29 -0
  173. package/lib/osiris/core/predictProtocol.js.map +1 -0
  174. package/lib/osiris/core/predictionPool.d.ts +23 -0
  175. package/lib/osiris/core/predictionPool.d.ts.map +1 -0
  176. package/lib/osiris/core/predictionPool.js +186 -0
  177. package/lib/osiris/core/predictionPool.js.map +1 -0
  178. package/lib/osiris/core/predictionQueue.d.ts +46 -0
  179. package/lib/osiris/core/predictionQueue.d.ts.map +1 -0
  180. package/lib/osiris/core/predictionQueue.js +57 -0
  181. package/lib/osiris/core/predictionQueue.js.map +1 -0
  182. package/lib/osiris/core/predictors.d.ts +62 -0
  183. package/lib/osiris/core/predictors.d.ts.map +1 -0
  184. package/lib/osiris/core/predictors.js +100 -0
  185. package/lib/osiris/core/predictors.js.map +1 -0
  186. package/lib/osiris/core/propertyKeys.d.ts +32 -0
  187. package/lib/osiris/core/propertyKeys.d.ts.map +1 -0
  188. package/lib/osiris/core/propertyKeys.js +44 -0
  189. package/lib/osiris/core/propertyKeys.js.map +1 -0
  190. package/lib/osiris/core/riskAppearance.d.ts +60 -0
  191. package/lib/osiris/core/riskAppearance.d.ts.map +1 -0
  192. package/lib/osiris/core/riskAppearance.js +59 -0
  193. package/lib/osiris/core/riskAppearance.js.map +1 -0
  194. package/lib/osiris/core/riskDetail.d.ts +22 -0
  195. package/lib/osiris/core/riskDetail.d.ts.map +1 -0
  196. package/lib/osiris/core/riskDetail.js +86 -0
  197. package/lib/osiris/core/riskDetail.js.map +1 -0
  198. package/lib/osiris/core/riskDetailRequest.d.ts +31 -0
  199. package/lib/osiris/core/riskDetailRequest.d.ts.map +1 -0
  200. package/lib/osiris/core/riskDetailRequest.js +49 -0
  201. package/lib/osiris/core/riskDetailRequest.js.map +1 -0
  202. package/lib/osiris/core/riskFindings.d.ts +26 -0
  203. package/lib/osiris/core/riskFindings.d.ts.map +1 -0
  204. package/lib/osiris/core/riskFindings.js +79 -0
  205. package/lib/osiris/core/riskFindings.js.map +1 -0
  206. package/lib/osiris/core/runPredictionJob.d.ts +20 -0
  207. package/lib/osiris/core/runPredictionJob.d.ts.map +1 -0
  208. package/lib/osiris/core/runPredictionJob.js +43 -0
  209. package/lib/osiris/core/runPredictionJob.js.map +1 -0
  210. package/lib/osiris/core/scales.d.ts +70 -0
  211. package/lib/osiris/core/scales.d.ts.map +1 -0
  212. package/lib/osiris/core/scales.js +185 -0
  213. package/lib/osiris/core/scales.js.map +1 -0
  214. package/lib/osiris/core/types.d.ts +91 -0
  215. package/lib/osiris/core/types.d.ts.map +1 -0
  216. package/lib/osiris/core/types.js +19 -0
  217. package/lib/osiris/core/types.js.map +1 -0
  218. package/lib/osiris/core/valuation.d.ts +28 -0
  219. package/lib/osiris/core/valuation.d.ts.map +1 -0
  220. package/lib/osiris/core/valuation.js +39 -0
  221. package/lib/osiris/core/valuation.js.map +1 -0
  222. package/lib/osiris/ui/PropertyBar.d.ts +27 -0
  223. package/lib/osiris/ui/PropertyBar.d.ts.map +1 -0
  224. package/lib/osiris/ui/PropertyBar.js +27 -0
  225. package/lib/osiris/ui/PropertyBar.js.map +1 -0
  226. package/lib/osiris/ui/PropertyPanel.d.ts +91 -0
  227. package/lib/osiris/ui/PropertyPanel.d.ts.map +1 -0
  228. package/lib/osiris/ui/PropertyPanel.js +77 -0
  229. package/lib/osiris/ui/PropertyPanel.js.map +1 -0
  230. package/lib/osiris/ui/PropertyRows.d.ts +40 -0
  231. package/lib/osiris/ui/PropertyRows.d.ts.map +1 -0
  232. package/lib/osiris/ui/PropertyRows.js +23 -0
  233. package/lib/osiris/ui/PropertyRows.js.map +1 -0
  234. package/lib/osiris/ui/RiskFindings.d.ts +43 -0
  235. package/lib/osiris/ui/RiskFindings.d.ts.map +1 -0
  236. package/lib/osiris/ui/RiskFindings.js +51 -0
  237. package/lib/osiris/ui/RiskFindings.js.map +1 -0
  238. package/lib/osiris/ui/RiskPanel.d.ts +46 -0
  239. package/lib/osiris/ui/RiskPanel.d.ts.map +1 -0
  240. package/lib/osiris/ui/RiskPanel.js +32 -0
  241. package/lib/osiris/ui/RiskPanel.js.map +1 -0
  242. package/lib/osiris/ui/RiskSquare.d.ts +51 -0
  243. package/lib/osiris/ui/RiskSquare.d.ts.map +1 -0
  244. package/lib/osiris/ui/RiskSquare.js +23 -0
  245. package/lib/osiris/ui/RiskSquare.js.map +1 -0
  246. package/lib/osiris/ui/index.d.ts +15 -0
  247. package/lib/osiris/ui/index.d.ts.map +1 -0
  248. package/lib/osiris/ui/index.js +8 -0
  249. package/lib/osiris/ui/index.js.map +1 -0
  250. package/lib/osiris/ui/usePredictions.d.ts +81 -0
  251. package/lib/osiris/ui/usePredictions.d.ts.map +1 -0
  252. package/lib/osiris/ui/usePredictions.js +102 -0
  253. package/lib/osiris/ui/usePredictions.js.map +1 -0
  254. package/lib/osiris-ui.d.ts +11 -0
  255. package/lib/osiris-ui.d.ts.map +1 -0
  256. package/lib/osiris-ui.js +11 -0
  257. package/lib/osiris-ui.js.map +1 -0
  258. package/lib/osiris.d.ts +17 -0
  259. package/lib/osiris.d.ts.map +1 -0
  260. package/lib/osiris.js +17 -0
  261. package/lib/osiris.js.map +1 -0
  262. package/lib/panel/ui/FilterInput.d.ts.map +1 -1
  263. package/lib/panel/ui/FilterInput.js +3 -1
  264. package/lib/panel/ui/FilterInput.js.map +1 -1
  265. package/lib/panel/ui/SidePanelItem.d.ts +39 -0
  266. package/lib/panel/ui/SidePanelItem.d.ts.map +1 -0
  267. package/lib/panel/ui/SidePanelItem.js +63 -0
  268. package/lib/panel/ui/SidePanelItem.js.map +1 -0
  269. package/lib/panel/ui/SidePanelStack.d.ts +11 -10
  270. package/lib/panel/ui/SidePanelStack.d.ts.map +1 -1
  271. package/lib/panel/ui/SidePanelStack.js +22 -15
  272. package/lib/panel/ui/SidePanelStack.js.map +1 -1
  273. package/lib/panel/ui/SpectrumColorSwatch.d.ts.map +1 -1
  274. package/lib/panel/ui/SpectrumColorSwatch.js +4 -2
  275. package/lib/panel/ui/SpectrumColorSwatch.js.map +1 -1
  276. package/lib/panel/ui/usePanelFolds.d.ts +35 -0
  277. package/lib/panel/ui/usePanelFolds.d.ts.map +1 -0
  278. package/lib/panel/ui/usePanelFolds.js +73 -0
  279. package/lib/panel/ui/usePanelFolds.js.map +1 -0
  280. package/lib/shared/ui/FullscreenStage.d.ts +43 -0
  281. package/lib/shared/ui/FullscreenStage.d.ts.map +1 -0
  282. package/lib/shared/ui/FullscreenStage.js +38 -0
  283. package/lib/shared/ui/FullscreenStage.js.map +1 -0
  284. package/lib/shared/ui/canFillScreen.d.ts +7 -0
  285. package/lib/shared/ui/canFillScreen.d.ts.map +1 -0
  286. package/lib/shared/ui/canFillScreen.js +9 -0
  287. package/lib/shared/ui/canFillScreen.js.map +1 -0
  288. package/lib/shared/ui/index.d.ts +3 -0
  289. package/lib/shared/ui/index.d.ts.map +1 -1
  290. package/lib/shared/ui/index.js +2 -0
  291. package/lib/shared/ui/index.js.map +1 -1
  292. package/lib/split/ui/splitPanes.d.ts +3 -3
  293. package/lib/split/ui/splitPanes.js +1 -1
  294. package/lib/structure/core/structureNotations.d.ts +8 -1
  295. package/lib/structure/core/structureNotations.d.ts.map +1 -1
  296. package/lib/structure/core/structureNotations.js +14 -8
  297. package/lib/structure/core/structureNotations.js.map +1 -1
  298. package/lib/structure/ui/StructureExportPanel.d.ts +8 -0
  299. package/lib/structure/ui/StructureExportPanel.d.ts.map +1 -1
  300. package/lib/structure/ui/StructureExportPanel.js +9 -4
  301. package/lib/structure/ui/StructureExportPanel.js.map +1 -1
  302. package/lib/structure/ui/index.d.ts +1 -0
  303. package/lib/structure/ui/index.d.ts.map +1 -1
  304. package/lib/structure/ui/index.js.map +1 -1
  305. package/package.json +4 -1
  306. package/src/card/core/cardAddress.ts +39 -3
  307. package/src/card/core/cardPageUrl.ts +10 -3
  308. package/src/card/core/index.ts +7 -1
  309. package/src/credits/core/credits.ts +40 -0
  310. package/src/download/core/downloadFigure.ts +26 -1
  311. package/src/download/core/figureDpi.ts +94 -0
  312. package/src/download/core/figurePng.ts +11 -2
  313. package/src/download/core/index.ts +13 -1
  314. package/src/download/core/pngDpi.ts +84 -0
  315. package/src/download/ui/FigureDownloadPanel.tsx +41 -51
  316. package/src/download/ui/figureDownloadHint.ts +13 -0
  317. package/src/download/ui/figureDownloadOptions.ts +85 -0
  318. package/src/download/ui/resolutionChoices.ts +67 -0
  319. package/src/download/ui/useFigureActions.ts +24 -9
  320. package/src/download/ui/useFigureDownload.tsx +57 -71
  321. package/src/ecosystem/core/sites.ts +14 -0
  322. package/src/ecosystem/core/types.ts +2 -1
  323. package/src/ecosystem/ui/glyphs.tsx +20 -0
  324. package/src/host/core/connectHost.ts +1 -1
  325. package/src/host/core/connectTool.ts +285 -0
  326. package/src/host/core/hostOutputs.ts +47 -5
  327. package/src/host/core/index.ts +20 -1
  328. package/src/host/core/kinds.ts +53 -8
  329. package/src/host/core/messageValues.ts +58 -0
  330. package/src/host/core/protocol.ts +5 -37
  331. package/src/host/core/resultKinds.ts +65 -0
  332. package/src/host/core/toolMessages.ts +160 -0
  333. package/src/host/ui/index.ts +6 -0
  334. package/src/host/ui/useFramedTool.ts +213 -0
  335. package/src/locales/de.json +30 -1
  336. package/src/locales/en.json +30 -1
  337. package/src/locales/es.json +30 -1
  338. package/src/locales/fr.json +30 -1
  339. package/src/locales/it.json +30 -1
  340. package/src/molecule3d/ui/Molecule3DStage.tsx +4 -88
  341. package/src/molecule3d/ui/MoleculeCanvas3D.tsx +10 -1
  342. package/src/molecule3d/ui/exportMoleculeImage.ts +22 -0
  343. package/src/molecule3d/ui/index.ts +4 -1
  344. package/src/molecule3d/ui/moleculeViewer3DProps.ts +24 -0
  345. package/src/molecule3d/ui/useImageExport.ts +28 -2
  346. package/src/osiris/core/barGeometry.ts +74 -0
  347. package/src/osiris/core/computeProperties.ts +175 -0
  348. package/src/osiris/core/constants.ts +110 -0
  349. package/src/osiris/core/fitness.ts +59 -0
  350. package/src/osiris/core/index.ts +78 -0
  351. package/src/osiris/core/poolSize.ts +24 -0
  352. package/src/osiris/core/poolTypes.ts +140 -0
  353. package/src/osiris/core/predictIdCode.ts +69 -0
  354. package/src/osiris/core/predictProtocol.ts +78 -0
  355. package/src/osiris/core/predictionPool.ts +237 -0
  356. package/src/osiris/core/predictionQueue.ts +89 -0
  357. package/src/osiris/core/predictors.ts +142 -0
  358. package/src/osiris/core/propertyKeys.ts +54 -0
  359. package/src/osiris/core/riskAppearance.ts +86 -0
  360. package/src/osiris/core/riskDetail.ts +120 -0
  361. package/src/osiris/core/riskDetailRequest.ts +64 -0
  362. package/src/osiris/core/riskFindings.ts +92 -0
  363. package/src/osiris/core/runPredictionJob.ts +49 -0
  364. package/src/osiris/core/scales.ts +236 -0
  365. package/src/osiris/core/types.ts +103 -0
  366. package/src/osiris/core/valuation.ts +44 -0
  367. package/src/osiris/ui/PropertyBar.tsx +77 -0
  368. package/src/osiris/ui/PropertyPanel.tsx +227 -0
  369. package/src/osiris/ui/PropertyRows.tsx +92 -0
  370. package/src/osiris/ui/RiskFindings.tsx +137 -0
  371. package/src/osiris/ui/RiskPanel.tsx +81 -0
  372. package/src/osiris/ui/RiskSquare.tsx +108 -0
  373. package/src/osiris/ui/index.ts +17 -0
  374. package/src/osiris/ui/usePredictions.ts +194 -0
  375. package/src/osiris-ui.ts +11 -0
  376. package/src/osiris.ts +17 -0
  377. package/src/panel/ui/FilterInput.tsx +4 -1
  378. package/src/panel/ui/SidePanelItem.tsx +162 -0
  379. package/src/panel/ui/SidePanelStack.tsx +29 -36
  380. package/src/panel/ui/SpectrumColorSwatch.tsx +5 -3
  381. package/src/panel/ui/usePanelFolds.ts +103 -0
  382. package/src/shared/ui/FullscreenStage.tsx +96 -0
  383. package/src/shared/ui/canFillScreen.ts +8 -0
  384. package/src/shared/ui/index.ts +6 -0
  385. package/src/split/ui/splitPanes.tsx +4 -4
  386. package/src/structure/core/structureNotations.ts +25 -8
  387. package/src/structure/ui/StructureExportPanel.tsx +23 -4
  388. package/src/structure/ui/index.ts +4 -0
  389. package/styles/osiris.css +339 -0
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Asking a worker why one risk came back as it did, and asking again when the
3
+ * set's cancel took the question with it.
4
+ *
5
+ * An explanation travels on a properties channel, and `cancel` drops every
6
+ * request on every channel — the reader's click included, which then reads as
7
+ * the channel's own words in place of the findings. It is not part of the set
8
+ * being abandoned, so it is simply asked for again.
9
+ *
10
+ * A channel of its own would be the other way, and is worse here: a channel
11
+ * makes its worker on the first request, so the first click would wait for
12
+ * OpenChemLib and the 398 kB of resource tables to load in a cold worker,
13
+ * where the shared one is already warm. The retry costs one more message on a
14
+ * worker that is running anyway.
15
+ */
16
+ import { CancelledRequestError } from "../../worker/core/errors.js";
17
+ /** What the reader is told when the second ask was dropped as well. */
18
+ export const RISK_DETAIL_DROPPED = 'That explanation was dropped when the run stopped. Close the risk square and open it again.';
19
+ /**
20
+ * Ask a worker to explain one risk, once more if a cancel dropped the ask.
21
+ * @param channelOf - Picks the channel to ask on, called again for the retry so it lands on whichever worker is least busy by then.
22
+ * @param request - The explanation to ask for.
23
+ * @param mayRetry - Whether asking again can still be answered: false once the pool is terminated, or once its resources are known not to have loaded.
24
+ * @returns Whatever the worker answered, including its `unavailable`.
25
+ * @throws {Error} When the ask was dropped and cannot be made again.
26
+ */
27
+ export async function requestRiskDetail(channelOf, request, mayRetry) {
28
+ try {
29
+ return await channelOf().request(request);
30
+ }
31
+ catch (error) {
32
+ if (!(error instanceof CancelledRequestError))
33
+ throw error;
34
+ if (!mayRetry())
35
+ throw new Error(RISK_DETAIL_DROPPED, { cause: error });
36
+ }
37
+ return askAgain(channelOf, request);
38
+ }
39
+ async function askAgain(channelOf, request) {
40
+ try {
41
+ return await channelOf().request(request);
42
+ }
43
+ catch (error) {
44
+ if (!(error instanceof CancelledRequestError))
45
+ throw error;
46
+ throw new Error(RISK_DETAIL_DROPPED, { cause: error });
47
+ }
48
+ }
49
+ //# sourceMappingURL=riskDetailRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"riskDetailRequest.js","sourceRoot":"","sources":["../../../src/osiris/core/riskDetailRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAWpE,uEAAuE;AACvE,MAAM,CAAC,MAAM,mBAAmB,GAC9B,6FAA6F,CAAC;AAEhG;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,SAAwB,EACxB,OAA0B,EAC1B,QAAuB;IAEvB,IAAI,CAAC;QACH,OAAO,MAAM,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,qBAAqB,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3D,IAAI,CAAC,QAAQ,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC;AAED,KAAK,UAAU,QAAQ,CACrB,SAAwB,EACxB,OAA0B;IAE1B,IAAI,CAAC;QACH,OAAO,MAAM,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,qBAAqB,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC;AACH,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Reading what the toxicity predictor printed.
3
+ *
4
+ * `getDetail` answers a flat list of typed strings — 1 is an idCode, 2 is text,
5
+ * 3 is a number — in which a text line heads the idCodes that follow it. Which
6
+ * text line it is matters more than anything else the tool shows: "This
7
+ * molecule is known to be mutagenic" means the compound's own idCode is in a
8
+ * list derived from RTECS, and the idCode that follows is **the molecule
9
+ * itself**; "High-risk fragments indicating Mutagenicity" means a substructure
10
+ * matched, and the idCodes that follow are the substructures.
11
+ *
12
+ * Telling them apart is what keeps the red square honest: aspirin, caffeine and
13
+ * paracetamol all come back high through the first branch, and highlighting the
14
+ * whole molecule there would call the compound its own toxicophore.
15
+ */
16
+ import type { DetailEntry, RiskFinding } from './types.ts';
17
+ /**
18
+ * Turn what the predictor printed into the lines a page shows.
19
+ *
20
+ * The matched atoms are left empty here: finding them needs the molecule and
21
+ * the predictor's own match mode, which `riskDetail` supplies.
22
+ * @param entries - What `ToxicityPredictor.getDetail` returned.
23
+ * @returns One finding per sentence, and one per matched fragment.
24
+ */
25
+ export declare function parseRiskFindings(entries: readonly DetailEntry[]): RiskFinding[];
26
+ //# sourceMappingURL=riskFindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"riskFindings.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/riskFindings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO3D;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,WAAW,EAAE,GAC9B,WAAW,EAAE,CAmBf"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Reading what the toxicity predictor printed.
3
+ *
4
+ * `getDetail` answers a flat list of typed strings — 1 is an idCode, 2 is text,
5
+ * 3 is a number — in which a text line heads the idCodes that follow it. Which
6
+ * text line it is matters more than anything else the tool shows: "This
7
+ * molecule is known to be mutagenic" means the compound's own idCode is in a
8
+ * list derived from RTECS, and the idCode that follows is **the molecule
9
+ * itself**; "High-risk fragments indicating Mutagenicity" means a substructure
10
+ * matched, and the idCodes that follow are the substructures.
11
+ *
12
+ * Telling them apart is what keeps the red square honest: aspirin, caffeine and
13
+ * paracetamol all come back high through the first branch, and highlighting the
14
+ * whole molecule there would call the compound its own toxicophore.
15
+ */
16
+ /** An idCode, to be drawn as a structure. */
17
+ const ID_CODE = 1;
18
+ /** Plain text. */
19
+ const TEXT = 2;
20
+ /**
21
+ * Turn what the predictor printed into the lines a page shows.
22
+ *
23
+ * The matched atoms are left empty here: finding them needs the molecule and
24
+ * the predictor's own match mode, which `riskDetail` supplies.
25
+ * @param entries - What `ToxicityPredictor.getDetail` returned.
26
+ * @returns One finding per sentence, and one per matched fragment.
27
+ */
28
+ export function parseRiskFindings(entries) {
29
+ const findings = [];
30
+ let heading = { kind: 'note', description: '', severity: null };
31
+ for (const entry of entries) {
32
+ if (entry.type === TEXT) {
33
+ heading = readHeading(entry.value);
34
+ // A fragment heading says nothing on its own; it is repeated on each of
35
+ // the fragments that follow it, so the page can draw one row per match.
36
+ if (heading.kind !== 'fragment')
37
+ findings.push(line(heading));
38
+ continue;
39
+ }
40
+ if (entry.type !== ID_CODE)
41
+ continue;
42
+ // The idCode under a known-molecule heading is the molecule itself.
43
+ if (heading.kind !== 'fragment')
44
+ continue;
45
+ findings.push({ ...line(heading), idCode: entry.value });
46
+ }
47
+ return findings;
48
+ }
49
+ function line(heading) {
50
+ return {
51
+ kind: heading.kind,
52
+ description: heading.description,
53
+ severity: heading.severity,
54
+ idCode: null,
55
+ atoms: [],
56
+ bonds: [],
57
+ };
58
+ }
59
+ /** `This molecule is known to be mutagenic:` and its three siblings. */
60
+ const KNOWN = /^This molecule is known to be /i;
61
+ const HIGH_RISK = /^High-risk fragments/i;
62
+ const MEDIUM_RISK = /^Medium-risk fragments/i;
63
+ const NOTHING_FOUND = /^No indication for /i;
64
+ function readHeading(value) {
65
+ if (KNOWN.test(value)) {
66
+ return { kind: 'known', description: value, severity: null };
67
+ }
68
+ if (HIGH_RISK.test(value)) {
69
+ return { kind: 'fragment', description: value, severity: 'high' };
70
+ }
71
+ if (MEDIUM_RISK.test(value)) {
72
+ return { kind: 'fragment', description: value, severity: 'medium' };
73
+ }
74
+ if (NOTHING_FOUND.test(value)) {
75
+ return { kind: 'none', description: value, severity: null };
76
+ }
77
+ return { kind: 'note', description: value, severity: null };
78
+ }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AC,QAAQ;QAC1B,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;KACV,CAAC;AACJ,CAAC;AAED,wEAAwE;AACxE,MAAM,KAAK,GAAG,iCAAiC,CAAC;AAChD,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAC1C,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAC9C,MAAM,aAAa,GAAG,sBAAsB,CAAC;AAE7C,SAAS,WAAW,CAAC,KAAa;IAChC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/D,CAAC;IACD,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACpE,CAAC;IACD,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACtE,CAAC;IACD,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9D,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * One prediction, wherever it runs.
3
+ *
4
+ * The worker serves this, and a page with no `Worker` at all — a unit test,
5
+ * Node — runs the same function on its own thread. One code path, so what the
6
+ * tests prove is what the page does.
7
+ */
8
+ import type { PredictRequest, PredictResponse } from './predictProtocol.ts';
9
+ /**
10
+ * Answer one job.
11
+ *
12
+ * A structure that cannot be read, or that holds no atoms, throws: that is one
13
+ * bad row, and the run carries on without it. Resources that did not load
14
+ * return `unavailable` instead, because that is every row and the run must stop.
15
+ * @param request - The job.
16
+ * @returns The answer.
17
+ * @throws {Error} When the molecule itself could not be read or predicted.
18
+ */
19
+ export declare function runPredictionJob(request: PredictRequest): Promise<PredictResponse>;
20
+ //# sourceMappingURL=runPredictionJob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runPredictionJob.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/runPredictionJob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5E;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAsB1B"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * One prediction, wherever it runs.
3
+ *
4
+ * The worker serves this, and a page with no `Worker` at all — a unit test,
5
+ * Node — runs the same function on its own thread. One code path, so what the
6
+ * tests prove is what the page does.
7
+ */
8
+ import { errorMessage } from "../../error/core/toError.js";
9
+ import { predictIdCode, riskDetailOfIdCode } from "./predictIdCode.js";
10
+ import { loadPredictors } from "./predictors.js";
11
+ /**
12
+ * Answer one job.
13
+ *
14
+ * A structure that cannot be read, or that holds no atoms, throws: that is one
15
+ * bad row, and the run carries on without it. Resources that did not load
16
+ * return `unavailable` instead, because that is every row and the run must stop.
17
+ * @param request - The job.
18
+ * @returns The answer.
19
+ * @throws {Error} When the molecule itself could not be read or predicted.
20
+ */
21
+ export async function runPredictionJob(request) {
22
+ let predictors;
23
+ try {
24
+ predictors = await loadPredictors(request.resources);
25
+ }
26
+ catch (error) {
27
+ return { kind: 'unavailable', message: errorMessage(error) };
28
+ }
29
+ if (request.kind === 'riskDetail') {
30
+ return {
31
+ kind: 'riskDetail',
32
+ detail: riskDetailOfIdCode(request.idCode, request.risk, predictors),
33
+ };
34
+ }
35
+ return {
36
+ kind: 'properties',
37
+ key: request.key,
38
+ properties: predictIdCode(request.idCode, predictors, {
39
+ ...(request.label === undefined ? {} : { label: request.label }),
40
+ }),
41
+ };
42
+ }
43
+ //# sourceMappingURL=runPredictionJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runPredictionJob.js","sourceRoot":"","sources":["../../../src/osiris/core/runPredictionJob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAuB;IAEvB,IAAI,UAAU,CAAC;IACf,IAAI,CAAC;QACH,UAAU,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;IAC/D,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAClC,OAAO;YACL,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC;SACrE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE;YACpD,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjE,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * The scale every displayed property is read on: how wide the bar is, where
3
+ * the good band sits, and which published number the labelled mark names.
4
+ *
5
+ * Eight of the ten come verbatim from DataWarrior's own `MolecularPropertyHelper.SPEC`
6
+ * table — the same ranges its own property views draw — so nothing here is a
7
+ * cut-off picked to look right. The two it has no entry for, drug-likeness and
8
+ * the drug score, keep the legacy explorer's ranges, and take their fitness
9
+ * from `DrugScoreCalculator`'s own terms rather than from a new guess.
10
+ *
11
+ * The preferred band and the published threshold are different numbers on
12
+ * purpose: cLogP's band closes at 4, where DataWarrior puts it, while the
13
+ * published rule of thumb the mark names is 5. The band draws the colour, the
14
+ * threshold draws the line.
15
+ */
16
+ import type { PropertyKey } from './propertyKeys.ts';
17
+ /** A published rule of thumb, drawn on the bar as a labelled mark. */
18
+ export interface PropertyThreshold {
19
+ /** Where on the bar the mark goes. */
20
+ value: number;
21
+ /** How it reads, e.g. `≤ 5`. */
22
+ label: string;
23
+ }
24
+ /** Where a shared scale's numbers come from. */
25
+ export type ScaleSource = 'datawarrior' | 'legacy';
26
+ /** How one property is drawn, ranged and judged. */
27
+ export interface PropertyScale {
28
+ /** The field of `OsirisProperties` this describes. */
29
+ key: PropertyKey;
30
+ /** What the panel and the table column call it. */
31
+ label: string;
32
+ /** The unit, empty where the quantity is dimensionless. */
33
+ unit: string;
34
+ /** Decimals the value is shown to; `0` for a count. */
35
+ decimals: number;
36
+ /** The left end of the bar, and of the plot axis. */
37
+ rangeMin: number;
38
+ /** The right end of the bar, and of the plot axis. */
39
+ rangeMax: number;
40
+ /** The bottom of the preferred band, or `null` when it has no lower bound. */
41
+ preferredMin: number | null;
42
+ /** The top of the preferred band, or `null` when it has no upper bound. */
43
+ preferredMax: number | null;
44
+ /**
45
+ * How far outside the band the fitness takes to fall away. `null` for a
46
+ * quantity that is already a 0-to-1 fitness.
47
+ */
48
+ halfWidth: number | null;
49
+ /**
50
+ * Whether a larger number is the better one. `null` where the property has a
51
+ * band rather than a direction — a molecule wants some stereocentres, not as
52
+ * many or as few as possible.
53
+ */
54
+ higherIsBetter: boolean | null;
55
+ /** The published rule of thumb to mark, or `null` where there is none. */
56
+ threshold: PropertyThreshold | null;
57
+ /** Whether the bar grows from the middle rather than from the left. */
58
+ diverging: boolean;
59
+ /** Where the range and the band came from. */
60
+ source: ScaleSource;
61
+ }
62
+ /** How each displayed property is drawn, ranged and judged. */
63
+ export declare const PROPERTY_SCALES: Record<PropertyKey, PropertyScale>;
64
+ /**
65
+ * How one property is drawn, ranged and judged.
66
+ * @param key - Which of the ten.
67
+ * @returns Its scale.
68
+ */
69
+ export declare function propertyScale(key: PropertyKey): PropertyScale;
70
+ //# sourceMappingURL=scales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,sEAAsE;AACtE,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gDAAgD;AAChD,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAC;AAEnD,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,GAAG,EAAE,WAAW,CAAC;IACjB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/B,0EAA0E;IAC1E,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC,uEAAuE;IACvE,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,+DAA+D;AAC/D,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,aAAa,CA+J9D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,aAAa,CAE7D"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * The scale every displayed property is read on: how wide the bar is, where
3
+ * the good band sits, and which published number the labelled mark names.
4
+ *
5
+ * Eight of the ten come verbatim from DataWarrior's own `MolecularPropertyHelper.SPEC`
6
+ * table — the same ranges its own property views draw — so nothing here is a
7
+ * cut-off picked to look right. The two it has no entry for, drug-likeness and
8
+ * the drug score, keep the legacy explorer's ranges, and take their fitness
9
+ * from `DrugScoreCalculator`'s own terms rather than from a new guess.
10
+ *
11
+ * The preferred band and the published threshold are different numbers on
12
+ * purpose: cLogP's band closes at 4, where DataWarrior puts it, while the
13
+ * published rule of thumb the mark names is 5. The band draws the colour, the
14
+ * threshold draws the line.
15
+ */
16
+ /** How each displayed property is drawn, ranged and judged. */
17
+ export const PROPERTY_SCALES = {
18
+ logP: {
19
+ key: 'logP',
20
+ label: 'cLogP',
21
+ unit: '',
22
+ decimals: 2,
23
+ rangeMin: 0,
24
+ rangeMax: 8,
25
+ preferredMin: null,
26
+ preferredMax: 4,
27
+ halfWidth: 0.5,
28
+ higherIsBetter: false,
29
+ threshold: { value: 5, label: '≤ 5' },
30
+ diverging: false,
31
+ source: 'datawarrior',
32
+ },
33
+ logS: {
34
+ key: 'logS',
35
+ label: 'Solubility',
36
+ unit: 'log(mol/L)',
37
+ decimals: 2,
38
+ rangeMin: -8,
39
+ rangeMax: 2,
40
+ preferredMin: -4,
41
+ preferredMax: null,
42
+ halfWidth: 0.5,
43
+ higherIsBetter: true,
44
+ threshold: { value: -4, label: '> −4' },
45
+ diverging: false,
46
+ source: 'datawarrior',
47
+ },
48
+ molecularWeight: {
49
+ key: 'molecularWeight',
50
+ label: 'Molweight',
51
+ unit: 'g/mol',
52
+ decimals: 2,
53
+ rangeMin: 0,
54
+ rangeMax: 800,
55
+ preferredMin: null,
56
+ preferredMax: 400,
57
+ halfWidth: 50,
58
+ higherIsBetter: false,
59
+ threshold: { value: 450, label: '< 450' },
60
+ diverging: false,
61
+ source: 'datawarrior',
62
+ },
63
+ polarSurfaceArea: {
64
+ key: 'polarSurfaceArea',
65
+ label: 'TPSA',
66
+ unit: 'Ų',
67
+ decimals: 2,
68
+ rangeMin: 0,
69
+ rangeMax: 250,
70
+ preferredMin: null,
71
+ preferredMax: 120,
72
+ halfWidth: 20,
73
+ higherIsBetter: false,
74
+ threshold: null,
75
+ diverging: false,
76
+ source: 'datawarrior',
77
+ },
78
+ druglikeness: {
79
+ key: 'druglikeness',
80
+ label: 'Druglikeness',
81
+ unit: '',
82
+ decimals: 2,
83
+ rangeMin: -10,
84
+ rangeMax: 10,
85
+ preferredMin: 0,
86
+ preferredMax: null,
87
+ // `DrugScoreCalculator` scores drug-likeness as 1/(1+e^-d), which is this
88
+ // same valuation with a lower bound of 0 and a half-width of 1. So the
89
+ // ramp behind the bar is the library's own term, not a second opinion.
90
+ halfWidth: 1,
91
+ higherIsBetter: true,
92
+ threshold: { value: 0, label: '> 0' },
93
+ diverging: true,
94
+ source: 'legacy',
95
+ },
96
+ acceptorCount: {
97
+ key: 'acceptorCount',
98
+ label: 'H-bond acceptors',
99
+ unit: '',
100
+ decimals: 0,
101
+ rangeMin: 0,
102
+ rangeMax: 16,
103
+ preferredMin: null,
104
+ preferredMax: 10,
105
+ halfWidth: 1,
106
+ higherIsBetter: false,
107
+ threshold: null,
108
+ diverging: false,
109
+ source: 'datawarrior',
110
+ },
111
+ donorCount: {
112
+ key: 'donorCount',
113
+ label: 'H-bond donors',
114
+ unit: '',
115
+ decimals: 0,
116
+ rangeMin: 0,
117
+ rangeMax: 8,
118
+ preferredMin: null,
119
+ preferredMax: 5,
120
+ halfWidth: 0.5,
121
+ higherIsBetter: false,
122
+ threshold: null,
123
+ diverging: false,
124
+ source: 'datawarrior',
125
+ },
126
+ stereoCenterCount: {
127
+ key: 'stereoCenterCount',
128
+ label: 'Stereocentres',
129
+ unit: '',
130
+ decimals: 0,
131
+ rangeMin: 0,
132
+ rangeMax: 8,
133
+ preferredMin: 1,
134
+ preferredMax: 3,
135
+ halfWidth: 2,
136
+ higherIsBetter: null,
137
+ threshold: null,
138
+ diverging: false,
139
+ source: 'datawarrior',
140
+ },
141
+ rotatableBondCount: {
142
+ key: 'rotatableBondCount',
143
+ label: 'Rotatable bonds',
144
+ unit: '',
145
+ decimals: 0,
146
+ rangeMin: 0,
147
+ rangeMax: 20,
148
+ preferredMin: null,
149
+ preferredMax: 4,
150
+ halfWidth: 5,
151
+ higherIsBetter: false,
152
+ threshold: null,
153
+ diverging: false,
154
+ source: 'datawarrior',
155
+ },
156
+ drugScore: {
157
+ key: 'drugScore',
158
+ label: 'Drug score',
159
+ unit: '',
160
+ decimals: 2,
161
+ // The legacy bar, kept: it grows from the middle and runs -1 to 1, so a
162
+ // score always sits in its right half. The quantity itself is a product of
163
+ // terms in (0.5, 1) and four risk factors, so it cannot leave (0, 1).
164
+ rangeMin: -1,
165
+ rangeMax: 1,
166
+ preferredMin: null,
167
+ preferredMax: null,
168
+ // Already a 0-to-1 fitness: it is the product of the four valuations
169
+ // `DrugScoreCalculator` computes, so valuing it again would square it.
170
+ halfWidth: null,
171
+ higherIsBetter: true,
172
+ threshold: null,
173
+ diverging: true,
174
+ source: 'legacy',
175
+ },
176
+ };
177
+ /**
178
+ * How one property is drawn, ranged and judged.
179
+ * @param key - Which of the ten.
180
+ * @returns Its scale.
181
+ */
182
+ export function propertyScale(key) {
183
+ return PROPERTY_SCALES[key];
184
+ }
185
+ //# sourceMappingURL=scales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scales.js","sourceRoot":"","sources":["../../../src/osiris/core/scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAoDH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,eAAe,GAAuC;IACjE,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,KAAK;QACrB,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE;QACrC,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,aAAa;KACtB;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,CAAC,CAAC;QACZ,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,CAAC,CAAC;QAChB,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,IAAI;QACpB,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACvC,SAAS,EAAE,KAAK;QAChB,MAA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,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,aAAa;KACtB;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,CAAC;QACX,wEAAwE;QACxE,2EAA2E;QAC3E,sEAAsE;QACtE,QAAQ,EAAE,CAAC,CAAC;QACZ,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,qEAAqE;QACrE,uEAAuE;QACvE,SAAS,EAAE,IAAI;QACf,cAAc,EAAE,IAAI;QACpB,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAgB;IAC5C,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * What the tool predicts about one molecule, and how a risk is explained.
3
+ *
4
+ * Every quantity OpenChemLib can fail to compute is `number | null` here, never
5
+ * the library's own sentinel: cLogP and solubility answer `-999`, the polar
6
+ * surface area `-1`, drug-likeness `-999` when the tables did not load and `-1`
7
+ * when no fragment matched, and a risk `0`. None of them is `NaN`, and
8
+ * `DrugScoreCalculator` consumes every one of them and returns a plausible
9
+ * number, so a sentinel that leaves this module is a wrong value on screen with
10
+ * nothing to say it is wrong.
11
+ */
12
+ /** The four risks OSIRIS assesses, in the order the library numbers them. */
13
+ export declare const RISK_TYPES: readonly ["mutagenic", "tumorigenic", "irritant", "reproductive"];
14
+ /** One of the four risks. */
15
+ export type RiskType = (typeof RISK_TYPES)[number];
16
+ /**
17
+ * How risky one type came back.
18
+ *
19
+ * `unknown` is the library's `RISK_UNKNOWN`, which it returns when its fragment
20
+ * tables did not load — never "nothing was found", which is `none`.
21
+ */
22
+ export type RiskLevel = 'unknown' | 'none' | 'low' | 'high';
23
+ /** Everything the tool shows for one molecule. */
24
+ export interface OsirisProperties {
25
+ /** The canonical idCode, read before anything touched the molecule. */
26
+ idCode: string;
27
+ /** The canonical SMILES, for a link and for a download. */
28
+ smiles: string;
29
+ /** A name from the source, or the SMILES when it carried none. */
30
+ label: string;
31
+ /** e.g. `C6H6`. */
32
+ molecularFormula: string;
33
+ /** The relative molecular weight in g/mol — 78.11 for benzene, never the monoisotopic mass. */
34
+ molecularWeight: number;
35
+ /** cLogP, the octanol/water partition coefficient. */
36
+ logP: number | null;
37
+ /** Aqueous solubility, log10 of mol/L at 25 °C and pH 7.5. */
38
+ logS: number | null;
39
+ /** Topological polar surface area, in Ų. */
40
+ polarSurfaceArea: number | null;
41
+ /** Drug-likeness: positive is drug-like, negative is not. */
42
+ druglikeness: number | null;
43
+ /** The drug score, 0 to 1. `null` whenever any of its inputs was unknown. */
44
+ drugScore: number | null;
45
+ /** Every nitrogen and oxygen — the OSIRIS definition, not Lipinski's. */
46
+ acceptorCount: number;
47
+ /** Every nitrogen and oxygen carrying at least one hydrogen. */
48
+ donorCount: number;
49
+ /** Atoms with a real, non-pseudo parity. */
50
+ stereoCenterCount: number;
51
+ /** Single, non-ring, non-terminal, non-amide bonds. */
52
+ rotatableBondCount: number;
53
+ /** How the four risks came back. */
54
+ risks: Record<RiskType, RiskLevel>;
55
+ }
56
+ /** Which branch of the predictor produced one line of a risk explanation. */
57
+ export type RiskFindingKind = 'known' | 'fragment' | 'none' | 'note';
58
+ /** One line of why a risk came back as it did. */
59
+ export interface RiskFinding {
60
+ /**
61
+ * `known` — the molecule's own idCode is in the RTECS-derived list, so there
62
+ * is nothing to highlight. `fragment` — an alerting substructure matched.
63
+ * `none` — nothing was found. `note` — anything else the predictor printed.
64
+ */
65
+ kind: RiskFindingKind;
66
+ /** The sentence the predictor printed, verbatim. */
67
+ description: string;
68
+ /** How alerting the matched fragment is, or `null` when this is not a fragment. */
69
+ severity: 'high' | 'medium' | null;
70
+ /** The fragment's idCode, or `null` — a known molecule carries no fragment. */
71
+ idCode: string | null;
72
+ /** The molecule's atoms the fragment matched, so the page can highlight them. */
73
+ atoms: readonly number[];
74
+ /** The molecule's bonds the fragment matched. */
75
+ bonds: readonly number[];
76
+ }
77
+ /** Why one risk came back as it did. */
78
+ export interface RiskDetail {
79
+ /** Which of the four risks this explains. */
80
+ risk: RiskType;
81
+ /** What the predictor printed, one entry per sentence or matched fragment. */
82
+ findings: readonly RiskFinding[];
83
+ }
84
+ /** One entry of a `ParameterizedString[]`, as OpenChemLib hands it over. */
85
+ export interface DetailEntry {
86
+ /** 1 is an idCode, 2 is text, 3 is a number written out. */
87
+ type: number;
88
+ /** The entry itself. */
89
+ value: string;
90
+ }
91
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,UAAU,mEAKb,CAAC;AAEX,6BAA6B;AAC7B,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5D,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,+FAA+F;IAC/F,eAAe,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,6CAA6C;IAC7C,gBAAgB,EAAE,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4
+ * Every quantity OpenChemLib can fail to compute is `number | null` here, never
5
+ * the library's own sentinel: cLogP and solubility answer `-999`, the polar
6
+ * surface area `-1`, drug-likeness `-999` when the tables did not load and `-1`
7
+ * when no fragment matched, and a risk `0`. None of them is `NaN`, and
8
+ * `DrugScoreCalculator` consumes every one of them and returns a plausible
9
+ * number, so a sentinel that leaves this module is a wrong value on screen with
10
+ * nothing to say it is wrong.
11
+ */
12
+ /** The four risks OSIRIS assesses, in the order the library numbers them. */
13
+ export const RISK_TYPES = [
14
+ 'mutagenic',
15
+ 'tumorigenic',
16
+ 'irritant',
17
+ 'reproductive',
18
+ ];
19
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/osiris/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,WAAW;IACX,aAAa;IACb,UAAU;IACV,cAAc;CACN,CAAC"}