File: runit.depiction.R

package info (click to toggle)
r-cran-rcdk 3.5.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 824 kB
  • sloc: makefile: 14; sh: 13
file content (18 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
library(rJava)

test.depictiongenerator <- function()
{
  
  mol <- parse.smiles("CC")
  
  #create a depiction  and write to SVG
  dg  <- .jnew("org.openscience.cdk.depict.DepictionGenerator")
  dg$withSize(512,512)$withAtomColors()
  temp1 <- paste0(tempfile(), ".svg")
  dg$depict(mol[[1]])$writeTo(temp1)
  
  #check SVG Output
  checkEquals("org.openscience.cdk.depict.DepictionGenerator", dg$getClass()$getName())
}