Description Usage Arguments Details Value Note Author(s) References See Also Examples
Plots compound structure(s) for molecules stored in SDF and SDFset containers.
1 2 3 4 5 6 7 |
sdf |
Object of class |
atomcex |
Font size for atom labels |
atomnum |
If |
no_print_atoms |
Excludes specified atoms from being plotted. |
noHbonds |
If |
bondspacer |
Numeric value specifying the plotting distance for double/triple bonds. |
colbonds |
Highlighting of subgraphs in main structure by providing a numeric vector of atom numbers, here position index in atom block.
The bonds of connected atoms will be plotted in the color provided under |
bondcol |
A character or numeric vector of length one to specify the color to use for substructure highlighting under |
regenCoords |
If ChemmineOB is installed and this option is TRUE, then Open
Babel will be used to re-generate the 2D coords for each
compound before plotting it. This often results in a nicer
layout. If you want to save the results of the coord
re-generation, call the |
... |
Arguments to be passed to/from other methods. |
The function 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
.
Prints summary of SDF/SDFset to screen and plots their structures to graphics device.
The compound depictions created by this function are not as pretty as the structure representations generated with the sdf.visualize
function. This will be improved in the future.
Thomas Girke
...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.