openBabelPlot: Plot compound structures

View source: R/AllClasses.R

openBabelPlotR Documentation

Plot compound structures

Description

Plots compound structure(s) for molecules stored in SDF and SDFset containers.

Usage

	openBabelPlot(sdfset, height=600, noHbonds = TRUE, regenCoords=FALSE)

Arguments

sdfset

Object of class SDFset

height

The height of the image in pixels. The generated image is always square, so this will also be the width.

noHbonds

If TRUE, then the C-hydrogens and their bonds - explicitly defined in an SDF - are excluded from the plot.

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 regenerateCoords function first yourself and save the result.

Details

The function openBablePlot depicts a 2D compound structure based on the XY-coordinates specified in the atom block of an SDF. If more than one compound is given in the SDFset, they will be arranged in a grid layout.

Author(s)

Kevin Horan

See Also

sdf.visualize

Examples

	## Not run: 
	## Import SDFset sample set
	data(sdfsample)
	(sdfset <- sdfsample)

	## Plot single compound structure
	openBabelPlot(sdfset[1])

	## Plot several compounds structures
	openBabelPlot(sdfset[1:4])
	
## End(Not run)


girke-lab/ChemmineR documentation built on July 28, 2023, 10:36 a.m.