You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual Result
Error with message "mass: Cannot calculate mass for structure with repeating units" thrown
Expected Result
To be the same as for server API. Object with correct formula and error as value of fields has been returned { "gross": "C2 H5(C H2)n", "mass-composition": "error: Cannot calculate mass for structure with repeating units", "molecular-weight": "error: Cannot calculate mass for structure with repeating units", "monoisotopic-mass": "error: Cannot calculate mass for structure with repeating units", "most-abundant-mass": "error: Cannot calculate mass for structure with repeating units" }
The text was updated successfully, but these errors were encountered:
It looks like the functionality providing Expected behavior is implemented in Server API v2 in Python layer (part of Indigo).
But the functionality of Actual behavior falls to Ketcher standalone layer in JS/TS (part of Ketcher).
In both cases the same Indigo library native functions are called and those functions return a string (either with the calculated mass result or with the error message). The layer above the library constructs the JSON response from individual error messages (according to requested options).
Consider to address this issue to Ketcher JS developers to reimplement the functionality from indigo-service v2 Python layer.
It was discussed with @AndreiMazol - he agreed that throwing the exception is a better way to work. It is impossible when working with REST API, but for indigo-wasm it should be handled on Ketcher side.
Now when Structure is incorrect Indigo gets zero values in all fields.
We expect that Indigo can get at least Formula of structure in 'Calculate Values' window.
Steps to reproduce
struct
options
{smart-layout: true, ignore-stereochemistry-errors: true, mass-skip-error-on-pseudoatoms: false, gross-formula-add-rsites: true, gross-formula-add-isotopes: true}
Actual Result
Error with message "mass: Cannot calculate mass for structure with repeating units" thrown
Expected Result
To be the same as for server API. Object with correct formula and error as value of fields has been returned
{ "gross": "C2 H5(C H2)n", "mass-composition": "error: Cannot calculate mass for structure with repeating units", "molecular-weight": "error: Cannot calculate mass for structure with repeating units", "monoisotopic-mass": "error: Cannot calculate mass for structure with repeating units", "most-abundant-mass": "error: Cannot calculate mass for structure with repeating units" }
The text was updated successfully, but these errors were encountered: