CDK-R / cdkr

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

get.mcs yields NullPointerException when there is no overlap #70

Closed rickhelmus closed 6 years ago

rickhelmus commented 6 years ago

Hello,

As the title says.

Example:

sm1 <- "C1=CC=CC=C1"
sm2 <- "[O-]P(=O)([O-])[O-]"
rcdk::get.mcs(rcdk::parse.smiles(sm1)[[1]], rcdk::parse.smiles(sm2)[[1]])

Gives

Error in .jcall("org.guha.rcdk.util.Misc", "Lorg/openscience/cdk/interfaces/IAtomContainer;",  : 
  java.lang.NullPointerException

Perhaps it should return an empty molecule (if that is possible...)?

Regards, Rick

rajarshi commented 6 years ago

Thanks for the report. Fixed in v3.4.9 in Github