parse.smiles {rcdk}R Documentation

Parse a SMILES String

Description

This function parses a SMILES string to generate an IAtomContainer object. Note that the resultant molecule will not have any 2D or 3D coordinates.

Note that the molecules obtained from this method will not have any aromaticity perception or atom typing done on them. This is in contrast to the load.molecules method. Thus, you should perform this steps manually on the molecules.

Usage

parse.smiles(smiles, parser)

Arguments

smiles A SMILES string
parser A reference to an object of class SmilesParser that can be obtained from get.smiles.parser. If this argument is not specified, then a parser will be created automatically. However this is inefficient if you are parsing many SMILES. In such a case create your own parser and supply it as this argument

Value

A jobjRef to a CDK IAtomContainer object. If the SMILES could not be parsed, NA is returned.

Author(s)

Rajarshi Guha (rguha@indiana.edu)

See Also

load.molecules, get.smiles, get.smiles.parser, view.molecule.2d, do.aromaticity, do.typing

Examples

smiles <- c('CCC', 'c1ccccc1', 'C(C)(C=O)C(CCNC)C1CC1C(=O)')
mol <- parse.smiles(smiles[1])
mols <- lapply(smiles, parse.smiles)

[Package rcdk version 2.9.2 Index]