Hello,
I have a question about how to get the MarvinJS sketcher on the webportal to generate a reaction object in the RXN format for my workflow. I have followed the Knime webportal admin guide to set up MarvinJS as the chemical sketcher. I have no problem pasting a reaction object into MarvinJS, but upon leaving the page it always exports the reaction as a Mol file with disconnected fragments.
I have tried running the same workflow on my AP client, and the GGA Ketcher processes the input correctly and generates an RXN object.
Upon examining your sketcher.html file used to integrate MarvinJS, it occurred to me the following code always exports the sketch as a Mol file regardless of the format parameter. Is it possible to change this code to account for the different chemical formats supported by MarvinJS?
getData: function(format) {
/* Optionally: adapt the body of this method to retrieve
the sketch data and return it to the KNIME WebPortal. */
if (format == null) {
format = "MDL";
}
var sketcherFrame = document.getElementById('sketcherFrame').contentWindow;
if (typeof sketcherFrame != 'undefined' && typeof sketcherFrame.marvin.sketcherInstance != 'undefined') {
return sketcherFrame.marvin.sketcherInstance.exportAsMol();
}
else {
return null;
}
},
Thanks,
Ning