Skip to content

CDK-R/depict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title author date output
Readme.RMD
zachcp
May 19, 2016
html_document

CDK Depict

A simple wrapper around rcdk's excellent depict module.

library(webchem)
library(rcdk)
library(cdkdepict)

Basic Depiction

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")

Change the Zoom Level

depict(caffeine,  zoom=2, molfile = "images/caffeine_zoom.png")
depict(penicillin,zoom=2, molfile = "images/penicillin_zoom.png")

Remove the Color

depict(caffeine,  atomcolors = FALSE, molfile = "images/caffeine_BW.png")
depict(penicillin,atomcolors = FALSE, molfile = "images/penicillin_BW.png")

Releases

No releases published

Packages

No packages published

Languages