Description Usage Arguments Value Author(s) See Also Examples
View source: R/ChemicalCuration.R
A small wrapper function to convert SMILES to an InChIKey with OpenBabel
(http://openbabel.org/wiki/Main_Page). Requires pre-installation of
OpenBabel. If this is not the case, use webservices instead via
getSuspectInChIKey
. Note this supercedes getSuspectInChIKey.babel
This function uses Babel default InChI options; standard InChIKeys will be generated.
1 | getInChIKey.obabel(smiles,babel_dir)
|
smiles |
SMILES code to convert to the InChIKey. |
babel_dir |
Location of folder containing |
Returns the InChIKey retrieved, or alternative output from Babel. Run
InChIKey_test
to determine if valid.
Emma Schymanski <emma.schymanski@uni.lu>
getSuspectInChIKey
, InChIKey_test
, getSuspectInChIKey.babel
.
1 2 3 4 5 6 | babel_dir <- "C:/Program Files (x86)/OpenBabel-2.3.2"
getInChIKey.obabel("c1ccccc1", babel_dir)
Various failed conversions:
getInChIKey.obabel("blah", babel_dir)
getInChIKey.obabel("", babel_dir)
InChIKey_test(getInChIKey.obabel("blah",babel_dir))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.