renderSMILES.rcdk.default: Render SMILES into 2D image for plotting via rcdk

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/StructurePlotting.R

Description

This function uses the rcdk to parse the smiles into a mol, with options to switch kekulise (aromaticity detection) on or off and to define desired coordinates. Output requires that plot.new has been called, i.e. this is designed to be used directly during plotting. This function uses default depiction options. For more options with rcdk>3.4.1, use renderSMILES.rcdk. Best results with rcdk>3.4.1 and rcdklibs>2.0.

Usage

1
renderSMILES.rcdk.default(smiles, kekulise=TRUE, coords=c(0,0,100,100))

Arguments

smiles

A valid SMILES code for rendering (e.g. "c1ccccc1").

kekulise

If TRUE, performs CDK aromaticiy detection, which is recommended. Setting FALSE can force rendering of invalid SMILES with undefined bond orders. Older rcdk versions may behave differently.

coords

This is used to control the size of the image within the plot. Values c(xmin,ymin,xmax,ymax).

Details

More information about aromaticity: https://github.com/CDK-R/cdkr/issues/49

Value

Returns an image for use during plotting

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

renderSMILES.CDKdepict, renderSMILES.rcdk

Examples

1
2
3
4
5
smiles <- "OS(=O)(=O)c1ccc(cc1)C(CC(=O)O)CC(=O)O"
  plot.new()
  plot.window(xlim=c(0,200), ylim=c(0,100))
  renderSMILES.rcdk(smiles,kekulise=FALSE)
  renderSMILES.rcdk(smiles,kekulise=TRUE)

schymane/RChemMass documentation built on Jan. 25, 2021, 5:45 a.m.