CDK-R / cdkr

Integrating R and the CDK
https://cdk-r.github.io/cdkr/
42 stars 27 forks source link

use renderextra and pull in cdk-jchempaint.jar #10

Closed sneumann closed 11 years ago

sneumann commented 11 years ago

Hi Rajarshi,

this is my attempt at moving to renderextra.

Yours, Steffen

sneumann commented 11 years ago

Hm, something could be wrong there.

This one crashes:

library(rcdk) m <- parse.smiles("NC2CC(N)C([OH2+])C(O)C2OC1OC(CO)C(O)C(N)C1O")[[1]] view.molecule.2d(m)

with

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.openscience.cdk.RingSet.getRings(RingSet.java:67) at org.openscience.cdk.tools.manipulator.RingSetManipulator.getHeaviestRing(RingSetManipulator.java:154) at org.openscience.cdk.renderer.generators.BasicBondGenerator.generate(BasicBondGenerator.java:276) at org.openscience.cdk.renderer.generators.BasicBondGenerator.generate(BasicBondGenerator.java:262) at org.openscience.cdk.renderer.generators.BasicBondGenerator.generate(BasicBondGenerator.java:63) at org.openscience.cdk.renderer.AbstractRenderer.generateDiagram(AbstractRenderer.java:119) at org.openscience.cdk.renderer.AtomContainerRenderer.paint(AtomContainerRenderer.java:203) at org.guha.rcdk.view.panels.MoleculeCell.paint(MoleculeCell.java:69)

I'll leave the rest to Egon, new pull request tomorrow.

Yours, Steffen

rajarshi commented 11 years ago

Is the renderextra a drop in replacement? Or does it need the latest master? If it needs API changes you might want to run ant jar in the cdkr directory and then rebuild rcdk

sneumann commented 11 years ago

I think I did that, there is a new rcdk.jar in the commit.

Steffen

rajarshi commented 11 years ago

d'oh. of course! On the train now, so I'll try nd debug later

sneumann commented 11 years ago

Hi Rajarshi,

With a little help from Egon I was now able to fix the issue for me. The commit now includes today's CDK nightly with some fix for the rendering, which fixed the NPE. Not sure whether you want to release rcdk with a nightly CDK, but since it works-for-me, I am not in a hurry for you to pull/release anything.

Yours, Steffen

rajarshi commented 11 years ago

Thanks for this. I had some uncommited changes that I pushed to master. Would you mind cancelling this pull request and update/rebase your patch to the latest master and then reissue a new pull request

Sorry for the hassle

sneumann commented 11 years ago

Will re-open with rebased version