Learn R Programming

rcdk (version 2.9.2)

parse.smiles: 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, atom typing or isotopic configuration 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. Howev

Value

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

See Also

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

Examples

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

Run the code above in your browser using DataLab