Problem Rendering Reaction with Infocom MarvinRenderer

User 22e4618e6e

14-11-2012 10:32:07

Hi,


I'm using the Knime plug-ins (2.6.0.v0133)  (jp.co.infocom.cheminfo.marvin.renderer.MarvinRenderer) and I'm getting an exception attempting to render reactions.


After some digging it appears that the issue is the format string being sent into the MolImporter.importMol call inside MarvinRenderer.createMol. It's doing this:


mol = MolImporter.importMol(cell.getRxnValue(), MFileFormat.RXN.getName());


which fails. However if I simply emulate this call but WITHOUT the format, it works.


Any ideas ?


Cheers


Luke

User 5458277630

15-11-2012 03:46:16

Hi,

Is it possible that you post sample data and error message?

Thank you for your cooperation.

Best,
Taka

User 22e4618e6e

20-11-2012 11:58:30

Hi Taka,


 


Here is the stack trace:


 


012-11-13 14:51:41,564 DEBUG AWT-EventQueue-0 MarvinRenderer : Error while rendering structure


chemaxon.formats.MolFormatException: Can't read molecule from input.


at chemaxon.formats.MolImporter.importMol(MolImporter.java:1296)


at chemaxon.formats.MolImporter.importMol(MolImporter.java:1485)


at jp.co.infocom.cheminfo.marvin.renderer.MarvinRenderer.createMol(MarvinRenderer.java:493)


at jp.co.infocom.cheminfo.marvin.renderer.MarvinRenderer.setValue(MarvinRenderer.java:71)


at org.knime.core.data.renderer.AbstractPainterDataValueRenderer.getTableCellRendererComponent(AbstractPainterDataValueRenderer.java:203)


at org.knime.core.data.renderer.DefaultDataValueRendererFamily.getTableCellRendererComponent(DefaultDataValueRendererFamily.java:220)


at org.knime.core.data.renderer.SetOfRendererFamilies.getTableCellRendererComponent(SetOfRendererFamilies.java:141)


at javax.swing.JTable.prepareRenderer(JTable.java:5720)


at org.knime.core.node.tableview.TableContentView.prepareRenderer(TableContentView.java:286)


at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)


at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)


at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)


at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)


at javax.swing.JComponent.paintComponent(JComponent.java:752)


at javax.swing.JComponent.paint(JComponent.java:1029)


at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)


at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)


at javax.swing.RepaintManager.paint(RepaintManager.java:1224)


at javax.swing.JComponent.paintForceDoubleBuffered(JComponent.java:1065)


at javax.swing.JViewport.paintView(JViewport.java:1633)


at javax.swing.JViewport.windowBlitPaint(JViewport.java:1564)


at javax.swing.JViewport.setViewPosition(JViewport.java:1118)


at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:1029)


at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1018)


at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)


at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)


at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)


at javax.swing.JScrollBar.setValue(JScrollBar.java:446)


at javax.swing.plaf.basic.BasicScrollBarUI$TrackListener.setValueFrom(BasicScrollBarUI.java:1220)


at javax.swing.plaf.basic.BasicScrollBarUI$TrackListener.mouseDragged(BasicScrollBarUI.java:1162)


at java.awt.Component.processMouseMotionEvent(Component.java:6315)


at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3285)


at java.awt.Component.processEvent(Component.java:6036)


at java.awt.Container.processEvent(Container.java:2041)


at java.awt.Component.dispatchEventImpl(Component.java:4630)


at java.awt.Container.dispatchEventImpl(Container.java:2099)


at java.awt.Component.dispatchEvent(Component.java:4460)


at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)


at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4255)


at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)


at java.awt.Container.dispatchEventImpl(Container.java:2085)


at java.awt.Window.dispatchEventImpl(Window.java:2478)


at java.awt.Component.dispatchEvent(Component.java:4460)


at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)


at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)


at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)


at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)


at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)


at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


2012-11-13 14:51:41,580 WARN  AWT-EventQueue-0 MarvinRenderer : Error while rendering structure


When I tested this out by manually calling a trivial example : MolIMporter.importMol("

User 5458277630

21-11-2012 02:36:19

Hi Luke,

Thank you for your updating.
In my understanding, the format of structure you mentioned seems to be smarts format (not rxn format).
Our renderer expects that the RxnCell stores structure as rxn format.
(I'm using expressly format option for the MolIMporter.importMol method. not using automatic recognition.)
Therefore, you should use the SmartsCell for this structure.

Best,
Taka

User 22e4618e6e

21-11-2012 09:13:36

Hi Taka,


 


Thanks for that. I changed the processing in the node to convert to RXN before creating the RxnCell and it now works perfectly !


 


Cheers


Luke