Skip to contents

Convert between SMILES and InChI and to InchiKey chemical structure notations.

Usage

convert(
  input,
  input_type = c("SMILES", "INCHI"),
  output_type = c("INCHI", "INCHIKEY", "SMILES")
)

Arguments

input

a valid SMILE or InChI

input_type

either "SMILES" or "INCHI", denoting the input type

output_type

either "SMILES", "INCHI" or "INCHIKEY", denoting the output type

Value

The converted chemical structure.

Details

This functionality is not currently supported on Windows.

Examples

if (Sys.info()["sysname"] != 'Windows'){
  convert("C[C@H](C(=O)O)N",'SMILES','INCHI')
}
#> [1] "InChI=1S/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/t2-/m1/s1"