CDK-R / cdkr

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

CDKR fails to compile via command line #71

Closed bachi55 closed 6 years ago

bachi55 commented 6 years ago

Hei,

I cloned the latest version of the repository and tried to compile the library using the command line:

R CMD build rcdklibs
R CMD INSTALL rcdklibs_*gz
cd rcdkjar
ant clean jar
cd ../
R CMD build rcdk # <-- Produces error
R CMD INSTALL rcdk_*gz

The R CMD build rcdk command fails with the following error-message:

creating vignettes ... ERROR
Quitting from lines 110-115 (molform.Rmd) 
Error: processing vignette 'molform.Rmd' failed with diagnostics:
Elements must be 3-tuples or 4-tuples

I fixed the molform.Rmd file by changing the lines 110-111:

mit <- generate.formula.iter(100, charge=0, window=0.1,
                             elements=list(C=c(0,50), H=c(0,50), N=c(0,50)))

to:

mit <- generate.formula.iter(100, charge=0, window=0.1,
                             elements=list(c("C",0,50), c("H",0,50), c("N",0,50)))

to be compatible with the generate.formula.iter function definition in rcdk/R/formula.R.

However, I receive another compilation error, that I could not fix now:

creating vignettes ... ERROR
Quitting from lines 110-115 (molform.Rmd) 
Error: processing vignette 'molform.Rmd' failed with diagnostics:
method getString with signature (Lorg/openscience/cdk/interfaces/IMolecularFormula;ZZ)Ljava/lang/String; not found

This seems to be related to the command in line 245-246 in file rcdk/R/formula.R:

return(.jcall("org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator",
      "S", "getString", formula, FALSE, TRUE))

Can you help with that?

Best regards,

Eric

rajarshi commented 6 years ago

Thanks for the report. But after I apply your fix, R CMD BUILD rcdk proceeds with no error. I'm running R 3.5.0

Can you try the latest version?

bachi55 commented 6 years ago

Hei,

sorry for coming back to this problem with such a delay. I tested your latest version (repository cloned today) and the building now works. I am on R version 3.5.0 as well now.

Can be closed.

Best regards,

Eric

rajarshi commented 6 years ago

Thanks