
Last chance! 50% off unlimited learning
Sale ends in
## Convenience plot method
# plot(x, griddim, print_cid=cid(x), print=TRUE, ...)
## Less important for user
plotStruc(sdf, atomcex = 1.2, atomnum = FALSE, no_print_atoms = c("C"), noHbonds = TRUE, bondspacer = 0.12, colbonds=NULL, bondcol="red",
regenCoords=FALSE, ...)
SDF
TRUE
, then the atom numbers are included in the plot. They are the position numbers of each atom in the atom block of an SDF.
TRUE
, then the C-hydrogens and their bonds - explicitly defined in an SDF - are excluded from the plot.
bondcol
.
colbonds
.regenerateCoords
function
first yourself and save the result.
plotStruc
depicts a single 2D compound structure based
on the XY-coordinates specified in the atom block of an SDF. The generic method
plot
can be used as a convenient shorthand to plot one or many
structures at once. Both functions depend on the availability of the
XY-coordinates in the source SD file and only 2D (not 3D) representations are plotted
correctly. Additional arguments that can only be passed on to the plot
function when supplied with
an SDFset object:
griddim
: numeric vector of length two to define the dimensions for arranging several structures in one plot.
print_cid
: character vector for printing custom compound labels. Default is print_cid=cid(sdfset)
.
print
: if print=TRUE
, then a summary of the SDF content for each supplied compound is printed to the screen.
This behavior is turned off with print=TRUE
.
sdf.visualize
## Import SDFset sample set
data(sdfsample)
(sdfset <- sdfsample)
## Plot single compound structure
plotStruc(sdfset[[1]])
## Plot several compounds structures
plot(sdfset[1:4])
## Highlighting substructures (here all rings)
myrings <- as.numeric(gsub(".*_", "", unique(unlist(rings(sdfset[1])))))
plot(sdfset[1], colbonds=myrings)
## Customize plot
plot(sdfset[1:4], griddim=c(2,2), print_cid=letters[1:4], print=FALSE, noHbonds=FALSE)
Run the code above in your browser using DataLab