parse.smiles {rcdk} | R Documentation |
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.
parse.smiles(smiles, parser)
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 |
A jobjRef
to a CDK IAtomContainer
object. If the
SMILES could not be parsed, NA
is returned.
Rajarshi Guha (rguha@indiana.edu)
load.molecules
,
get.smiles
,
get.smiles.parser
,
view.molecule.2d
,
do.aromaticity
,
do.typing
smiles <- c('CCC', 'c1ccccc1', 'C(C)(C=O)C(CCNC)C1CC1C(=O)') mol <- parse.smiles(smiles[1]) mols <- lapply(smiles, parse.smiles)