Learn R Programming

RMassBank (version 2.0.0)

getMolecule: Create Rcdk molecule from SMILES

Description

Generates a Rcdk molecule object from SMILES code, which is fully typed and usable (in contrast to the built-in parse.smiles).

Usage

getMolecule(smiles)

Arguments

smiles
The SMILES code of the compound.

Value

A Rcdk IAtomContainer reference.

Details

NOTE: As of today (2012-03-16), Rcdk discards stereochemistry when loading the SMILES code! Therefore, do not trust this function blindly, e.g. don't generate InChI keys from the result. It is, however, useful if you want to compute the mass (or something else) with Rcdk.

See Also

parse.smiles

Examples

Run this code

# Lindane:
getMolecule("C1(C(C(C(C(C1Cl)Cl)Cl)Cl)Cl)Cl")
# Benzene:
getMolecule("C1=CC=CC=C1")

Run the code above in your browser using DataLab