getSmilesFromInChI.babel: Convert an InChI to SMILES with OpenBabel

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ChemicalCuration.R

Description

A small wrapper function to convert an InChI to SMILES with OpenBabel (http://openbabel.org/wiki/Main_Page). Requires pre-installation of OpenBabel. If this is not the case, use webservices instead via getCactus. Note this creates "temp_inchi.inchi" in the temp_dir directory and will overwrite any previous file of the same name.

Usage

1
getSmilesFromInChI.babel(inchi,babel_dir,temp_dir)

Arguments

babel_dir

Location of folder containing "babel.exe".

temp_dir

Location of folder to save "temp_inchi.inchi".

smiles

Valid InChI code used to convert to SMILES. Default babel settings are used.

Value

Returns the SMILES retrieved, or alternative output from Babel.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

getCactus, getSuspectInChIKey.babel.

Examples

1
2
inchi <- "InChI=1S/C2H4O2/c1-2(3)4/h1H3,(H,3,4)"
getSmilesFromInChI.babel(inchi, "C:/Program Files (x86)/OpenBabel-2.3.2", "C:/DATA")

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