getInChI.obabel: Convert SMILES to an InChI with OpenBabel (obabel)

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ChemicalCuration.R

Description

A small wrapper function to convert SMILES to an InChI with OpenBabel (http://openbabel.org/wiki/Main_Page). Requires pre-installation of OpenBabel. This function uses Babel default InChI options; standard InChIs will be generated.

Usage

1
getInChI.obabel(smiles,babel_dir)

Arguments

smiles

SMILES code to convert to the InChI.

babel_dir

Location of folder containing "obabel.exe".

Value

Returns the InChI retrieved, or alternative output from Babel.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

getInChI.obabel.

Examples

1
2
3
4
5
babel_dir <- "C:/Program Files (x86)/OpenBabel-2.3.2"
getInChI.obabel("c1ccccc1", babel_dir)
Various failed conversions:
getInChI.obabel("blah", babel_dir)
getInChI.obabel("", babel_dir)

schymane/RChemMass documentation built on Jan. 25, 2021, 5:45 a.m.