getMolecule {RMassBank} | R Documentation

## 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.

### 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.

### Value

A Rcdk `IAtomContainer` reference.

### Author(s)

Michael Stravs

### See Also

`parse.smiles`

### Examples

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

[Package RMassBank version 2.8.0 Index]