title | author | date | output |
---|---|---|---|
Readme.RMD |
zachcp |
May 19, 2016 |
html_document |
A simple wrapper around rcdk's excellent depict module.
library(webchem)
library(rcdk)
library(cdkdepict)
You can also embed plots, for example:
# get a few smiles by name
cafsmiles <- webchem::cir_query(c("caffeine","penicillin"), representation = "smiles")
# parse the smiles into CDK AtomContainers
caffeine <- parse.smiles(cafsmiles$caffeine)[[1]]
penicillin <- parse.smiles(cafsmiles$penicillin)[[1]]
# depict
depict(caffeine,molfile = "images/caffeine.png")
depict(penicillin,molfile = "images/penicillin.png")
depict(caffeine, zoom=2, molfile = "images/caffeine_zoom.png")
depict(penicillin,zoom=2, molfile = "images/penicillin_zoom.png")
depict(caffeine, atomcolors = FALSE, molfile = "images/caffeine_BW.png")
depict(penicillin,atomcolors = FALSE, molfile = "images/penicillin_BW.png")