MolFormFromInChI: Extract Molecular Formula from InChI

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ChemicalCuration.R

Description

This basic function using string manipulation to extract a formula from the front of an InChI string, returning the second field (the formula). Note: this does NOT account for labeling, i.e. it is the formula associated with the structural skeleton (the InChIKey first block).

Usage

1

Arguments

InChI

InChI string to extract the formula.

Value

Returns the molecular formula as is in the InChI string.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

MolFormFromSmiles.rcdk.

Examples

1
2
inchi <- "InChI=1S/C2H4O2/c1-2(3)4/h1H3,(H,3,4)"
MolFormFromInChI(inchi)

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